Improper Limitation of a Pathname to a Restricted Directory in DevTools (CVE-2025-1915)
DevTools' TargetHandler::CreateTarget did not check whether an extension had permission to access local files, allowing extensions with the debugger permission to open arbitrary file URLs. On Windows, an attacker could exploit this by opening a UNC path, causing the current user's NTLM hash to be leaked.
Originally disclosed on Chrome VRP
- Fix shipped in 44 days
Steps to reproduce the problem
On a server that the target can access:
- Clone the following repository: https://github.com/lgandx/Responder
- Inside the repository, run sudo ./Responder.py -I <INTERFACE> -w, where INTERFACE is the public facing network interface of the server
On the target:
- Download the attached extension
- In background.js, replace SERVER_IP with the address of the server running responder.py
- Install the extension, and make sure to disable "Allow access to file URLs"
Note that the NTLM hash is leaked twice, once after the initial install with access to file URLs enabled (as expected), but also when the extension reloads after disabling that option.
Problem Description
DevTool's TargetHandler::CreateTarget does not check if the current extension should be allowed to access local files, which allows extensions with the debugger permission to open arbitrary file URLs. On Windows, this can be exploited by opening a UNC path, which will then lead to the current user's NTLM hash getting leaked, as in bugs such as https://issues.chromium.org/issues/40060207
In addition to the extension that can be used to reproduce this, I've also attached a suggested fix, which should disallow creating targets with file URLs if the appropriate permissions aren't given.
Summary
Extensions without file URL access can open UNC paths through chrome.debugger
Additional Data
Category: Security
Chrome Channel: Stable
Regression: No
Context
Chrome DevTools exposes a debugging protocol that extensions can drive through the chrome.debugger permission. One of the operations available to a debugging client is creating a new target, handled on the browser side by TargetHandler::CreateTarget. That code path is supposed to respect the same origin and file access rules that apply to ordinary extension pages and content scripts. In particular, an extension that has not been granted access to file URLs should not be able to reach file:// resources.
The report describes a gap in that check: TargetHandler::CreateTarget did not verify whether the calling extension was allowed to access local files. As a result, an extension holding the debugger permission could open arbitrary file URLs as debugging targets. On Windows, a file:// URL can point at a UNC path, and opening a UNC path causes the operating system to authenticate to the remote SMB server, leaking the current user's NTLM hash. The researcher links this to earlier issues of the same class, such as https://issues.chromium.org/issues/40060207.
Setup
The reproduction needs two machines: a server that the target can reach, and the Windows machine running Chrome with the test extension.
On the server:
- Clone the Responder repository.
- Run it on the public facing network interface, with the WPAD proxy server enabled:
sudo ./Responder.py -I <INTERFACE> -w
-I selects the interface Responder listens on, and -w starts its WPAD proxy server.
On the target:
- Download the attached extension.
- In
background.js, replaceSERVER_IPwith the address of the server runningResponder.py. - Install the extension, and make sure to disable "Allow access to file URLs".
The extension is installed with file URL access disabled, so by configuration it should have no way to read local files. The researcher notes that the NTLM hash is leaked twice: once after the initial install with access to file URLs enabled, which is expected, and again when the extension reloads after that option is disabled. The second leak is the one that matters, because it happens in a state where the extension is not supposed to have file access at all.
Finding it
The researcher focused on the DevTools target creation path. TargetHandler::CreateTarget is the handler that services requests to create a new debugging target. The handler did not check whether the current extension should be allowed to access local files. That omission means an extension with the debugger permission can ask DevTools to open a file:// URL even when the extension itself has no file URL access.
The behaviour looked wrong because the file URL restriction is a permission boundary: disabling "Allow access to file URLs" is meant to stop an extension from reading local content. If a debugging API can create a target for a file:// URL regardless of that setting, the boundary can be bypassed. On Windows the consequence is more than local file disclosure, because file:// URLs can express UNC paths, and resolving a UNC path triggers an outbound SMB authentication attempt.
Exploitation
Step 1: Start Responder on the attacker-controlled server
On a server reachable by the target, clone Responder and start it on the public facing interface with the WPAD proxy server enabled:
sudo ./Responder.py -I <INTERFACE> -w
Responder listens for authentication attempts and captures the NTLM challenge/response material. The -w flag enables its WPAD proxy server, so the target's attempts to resolve a name can be directed to the attacker's machine.
Step 2: Prepare the extension
Download the attached extension and edit background.js, replacing SERVER_IP with the address of the server running Responder.py. The report does not include the contents of background.js, so the exact URL and API calls are not reproduced here. The exact contents of background.js are not included in the report, so the precise URL and API calls are not reproduced here.
Step 3: Install with file URL access disabled
Install the extension and disable "Allow access to file URLs". This is the configuration in which the extension should have no access to local files. The researcher notes that the NTLM hash is leaked once after the initial install with access to file URLs enabled, which is expected, and again when the extension reloads after that option is disabled. The second leak demonstrates that the restriction is not enforced on the DevTools target creation path.
Step 4: Observe the NTLM hash
When the extension creates a target for the UNC path, Windows attempts to authenticate to the remote SMB server, and Responder captures the current user's NTLM hash. The report does not include the captured output, but the leak is the observable result of the reproduction.
Root cause
TargetHandler::CreateTarget does not check whether the current extension should be allowed to access local files. The permission model for extensions treats file URL access as a separate grant, controlled by the "Allow access to file URLs" setting. The DevTools target creation path did not consult that grant. An extension with the debugger permission could therefore create a target for a file:// URL even when file URL access was disabled.
On Windows, the impact is amplified because file:// URLs can point at UNC paths. Opening such a path causes the operating system to send NTLM authentication to the remote host, which is how the hash is leaked. The report links this to earlier bugs of the same class, such as https://issues.chromium.org/issues/40060207.
Impact
An extension with the debugger permission but without file URL access can open arbitrary file URLs through chrome.debugger. On Windows, this allows the extension to open a UNC path and leak the current user's NTLM hash to a server the attacker controls. The report frames this as the summary: extensions without file URL access can open UNC paths through chrome.debugger. The impact is bounded by the permissions the extension already holds: it needs the debugger permission, and the leak requires the target to be on Windows.
Fix
The researcher attached a suggested fix, which should disallow creating targets with file URLs if the appropriate permissions are not given. The report does not state which change was ultimately shipped.
Variants to test
Hunting notes
The report notes that the hash is leaked even after file URL access is disabled.
What happened, in plain words
Chrome lets extensions add extra abilities to the browser. Some of those abilities are powerful, and Chrome asks the user to grant them one by one. One of these is the ability to read files stored on your own computer. Another is the ability to drive Chrome's built-in developer tools, called DevTools, through a small programming interface.
This report is about a gap between those two abilities. An extension that had been given the DevTools ability, but had not been given permission to read local files, could still ask DevTools to open a local file address. On Windows, a local file address can be written in a special form that points at another computer on the network. When Windows tries to open such an address, it quietly sends the logged-in user's login material, called an NTLM hash, to that other computer. If the other computer belongs to an attacker, the attacker receives that hash.
The researcher showed this with a small test extension and a free tool called Responder, which sits on a server and catches the login attempt. The important detail is that the leak still happened after the "Allow access to file URLs" setting was switched off, which is exactly the state in which the extension is supposed to have no access to local files at all.
Background: the pieces involved
Before the steps make sense, here are the parts of the picture, explained from zero.
Extension. A small add-on program installed into Chrome. It can add buttons, change pages, or talk to Chrome through special functions.
Permission. A named ability that an extension must request, and that the user approves at install time or in the extension's settings. Think of it like a key to a specific door in a building: holding the key to the storeroom does not open the front office.
chrome.debugger. The permission that lets an extension talk to Chrome's DevTools. DevTools is the panel developers open with F12 to inspect pages, watch network traffic and run scripts. Through this permission an extension can send the same kinds of commands a developer would send by hand.
API. An interface that one program offers so another program can ask it to do things, without knowing how it works inside. A restaurant menu is a fair comparison: you pick an item by name and the kitchen handles the details.
Debugging target. A thing that DevTools is attached to and can inspect, normally a browser tab. Creating a target means asking the browser to open something new and hand back a handle to it.
TargetHandler::CreateTarget. The piece of Chrome's own code that carries out a request to create a new debugging target. The name is written in the style Chrome's source code uses: a class called TargetHandler and a function called CreateTarget inside it.
file:// URL. An address that points at a file on the local disk rather than at a website. file:///C:/notes.txt is the shape of one.
UNC path. A Windows way of writing an address that points at a shared folder on another machine, starting with two backslashes and a host name. When Windows opens one, it has to log in to that remote machine first.
SMB. The protocol Windows uses to talk to shared folders over a network. The login step of SMB is where the NTLM exchange happens.
NTLM hash. A value derived from the user's password that Windows sends during that login exchange. It is not the plain password, but it is valuable: an attacker who captures it can try to crack it offline or reuse it in further attacks. It is comparable to a wax seal made from a key: not the key itself, but enough to impersonate the holder in some situations.
Responder. A freely available tool that pretends to be a machine on the network and records the login attempts it receives, including NTLM material.
WPAD. A Windows feature that looks for a proxy configuration file on the local network automatically. Responder can answer that search, which is one way it gets a victim machine to talk to it.
Regression. A bug that did not exist in earlier versions of the software. The report marks this one as not a regression.
Setting up the reproduction
The test needs two machines: a server that the victim's computer can reach, and a Windows machine running Chrome with the test extension installed.
On the server, the researcher first clones the Responder repository, which means downloading a copy of its source code, and then starts it:
sudo ./Responder.py -I <INTERFACE> -w
Line by line:
sudoruns the command with administrator rights../Responder.pyruns the tool's main script from inside the cloned folder.-I <INTERFACE>tells Responder which network card to listen on.<INTERFACE>is a placeholder for the name of the server's public facing network interface, the one the victim can reach.-wswitches on Responder's WPAD proxy server.
On the target machine, the researcher:
- Downloaded the attached extension.
- Opened
background.jsinside it and replacedSERVER_IPwith the address of the server runningResponder.py. - Installed the extension and made sure to disable "Allow access to file URLs".
background.js is the part of an extension that runs quietly in the background, without a visible page, and does the extension's real work. SERVER_IP is a placeholder in that file, and replacing it points the extension at the researcher's server. The "Allow access to file URLs" switch is a separate toggle in the extension's details page; when it is off, the extension is not supposed to be able to read anything on the local disk.
The researcher notes that the NTLM hash is leaked twice: once after the initial install with access to file URLs enabled, which is expected, and again when the extension reloads after that option is disabled. The second leak is the interesting one, because at that point the extension is configured to have no file access at all.
Finding the gap
The researcher looked at the part of Chrome that creates debugging targets. TargetHandler::CreateTarget is the handler that services requests to create a new debugging target. It did not check whether the calling extension was allowed to access local files. Because of that missing check, an extension holding the debugger permission could ask DevTools to open a file:// URL even though the extension itself had no file URL access.
Why is that wrong? The file URL setting is a boundary: switching it off is meant to stop an extension from reading local content. If a debugging function can open a file:// address regardless of the setting, the boundary can be walked around. On Windows the result is worse than reading a local file, because a file:// address can be written as a UNC path, and opening a UNC path makes Windows try to log in to a remote machine over SMB.
Exploitation, step by step
Step 1: Start Responder on the attacker-controlled server
On a server the victim can reach, clone Responder and start it on the public facing interface with the WPAD proxy server enabled:
sudo ./Responder.py -I <INTERFACE> -w
As above, -I picks the network interface Responder listens on and -w turns on its WPAD proxy server. Responder waits for login attempts and records the NTLM challenge and response material. With WPAD enabled, the victim's attempts to resolve a name can be steered to the attacker's machine.
Step 2: Prepare the extension
Download the attached extension and edit background.js, replacing SERVER_IP with the address of the server running Responder.py. The report does not include the contents of background.js, so the exact URL and function calls are not shown here.
Step 3: Install with file URL access disabled
Install the extension and switch off "Allow access to file URLs". This is the configuration in which the extension should have no access to local files. The researcher notes that the NTLM hash is leaked once after the initial install with access to file URLs enabled, which is expected, and again when the extension reloads after that option is disabled. The second leak shows that the restriction is not enforced on the DevTools target creation path.
Step 4: Observe the NTLM hash
When the extension creates a target for the UNC path, Windows tries to log in to the remote SMB server, and Responder captures the current user's NTLM hash. The report does not include the captured output, but the leak is the observable result of the reproduction.
Root cause
TargetHandler::CreateTarget does not check whether the current extension should be allowed to access local files. In Chrome's extension model, file URL access is a separate grant, controlled by the "Allow access to file URLs" setting. The DevTools target creation path did not consult that grant. An extension with the debugger permission could therefore create a target for a file:// URL even when file URL access was disabled.
On Windows the impact is larger because file:// URLs can point at UNC paths. Opening such a path makes the operating system send NTLM authentication to the remote host, which is how the hash is leaked. The researcher links this to earlier bugs of the same kind, such as https://issues.chromium.org/issues/40060207.
Impact
An extension with the debugger permission but without file URL access can open arbitrary file URLs through chrome.debugger. On Windows, this lets the extension open a UNC path and leak the current user's NTLM hash to a server the attacker controls. The researcher's own summary puts it this way: extensions without file URL access can open UNC paths through chrome.debugger. The impact is limited by the permissions the extension already holds: it needs the debugger permission, and the leak requires the victim to be on Windows.
Fix
The researcher attached a suggested fix, which should disallow creating targets with file URLs if the appropriate permissions are not given. The report does not say which change was ultimately shipped.
Variants to test
Hunting notes
The report notes that the hash is leaked even after file URL access is disabled.
Glossary
- Extension: a small add-on program installed into Chrome that adds features or changes how pages behave.
- Permission: a named ability an extension must request and the user must approve, like a key to one specific door.
chrome.debugger: the permission that lets an extension send commands to Chrome's developer tools.- DevTools: the developer panel in Chrome, opened with F12, used to inspect pages, network traffic and scripts.
- API: an interface one program offers so another can ask it to do things, without knowing the internals.
- Debugging target: the thing DevTools is attached to and can inspect, normally a browser tab.
TargetHandler::CreateTarget: the Chrome code that carries out a request to create a new debugging target.file://URL: an address pointing at a file on the local disk rather than at a website.- UNC path: a Windows address starting with two backslashes that points at a shared folder on another machine.
- NTLM hash: a value derived from the user's password that Windows sends during a network login, valuable to an attacker even though it is not the plain password.
- Responder: a freely available tool that impersonates machines on a network and records login attempts, including NTLM material.
- WPAD: a Windows feature that automatically looks for a proxy configuration on the local network, which Responder can answer.
- Clone: download a copy of a source code repository.
background.js: the part of an extension that runs quietly in the background and does its real work.- Root cause: the underlying coding mistake that produces the visible bug.
- Permission bypass: reaching a resource without the permission that is supposed to guard it.
- Credential leak: exposing login material, such as a password or hash, to someone who should not have it.