Loading of the notification API icon URI seems to be missing checks.
Firefox's Web Notifications API did not properly validate the icon URL passed to the Notification constructor, so a page could make the browser fetch localhost or private-network resources, load file:// paths, and trigger arbitrary external protocol handlers. An attacker could use this to probe local services, read or detect local files, and prompt users to open external applications without showing which site made the request.
- Fixed in 16 days
- Paid in 23 days
- Disclosed after 16 days
Created attachment 9522621
Notification API Icon.gif
A security vulnerability has been identified in Firefox's implementation of the Web Notifications API. The browser fails to properly validate and sanitize the icon parameter when creating notifications via new Notification(), allowing malicious actors to bypass multiple security restrictions that are properly enforced in Chromium-based browsers.
Firefox does not perform adequate security checks on the URL provided to the icon parameter in the Notification constructor. This oversight enables several security bypasses:
1. Local Network Access Bypass
Issue: The notification icon feature can be exploited to make arbitrary requests to local network resources, bypassing Local Network Access restrictions.
Example:
new Notification('Test', {
icon: 'http://localhost/request_type?notification_icon'
});
Impact:
Attackers can probe and interact with services on the local network (localhost, private IP ranges)
Bypasses the browser's Local Network Access security model
Enables reconnaissance of local services and potential SSRF (Server-Side Request Forgery) attacks from the client side
2. Local File System Access Bypass
Issue: The icon parameter accepts file:// protocol URLs, allowing direct access to local filesystem resources and bypassing same-origin policy isolation.
Example:
javascriptnew Notification('Test', {
icon: 'file:///c:/tmp/image.png'
});
Impact:
Bypasses browser restrictions on local file access
Violates the browser's security isolation model (sandbox/island mode)
Potential for information disclosure by accessing local files
Could be used to probe for the existence of specific files on the user's system
3. Arbitrary URL Schema Handling
Issue: Firefox accepts arbitrary URL schemas in the icon parameter and prompts the user to open them, but critically fails to include the requesting origin URL in the prompt.
Example:
javascriptnew Notification('Test', {
icon: 'calculator:://test'
});
Impact:
Users may be prompted to open external applications without clear context of which website initiated the request
Lack of origin information in the prompt makes it difficult for users to make informed security decisions
Could be exploited for social engineering attacks
Potential for triggering malicious actions in external protocol handlers
Reproduce :
1. open https://permission.site/ , click Notifications , allow Notifications permission bubble prompt
2. run the javascript code in the console
2.1. Local Network Access bypass
new Notification('Test1', {
icon: 'http://localhost/request_type?notification_icon'
});
2.2 Local file system access via file:// protocol
new Notification('Test2', {
icon: 'file:///c:/tmp/image.png'
});
2.3 Arbitrary URL schema handling without origin context
new Notification('Test3', {
icon: 'calculator:://test'
});
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the icon URL was fetched without applying the same scheme, origin and local-network restrictions that other subresource loads enforce.
Impact
A page could probe local network services and local files and could prompt users to launch external applications without clear origin context, though the report only demonstrates requests and prompts rather than confirmed data theft.
What the attacker needed
Victim visits a malicious page; notifications permission granted; Firefox browser
How it was found
- Open a test page and grant the notifications permission when prompted.
- Open the browser console on that page.
- Create a notification whose icon points at a localhost address and observe the request.
- Create a notification whose icon uses a file:// path and observe the local file access.
- Create a notification whose icon uses a custom scheme and observe the external protocol prompt without origin context.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a website shows a desktop notification, it can give an image address for the little icon. Firefox was loading whatever address was given, even addresses that point at the user's own computer or at files stored on the machine. That let a website peek at things it should not be able to reach, and ask the user to open other programs without saying which site asked.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.