Insufficient policy enforcement in DevTools (CVE-2026-3941)
The DevTools console's CSS sanitisation could be bypassed with a specific CSS syntax, allowing an external URL to be loaded. An attacker could exfiltrate minor data such as IP address, user agent, headers, and whether the console was opened.
Originally disclosed on Chrome VRP
- Fix shipped in 60 days
VULNERABILITY DETAILS
The mitigations for Issue 40056332 and Issue 40060475 can be bypassed by using specific CSS syntax to load an external url. This leads to minor data exfil in DevTools (ip/ua/headers, whether the console was opened, css media queries etc).
The vulnerable regex is at: https://source.chromium.org/chromium/_/chromium/devtools/devtools-frontend/+/main:front_end/panels/console/ConsoleFormat.ts;l=206;drc=8cf3f6e6e069efefa0ae8ef9557214f62e856f81
VERSION
Chrome Version: 145.0.7587.6 Dev, 145.0.7626.0 Canary
Operating System: Windows, Mac, Linux, ChromeOS
REPRODUCTION CASE
PoC:
console.log("%c\t", `background-image:if(supports(_): "url(data:"; else: url("https://google.com/favicon.ico"));`)
Running the above, the Google favicon will appear in the DevTools console log.
CREDIT INFORMATION
Externally reported security bugs may appear in Chrome release notes. If this bug is included, how would you like to be credited?
Reporter credit: Lyra Rebane (rebane2001)
Context
Chrome DevTools renders console output in the browser's own front end, and that front end applies CSS to the messages it displays. Because console messages can contain attacker-influenced strings, DevTools has to be careful about what CSS it accepts from a %c format specifier: a page that can get a url(...) into the console styling could make the browser fetch a remote resource, leaking information about the developer's environment.
Two earlier issues, Issue 40056332 and Issue 40060475, put mitigations in place against exactly this. This report describes a bypass of those mitigations using specific CSS syntax that still loads an external URL, and it was tracked as CVE-2026-3941, an insufficient policy enforcement flaw in DevTools. The reporter is credited as Lyra Rebane (rebane2001), the severity is low, and the Chrome VRP paid a bounty of 1000.00 USD. The advisory was disclosed on 2026-03-10.
Setup
The behaviour was reproduced on the following builds and platforms, as stated in the report:
| Item | Value |
|---|---|
| Chrome Version | 145.0.7587.6 Dev, 145.0.7626.0 Canary |
| Operating System | Windows, Mac, Linux, ChromeOS |
No accounts, roles or special tooling are needed. The precondition is simply a page that can call console.log with a %c format specifier and a CSS string, viewed by someone with DevTools open.
Finding it
The reporter identified that the vulnerable regex lives in the DevTools front end, in the console formatting code:
https://source.chromium.org/chromium/_/chromium/devtools/devtools-frontend/+/main:front_end/panels/console/ConsoleFormat.ts;l=206;drc=[redacted]
The report identifies the vulnerable regex at that location. The mitigations for the two earlier issues relied on it, and the reporter found that particular CSS syntax could slip past it while still causing an external URL to be loaded. That mismatch between what the filter permits and what the CSS engine actually does is what made the behaviour look wrong.
Exploitation
Step 1: Send a crafted %c style through the console
The proof of concept is a single console.log call whose style argument uses a CSS if() construct with a supports() test:
console.log("%c\t", `background-image:if(supports(_): "url(data:"; else: url("https://google.com/favicon.ico"));`)
The first argument is the format string %c\t: %c applies the following argument as CSS to the rest of the message, and \t is the message text. The second argument is the style. Inside background-image, the if(supports(_): ...; else: ...) expression tests a condition and picks one of two values. The first branch is "url(data:", a quoted string that is not a complete URL. The second branch is url("https://google.com/favicon.ico"), a real external URL.
Step 2: Observe the external fetch
Running the above, the Google favicon appears in the DevTools console log. That is the observable result: the browser fetched https://google.com/favicon.ico because of CSS supplied through a console message, which the earlier mitigations were meant to prevent.
Root cause
The mistake is in the regex at front_end/panels/console/ConsoleFormat.ts line 206, which is the enforcement point for the earlier fixes. The report does not explain why the regex fails to block this syntax. The CSS engine then evaluates the conditional and loads the URL. In other words, the policy was enforced by pattern matching on the style string rather than by the actual effect of the CSS, and the two diverged for this syntax. The report does not go into further detail on the regex itself.
Impact
The report describes the result as minor data exfiltration in DevTools. The categories it names are IP, user agent and headers, whether the console was opened, and CSS media queries. The report names IP, user agent and headers, whether the console was opened, and CSS media queries as the data involved. The severity assigned is low, and the report does not claim anything beyond this minor exfiltration.
Fix
The report does not describe a fix or a change that was made. The vulnerable location it points to is the regex in ConsoleFormat.ts at line 206, which is where the enforcement would need to be corrected so that conditional CSS such as if(supports(...)) cannot smuggle an external url(...) past the filter.
Variants to test
- Other CSS conditional constructs. Try wrapping an external
url(...)in any conditional or functional syntax the filter may not model, and check whether the resource is fetched. A positive result is a request arriving at your listener from the console style. - Quoted versus unquoted URLs. The PoC uses
url("https://...")inside a quoted branch; try the same URL without quotes and with different escaping. A positive result is the same external fetch. - Splitting the URL across branches. The PoC puts an incomplete
url(data:in one branch and the real URL in the other; try other splits and orderings. A positive result is that the filter accepts the style and the browser still loads the external URL. - Other CSS properties that can trigger loads. The PoC uses
background-image; try properties with similar fetch behaviour. A positive result is an outbound request caused by the console style.
Hunting notes
This kind of bug hides in the code that sanitises or filters strings before they reach a more powerful interpreter, here the DevTools front end's console formatting. The signal during recon is a filter implemented as a regex over CSS or HTML: wherever a regex tries to decide what a browser will do with a string, there is room for syntax the regex does not model. The report shows the path from a known mitigation (the two earlier issues) to a bypass, which is a useful pattern: read the fix for a previous bug, find the enforcement point it added, and look for inputs that satisfy the filter but not its intent. The impact was demonstrated concretely, with the favicon appearing in the console.
What happened, in plain words
Chrome has a set of tools built into it for web developers, called DevTools. One part of DevTools is the console: a panel where a web page can print messages, and where a developer reads them while working on a site. The console can also style those messages with CSS, the language used to describe how web pages look.
Because any web page can print to the console, a page could try to sneak styling in that makes the browser go and fetch something from the internet. If it can do that, the page learns things about the developer's computer and network just from the fact that a request arrived. Chrome had already added protections against this in two earlier bug reports, Issue 40056332 and Issue 40060475. This report shows a way around those protections, using a particular piece of CSS syntax that still causes an external URL to be loaded.
The flaw was tracked as CVE-2026-3941, described as insufficient policy enforcement in DevTools. The reporter is credited as Lyra Rebane (rebane2001), the severity is low, and the Chrome VRP paid a bounty of 1000.00 USD. The advisory was disclosed on 2026-03-10.
A few terms before we go further:
- CSS: the language that says how things should look, for example which image to use as a background.
- URL: the address of something on the internet, such as
https://google.com/favicon.ico. - CVE: a public catalogue number given to a known security flaw so people can refer to it unambiguously.
- VRP: Chrome's Vulnerability Reward Program, which pays people who report security bugs.
- Bounty: the money paid for a valid report.
Setup
The behaviour was reproduced on the following builds and platforms, as stated in the report:
| Item | Value |
|---|---|
| Chrome Version | 145.0.7587.6 Dev, 145.0.7626.0 Canary |
| Operating System | Windows, Mac, Linux, ChromeOS |
A build here means a particular released version of the Chrome browser. "Dev" and "Canary" are early, experimental channels that developers use before a version reaches ordinary users. ChromeOS is Google's operating system for Chromebook laptops.
No accounts, roles or special tooling are needed. The only precondition is a page that can call console.log with a %c format specifier and a CSS string, viewed by someone who has DevTools open.
console.log: a function a web page calls to print a message into the developer console.- Format specifier: a short marker inside a message that tells the console to treat the next piece of text in a special way.
%cmeans "apply the next argument as CSS to the rest of this message".
Finding it
The reporter identified that the vulnerable regex lives in the DevTools front end, in the console formatting code:
https://source.chromium.org/chromium/_/chromium/devtools/devtools-frontend/+/main:front_end/panels/console/ConsoleFormat.ts;l=206;drc=[redacted]
This is a link into the public source code of Chrome's developer tools. Reading it from left to right:
source.chromium.orgis the website that hosts the Chrome source code.devtools-frontendis the part of the project that draws the DevTools panels you see on screen.front_end/panels/console/ConsoleFormat.tsis the file that formats console messages. The.tsending means it is written in TypeScript, a language that compiles down to JavaScript.l=206points at line 206 of that file.drc=[redacted]is a long identifier that pins the link to one exact snapshot of the code, so the line number keeps pointing at the same thing even after the file changes.
A regex (regular expression) is a pattern used to match text. Think of it like a very strict search rule: "does this string contain this shape of characters?". Programmers use regexes to check or filter text quickly. The regex at that location is the component that decides which CSS is allowed through from a %c argument. The mitigations for the two earlier issues relied on it, and the reporter found that particular CSS syntax could slip past it while still causing an external URL to be loaded. That mismatch between what the filter permits and what the CSS engine actually does is what made the behaviour look wrong.
A mitigation is a partial defence: something added to make an attack harder, even if it does not remove the underlying ability. The CSS engine is the part of the browser that reads CSS and acts on it, for example by downloading an image named in a style.
Exploitation
Step 1: Send a crafted %c style through the console
The proof of concept is a single console.log call whose style argument uses a CSS if() construct with a supports() test:
console.log("%c\t", `background-image:if(supports(_): "url(data:"; else: url("https://google.com/favicon.ico"));`)
A proof of concept (PoC) is a small, self-contained demonstration that a bug is real, usually the shortest thing that produces the effect.
Line by line:
console.log(starts a call that prints a message to the console. Everything between the parentheses is what gets printed."%c\t"is the first argument, the format string.%csays "the next argument is CSS that applies to the rest of this message".\tis a tab character, so the visible message is just a tab. The message text is deliberately almost empty: the point is the styling, not the words.- The second argument, in backticks, is the style itself. Backticks in JavaScript let you write a string that can contain quotes inside it without escaping them, which is handy here because the style contains double quotes.
background-image:is a CSS property that tells the browser which image to draw behind something. Setting it to a URL makes the browser download that URL.if(supports(_): ...; else: ...)is a CSS conditional expression. It tests a condition and picks one of two values, much like "if this is true use A, otherwise use B".supports(_)asks whether the browser understands a given piece of CSS; here the thing being tested is_, which is not real CSS.- The first branch is
"url(data:", a quoted string that is not a complete URL. It looks like the beginning of aurl(...)but never closes properly. - The second branch is
url("https://google.com/favicon.ico"), a real external URL. The favicon is the small icon a website shows in a browser tab.
The report does not explain why this shape bypasses the regex. The report does not explain how the regex is evaded.
Step 2: Observe the external fetch
Running the above, the Google favicon appears in the DevTools console log. That is the observable result: the browser fetched https://google.com/favicon.ico because of CSS supplied through a console message, which the earlier mitigations were meant to prevent.
A fetch is the browser going out to the network to retrieve something, here an image file. Seeing the favicon appear is proof that the request left the browser, because the image could not be displayed otherwise.
Root cause
The mistake is in the regex at front_end/panels/console/ConsoleFormat.ts line 206, which is the enforcement point for the earlier fixes. The filter does not account for the if() / supports() syntax, so a style that contains a real external url(...) in one branch of the conditional passes the check. The CSS engine then evaluates the conditional and loads the URL.
In other words, the policy was enforced by pattern matching on the style string rather than by the actual effect of the CSS, and the two diverged for this syntax. A useful comparison: a security guard who checks bags by looking for the word "knife" on the outside will miss a knife wrapped in a different label, even though the knife is still in the bag. The regex looks for a particular shape of text; the CSS engine cares about what the text means. The report does not go into further detail on the regex itself.
Impact
The report describes the result as minor data exfiltration in DevTools. Exfiltration means getting data out of a place it was not meant to leave. The categories it names are:
- IP: the numeric address that identifies the developer's network connection.
- User agent: the text a browser sends to say which browser and version it is.
- Headers: the extra pieces of information sent alongside every web request.
- Whether the console was opened: if a request arrives at all, the attacker knows the developer had DevTools open.
- CSS media queries: rules that describe the screen or device, which can be probed through the same mechanism.
The report names IP, user agent and headers among the data involved. The fact that the request happens at all reveals that the console was opened, and media queries can be probed through the same mechanism. The severity assigned is low, and the report does not claim anything beyond this minor exfiltration.
Fix
The vulnerable location it points to is the regex in ConsoleFormat.ts at line 206, which is where the enforcement would need to be corrected so that conditional CSS such as if(supports(...)) cannot smuggle an external url(...) past the filter.
Variants to test
These are follow-up ideas in the same spirit, for anyone checking whether the same weakness appears elsewhere:
- Other CSS conditional constructs. Try wrapping an external
url(...)in any conditional or functional syntax the filter may not model, and check whether the resource is fetched. A positive result is a request arriving at your listener from the console style. A listener here means a server you control that records incoming requests. - Quoted versus unquoted URLs. The PoC uses
url("https://...")inside a quoted branch; try the same URL without quotes and with different escaping. A positive result is the same external fetch. - Splitting the URL across branches. The PoC puts an incomplete
url(data:in one branch and the real URL in the other; try other splits and orderings. A positive result is that the filter accepts the style and the browser still loads the external URL. - Other CSS properties that can trigger loads. The PoC uses
background-image; try properties with similar fetch behaviour. A positive result is an outbound request caused by the console style.
Hunting notes
This kind of bug hides in the code that sanitises or filters strings before they reach a more powerful interpreter, here the DevTools front end's console formatting. To sanitise means to clean input so it cannot do anything harmful. The signal during recon is a filter implemented as a regex over CSS or HTML: wherever a regex tries to decide what a browser will do with a string, there is room for syntax the regex does not model. Recon is the early stage of looking around a target to decide where to dig.
The report shows the path from a known mitigation (the two earlier issues) to a bypass, which is a useful pattern: read the fix for a previous bug, find the enforcement point it added, and look for inputs that satisfy the filter but not its intent. The impact was demonstrated concretely, with the favicon appearing in the console.
Glossary
- Bounty: money paid by a bug bounty program for a valid security report.
- Build: a particular released version of a browser.
- Canary: an early Chrome release channel used for testing before wider release.
- ChromeOS: Google's operating system for Chromebook laptops.
- Console: the DevTools panel where a page prints messages and a developer reads them.
console.log: the JavaScript function a page calls to print a message to the console.- CSS: the language that describes how things look, including which images to load.
- CSS engine: the part of the browser that reads CSS and acts on it.
- CSS media query: a CSS rule that describes the screen or device, such as its size.
- CVE: a public catalogue number for a known security flaw.
- Dev: an early Chrome release channel aimed at developers.
- DevTools: the set of developer tools built into Chrome.
- Exfiltration: getting data out of a place it was not meant to leave.
- Fetch: the browser going out to the network to retrieve a resource.
- Format specifier: a marker such as
%cin a console message that changes how the next argument is treated. - Favicon: the small icon a website shows in a browser tab.
- Headers: extra pieces of information sent alongside every web request.
- IP: the numeric address that identifies a network connection.
- Listener: a server you control that records incoming requests.
- Mitigation: a partial defence that makes an attack harder without removing the underlying ability.
- Proof of concept (PoC): a small demonstration that a bug is real.
- Recon: the early stage of looking around a target to decide where to investigate.
- Regex (regular expression): a pattern used to match text.
- Sanitise: to clean input so it cannot do anything harmful.
- Severity: a rating of how serious a flaw is.
- TypeScript: a programming language that compiles to JavaScript.
- URL: the address of something on the internet.
- VRP: Chrome's Vulnerability Reward Program, which pays for security reports.