Lack of mitigation on external protocol execution (res: protocol)
Firefox allowed a web page to open a res:// URL, which then executed JavaScript inside Internet Explorer's renderer process at Low integrity level. An attacker could use this to run script in a different browser's process context, potentially escaping Firefox's own security boundaries.
- Fixed in 38 hours
- Paid in 27 days
- Disclosed after 38 hours
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
Steps to reproduce:
We can run res:// scheme from Firefox, which allows us to run JavaScript at renderer process privilege (Low IL) in Internet Explorer.
POC:
<script>window.open("res://apds.dll/redirect.html?target=javascript:alert(1)", "_self");</script>
Test on: https://pwning.click/ffres.php
Actual results:
Firefox open res:// URL which runs JavaScript at renderer process privilege (Low IL).
Expected results:
Firefox does not allow res:// URL
What the report shows
The target is Firefox's handling of external protocol URLs. The researcher found that Firefox would open a res:// URL, and that this scheme can be used to run JavaScript at renderer process privilege (Low IL) in Internet Explorer. The report classifies this as a privilege escalation issue in the Core: Networking component, rated medium severity. No bounty figure is given.
The reproduction is a single HTML snippet that opens the res:// URL in the current window:
<script>window.open("res://apds.dll/redirect.html?target=javascript:alert(1)", "_self");</script>
The researcher tested it on a page at https://pwning.click/ffres.php. The user agent recorded in the report is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
Steps to reproduce, as given:
- Load a page containing the script above in Firefox.
- The script calls
window.openwith theres://URL and the_selftarget. - Firefox opens the
res://URL, which runs JavaScript at renderer process privilege (Low IL).
Actual result: Firefox opens the res:// URL, which runs JavaScript at renderer process privilege (Low IL).
Expected result: Firefox does not allow res:// URLs.
The report does not describe a fix, a patch, or any further analysis beyond this.
Root cause
The report's title points to a lack of mitigation on external protocol execution, but it does not explain the mechanism. The URL used here is res://apds.dll/redirect.html?target=javascript:alert(1).
Impact
As the report frames it, a web page loaded in Firefox can cause JavaScript to run at renderer process privilege (Low IL) in Internet Explorer. The payload used is alert(1).
How this kind of bug works
Browsers distinguish between schemes they handle themselves (http, https, file and so on) and external protocols that are delegated to the operating system. When a page navigates to an external scheme, the browser asks the OS to launch the registered handler. Some handlers are dangerous because the URL they receive can carry script or commands: javascript: payloads embedded in a handler's parameters, command-line switches, or file paths. If the browser passes such a URL through without a confirmation prompt or a blocklist, a page can reach functionality that was meant to be reachable only from local or trusted contexts.
The res:// scheme is a good example: it is an Internet Explorer internal protocol, and a crafted URL can make the handler evaluate script. The bug class is therefore about the boundary between the browser and the OS protocol registry. Defences are a blocklist of schemes that must never be launched from web content, a user prompt for the rest, and sanitising or refusing URLs whose parameters contain script-bearing values.
How to test for it
- Enumerate the schemes the browser will launch. On the test machine, list the registered protocol handlers in the OS and compare them with the schemes the browser opens without a prompt.
- For each candidate scheme, build a page that navigates to a handler URL with a harmless marker payload, for example a script that writes to a document or shows a dialog, and load it in the target browser.
- Observe whether the browser prompts, blocks, or silently launches the handler, and whether the payload executes in the handler's context.
- Repeat with variations: navigation via
window.openwith different targets, top-level navigation, iframes, and links, because the mitigation may differ per navigation path. - A positive result is the handler launching without a prompt and the marker payload executing. Record the exact URL and the browser version.
Common false positives: the handler launching but the payload being neutralised by the handler itself; a prompt appearing that the tester dismissed; the payload running only because of a local setting on the test machine; and schemes that are blocked in one navigation path but not another, which needs to be confirmed before reporting.
How it is fixed
Standard fixes are to block dangerous schemes such as res:// from web content entirely, to require an explicit user confirmation before launching any external protocol, and to validate the URL passed to the handler so that script-bearing parameters are rejected. Browsers also maintain lists of schemes that are never allowed from web pages, updated as new handlers are found to be abusable.
Hunting notes
This bug class hides at the boundary between the browser and the OS: protocol handlers registered by installed applications, legacy schemes from other browsers, and handlers that accept parameters which are later interpreted as script or commands. Recon signals include a browser that opens a scheme without a prompt, a handler whose URL format includes a parameter that ends up in a script context, and differences in behaviour between navigation methods. To make a report accepted, show the exact URL, the browser version, the navigation method, and a payload that demonstrates execution in the handler's context, and state clearly what privilege the execution runs at. Keep the demonstration minimal and reproducible so the triager can confirm it on a clean machine.
What happened, in plain words
Firefox is a web browser. Like most browsers, it can hand certain kinds of links to other programs on your computer instead of opening them itself. For example, a mailto: link opens your email program. The browser does this by passing the link to the operating system, which knows which program is registered for that kind of link.
The researcher found that Firefox would pass on a link starting with res://. That scheme belongs to Internet Explorer, the older Microsoft browser that ships with Windows. The res:// scheme is an internal way for Internet Explorer to load its own resources. The report says a crafted res:// link leads to JavaScript running in Internet Explorer. So a normal web page opened in Firefox could make Internet Explorer run script.
The report calls this a privilege escalation issue in the Core: Networking component of Firefox, rated medium severity. No bounty figure is given.
The reproduction is a single piece of HTML. It opens the res:// link in the current window:
<script>window.open("res://apds.dll/redirect.html?target=javascript:alert(1)", "_self");</script>
Line by line:
<script>and</script>mark the start and end of a block of JavaScript that the browser will run when the page loads.window.open(...)is a browser function that opens a URL. Its first argument is the address to open."res://apds.dll/redirect.html?target=javascript:alert(1)"is that address. It uses theres://scheme and includes the valuejavascript:alert(1). Thejavascript:part is script, andalert(1)is the classic harmless test that shows a pop-up box with the number 1."_self"tells the browser to open the address in the same window or tab, rather than a new one.
The researcher tested it on a page at https://pwning.click/ffres.php. The user agent recorded in the report is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
A user agent is the short text a browser sends to identify itself and its version. Here it is the user agent string recorded in the report.
Steps to reproduce, as given:
- Load a page containing the script above in Firefox.
- The script calls
window.openwith theres://URL and the_selftarget. - Firefox opens the
res://URL, which runs JavaScript at renderer process privilege (Low IL).
Step 3 is the heart of it. "Renderer process privilege" means the script runs inside the renderer process of the application that handles the link, not with full system rights. "Low IL" stands for Low Integrity Level, a Windows label that limits what a process is allowed to touch. So the script runs, but with restricted rights. The report does not describe what an attacker could do with that context beyond running script there.
Actual result: Firefox opens the res:// URL, which runs JavaScript at renderer process privilege (Low IL).
Expected result: Firefox does not allow res:// URLs.
The report does not describe a fix, a patch, or any further analysis beyond this.
In general, how this kind of bug works
Browsers split links into two groups. Some schemes they handle themselves, such as http, https and file. Others are external protocols, which the browser delegates to the operating system. When a page navigates to an external scheme, the browser asks the OS to launch whichever program is registered for it. Think of it like a receptionist who forwards a call to another department: the browser does not handle the request, it just passes it on.
Some of those handlers are dangerous, because the link they receive can carry script or commands. A javascript: value tucked into a handler's parameter is one example. If the browser passes such a link through without a confirmation prompt or a blocklist, a web page can reach functionality that was meant to be reachable only from local or trusted contexts.
The res:// scheme is a good example: it is an Internet Explorer internal protocol, and a crafted link can make the handler evaluate script. The bug class is therefore about the boundary between the browser and the operating system's list of registered protocols. Defences are a blocklist of schemes that must never be launched from web content, a user prompt for the rest, and sanitising or refusing links whose parameters contain script-bearing values.
How to test for it
- Enumerate the schemes the browser will launch. On the test machine, list the registered protocol handlers in the OS and compare them with the schemes the browser opens without a prompt.
- For each candidate scheme, build a page that navigates to a handler URL with a harmless marker payload, for example a script that writes to a document or shows a dialog, and load it in the target browser.
- Observe whether the browser prompts, blocks, or silently launches the handler, and whether the payload executes in the handler's context.
- Repeat with variations: navigation via
window.openwith different targets, top-level navigation, iframes, and links, because the mitigation may differ per navigation path. - A positive result is the handler launching without a prompt and the marker payload executing. Record the exact URL and the browser version.
Common false positives: the handler launching but the payload being neutralised by the handler itself; a prompt appearing that the tester dismissed; the payload running only because of a local setting on the test machine; and schemes that are blocked in one navigation path but not another, which needs to be confirmed before reporting.
How it is fixed
Standard fixes are to block dangerous schemes such as res:// from web content entirely, to require an explicit user confirmation before launching any external protocol, and to validate the URL passed to the handler so that script-bearing parameters are rejected. Browsers also maintain lists of schemes that are never allowed from web pages, updated as new handlers are found to be abusable.
Hunting notes
This bug class hides at the boundary between the browser and the OS: protocol handlers registered by installed applications, legacy schemes from other browsers, and handlers that accept parameters which are later interpreted as script or commands. Recon signals include a browser that opens a scheme without a prompt, a handler whose URL format includes a parameter that ends up in a script context, and differences in behaviour between navigation methods. To make a report accepted, show the exact URL, the browser version, the navigation method, and a payload that demonstrates execution in the handler's context, and state clearly what privilege the execution runs at. Keep the demonstration minimal and reproducible so the triager can confirm it on a clean machine.
Glossary
- Browser: the program you use to view web pages, such as Firefox or Chrome.
- Scheme: the first part of a link, before the colon, that tells the computer what kind of address it is, such as
http,httpsorres. - External protocol: a link scheme the browser does not handle itself but hands to the operating system, which launches the registered program.
- Protocol handler: the program registered with the operating system to open a particular scheme.
res://: an internal Internet Explorer scheme for loading its own resources.- JavaScript: the programming language that runs inside web pages.
window.open: a browser function that opens a URL, optionally in a named window or tab._self: a target name meaning the current window or tab.- Payload: the part of an attack that does the actual work, here the
javascript:alert(1)value. alert(1): a JavaScript command that shows a pop-up with the number 1, used as a harmless test.- User agent: the short text a browser sends to identify itself and its version.
- Renderer process: the part of a browser that draws pages and runs their script, kept separate from the rest of the browser.
- Privilege escalation: a bug that lets something run with more rights than it should have.
- Low IL (Low Integrity Level): a Windows label that restricts what a process is allowed to touch.
- Blocklist: a list of things that are always refused.
- False positive: a test result that looks like a bug but is not one.
- Triager: the person who reviews a bug report and decides whether it is valid.