Incorrect authorization in CSS (CVE-2026-113051)
Blink shares parsed stylesheets and their cached font and image resources between documents in the same renderer process without re-enforcing each document's Content Security Policy. A document with a strict policy could therefore render a font or image that its own policy should have blocked, after a lax document fetched it first.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 6 months
Project Fortify, 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 without the Chrome Security team. Please see go/chrome-ai-generated-security-bugs-faq for more information.
Overview: Blink improperly shares cached CSS subresources (fonts and images) across documents in the same renderer process without enforcing Content Security Policies. This allows a document with a strict CSP to render resources previously fetched by a lax document, bypassing its own CSP restrictions. The flaw stems from ignoring the return value of security checks during emulated resource loads from the cache.
Affected files:
third_party/blink/renderer/core/css/css_font_face_src_value.ccthird_party/blink/renderer/core/css/css_image_value.ccthird_party/blink/renderer/core/css/parser/css_parser_context.ccthird_party/blink/renderer/platform/loader/fetch/resource_fetcher.ccthird_party/blink/renderer/core/css/style_sheet_contents.ccthird_party/blink/renderer/core/loader/resource/css_style_sheet_resource.cc
Estimated timestamp from git blame: 2025-04-08
Description
A logic flaw in Blink's CSS resource fetching pipeline allows documents to bypass their own Content Security Policy (CSP) when sharing parsed stylesheets within the same renderer process.
When a document loads a stylesheet, Blink parses it into a StyleSheetContents object and caches it in a CSSStyleSheetResource within the global MemoryCache. Subsequent requests for the same stylesheet by other documents in the same process will reuse this parsed object if CSSParserContext::operator== returns true. Because this equality check intentionally ignores the document and its CSP context, documents with differing CSPs can share the same StyleSheetContents.
Inside the shared StyleSheetContents, resources like @font-face sources (CSSFontFaceSrcValue) and background images (CSSImageValue) maintain internal state about their fetched resources (e.g., fetched_ and cached_image_).
If a lax document fetches the resource first, the internal state is populated. When a strict document (e.g., one with font-src 'none') later attempts to resolve the same CSS value, the class identifies that the resource is already fetched. To notify the inspector, it calls RestoreCachedResourceIfNeeded(), which delegates to ResourceFetcher::EmulateLoadStartedForInspector().
Inside EmulateLoadStartedForInspector(), Blink correctly validates the request against the new document's policies by calling Context().CanRequest(...). This check accurately identifies the CSP violation and fires a violation report. However, EmulateLoadStartedForInspector() discards the blocked reason returned by CanRequest() and returns void. Consequently, the cached font or image is unconditionally passed to the client and rendered, effectively bypassing the strict document's CSP.
Potential Reproduction Steps
Note: Our tooling agent does not run code; the following are suggested steps an attacker would follow to trigger the vulnerability.
- Host two pages on the same origin:
lax.html(no CSP) andstrict.html(with headerContent-Security-Policy: font-src 'none'). - Both pages include
<link rel="stylesheet" href="/style.css">and style a text element with a custom font. /style.csscontains@font-face { font-family: F; src: url(/font.woff2) }.- A victim visits
lax.html. The browser fetches the stylesheet, fetches/font.woff2, and caches theFontResourceinside the parsedCSSFontFaceSrcValue. lax.htmlopensstrict.htmlviawindow.open()(or the user navigates same-site in a way that preserves the renderer process).strict.htmlrequests/style.css. It hits theMemoryCache, reuses the sharedStyleSheetContents, and shares theCSSFontFaceSrcValue.- When
strict.htmlapplies the font,CSSFontFaceSrcValue::Fetchdetects the font is already fetched and callsEmulateLoadStartedForInspector. - A CSP violation report is generated, but the font resource is passed to the renderer anyway, displaying the text with the blocked custom font.
Suggested Fix
The core issue is that ResourceFetcher::EmulateLoadStartedForInspector (or a similar mechanism used for cached CSS subresources) does not provide a way to halt the usage of the resource if a security check fails.
- Modify
EmulateLoadStartedForInspectorto return aboolor anstd::optional<ResourceRequestBlockedReason>indicating whether the emulated load is permitted by the current context. - Update
CSSFontFaceSrcValue::RestoreCachedResourceIfNeededandCSSImageValue::RestoreCachedResourceIfNeededto propagate this status back to the caller. - In
CSSFontFaceSrcValue::FetchandCSSImageValue::CacheImage, evaluate the result. If the security check fails, do not return thefetched_/cached_image_resource, and instead handle it as a blocked resource load.
Evaluated with Chrome root at commit: 7353d249d9cacf9c7218e1d7b8a39cf39c72d646
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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.
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 security check during emulated cache loads returns only a pass/fail signal that is discarded, so the cached resource is handed to the document regardless of the blocked reason.
Impact
A page with a strict CSP could display fonts or images its policy intended to block, weakening the protection CSP is meant to provide; the text does not show any wider compromise.
What the attacker needed
Two pages on the same origin; same renderer process for both pages; victim visits the lax page first
The fix
The emulated load check should return whether the load is permitted, and the CSS font and image code should refuse to use the cached resource when the check fails.
How it was found
- Host a page without CSP and a page with a strict font policy on the same origin.
- Both pages load the same stylesheet that declares a custom font.
- The victim visits the lax page, which fetches the stylesheet and the font and caches them.
- The lax page opens the strict page while keeping the same renderer process.
- The strict page reuses the cached stylesheet and font state.
- The font is rendered despite a CSP violation report being generated.
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.
A Content Security Policy is a rule set a website sends to the browser saying which resources it may load. Here the browser reused a font that another page had already downloaded and did not properly stop the second page from using it, even though that page's rules said no fonts. The result is that the page's own rules were not respected.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.