Skip to content
XSS Advisory Advanced CVE-2026-11155

Insufficient policy enforcement in CSS (CVE-2026-11155)

A CSS engine flaw allows the security taint flag on values from attr() to be stripped via discrete transitions on registered custom properties. An attacker could then use the laundered value in a sensitive sink like image-set() to exfiltrate sensitive attribute data such as a CSRF token.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 52 days

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.

Overview: A potential vulnerability in Blink's CSS engine allows bypassing the attr()-security control by using discrete transitions on registered custom properties. The issue occurs because transition endpoints are snapshotted as typed CSS values, which strips the is_attr_tainted flag. This could permit the exfiltration of sensitive attribute values via CSS-only techniques.

Affected files:

  • third_party/blink/renderer/core/css/properties/longhands/custom_property.cc
  • third_party/blink/renderer/core/animation/css/css_animations.cc
  • third_party/blink/renderer/core/css/resolver/style_cascade.cc
  • third_party/blink/renderer/core/animation/css_default_interpolation_type.cc
  • third_party/blink/renderer/core/css/css_syntax_definition.cc
  • third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
  • third_party/blink/renderer/core/css/css_attr_type.cc

Estimated timestamp from git blame: 2025-04-02

Summary A potential vulnerability exists in Blink's CSS implementation that allows for the laundering of the is_attr_tainted flag. This flag is a security mechanism designed to enforce the attr()-security control, preventing values derived from HTML attributes via attr() from being used in sensitive contexts like URLs. By leveraging discrete transitions on registered custom properties, an attacker can strip the taint from a value, bypassing these security checks and potentially exfiltrating sensitive data.

Technical Details

  1. The attr()-security control marks tokens substituted from attr() as tainted. This boolean flag (is_attr_tainted_) is stored within CSSVariableData.
  2. When a registered custom property (e.g., with syntax <string>) is assigned an attr() value, CustomProperty::ApplyValue parses it into a typed CSSValue (like CSSStringValue). CSSValue does not store the taint flag. However, ApplyValue correctly creates and stores a parallel CSSVariableData on the ComputedStyle with the taint preserved.
  3. If a CSS transition with transition-behavior: allow-discrete is triggered on this property, the animation engine calculates endpoints using AnimationUtils::KeyframeValueFromComputedStyle. This function retrieves the computed typed CSSValue (CSSStringValue), which lacks the taint information.
  4. During the animation, CSSDefaultInterpolationType::Apply passes this untainted CSSStringValue back into CustomProperty::ApplyValue.
  5. Inside CustomProperty::ApplyValue, the code attempts to cast the value to a CSSUnparsedDeclarationValue to extract the taint: const auto* declaration = DynamicTo<CSSUnparsedDeclarationValue>(value);.
  6. Because the incoming value is a CSSStringValue, the cast fails (declaration is nullptr), and is_attr_tainted is incorrectly evaluated as false.
  7. A new, untainted CSSVariableData is created and stored on the ComputedStyle.
  8. If this laundered custom property is subsequently used in a sensitive sink via var() (e.g., image-set()), the security check in css_parsing_utils::ConsumeImage (stream.IsAttrTainted()) evaluates to false, allowing the URL to be fetched.

Suggested Attacker Steps (Note: These are suggested steps; our tooling agent does not yet have the ability to run code to confirm a working exploit).

  1. Define a registered custom property with <string> syntax.

    CSS
    @property --s {
      syntax: "<string>";
      inherits: false;
      initial-value: "initial";
    }
    
  2. Apply the custom property using attr() to target an attribute containing sensitive data (e.g., a CSRF token in href).

  3. Trigger a discrete transition to launder the value.

    CSS
    a[href] {
      --s: attr(href);
      transition: --s 0.001s allow-discrete;
      background-image: image-set(var(--s) 1x);
    }
    @starting-style {
      a[href] { --s: "initial"; }
    }
    
  4. The transition launders the taint, and the browser incorrectly issues a GET request to the attacker's server with the sensitive attribute data.

Suggested Fix To resolve this, the taint state (is_attr_tainted) must be preserved when custom properties are resolved into typed CSSValue objects, or the animation system must be updated to retrieve and preserve the original CSSVariableData for registered custom properties when taking keyframe snapshots. Alternatively, CSSValue could be augmented to carry the taint bit, ensuring that it is never lost when converting between unparsed token sequences and typed values.

Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b


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.

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 taint flag is lost when a registered custom property is converted to a typed CSSValue for animation, and the code that reapplies the value does not restore it.

Impact

This could permit the exfiltration of sensitive attribute values via CSS-only techniques, though the exploit has not been confirmed.

What the attacker needed

Victim visits a malicious page; sensitive data in an HTML attribute; browser supports discrete transitions

The fix

The taint state should be preserved when custom properties are resolved into typed CSSValue objects, or the animation system should retrieve and preserve the original CSSVariableData for registered custom properties when taking keyframe snapshots.

How it was found

  1. Define a registered custom property with string syntax.
  2. Assign the property using attr() to read a sensitive attribute such as href.
  3. Trigger a discrete transition on the property to launder the taint.
  4. Use the laundered property in a sensitive sink like image-set().
  5. The browser issues a request to the attacker's server with the sensitive data.

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.

CSS has a safety feature that marks values taken from HTML attributes as 'tainted' so they cannot be used in places like URLs. This report shows a way to remove that mark by animating a custom property, which could let an attacker steal secret values from a page. The attack is theoretical and has not been run.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.