Core: Angular Client Hydration DOM Clobbering & Response-Cache Poisoning (CVE-2026-54267)
Angular's client hydration feature in Server-Side Rendered (SSR) environments uses a predictable DOM element ID ('ng-state') to store serialized runtime state, including cached HTTP responses. This predictable ID allows an attacker to perform DOM Clobbering by injecting an element with the same ID before the genuine script tag is parsed. As a result, Angular may parse attacker-controlled JSON as part of its TransferState cache, enabling HTTP response cache poisoning. This can lead to DOM-based XSS, privilege escalation, or UI hijacking depending on how the poisoned data is used by the application. Patched versions 20.3.25, 21.2.17, and 22.0.1 address this issue. Workarounds include avoiding user-controlled IDs and configuring a custom, unpredictable APP_ID to change the state element's ID.
AI Analysis
Technical Summary
Angular's hydration mechanism for SSR outputs a script tag with a fixed ID ('ng-state') containing serialized application state. During client bootstrap, Angular retrieves this element by ID to restore state. Because the ID is predictable, an attacker can inject a DOM element with the same ID before the script tag is parsed, causing Angular to parse attacker-controlled JSON. This enables poisoning of Angular's TransferState cache, particularly the HTTP Transfer Cache used by HttpClient. Consequently, forged API responses can be returned without backend requests, potentially leading to DOM-based XSS, privilege escalation, or UI hijacking. Versions up to and including 19.2.25 are affected. The issue is fixed in versions 20.3.25, 21.2.17, and 22.0.1. Mitigations include avoiding dynamic or user-controlled IDs and setting a custom APP_ID to obfuscate the state element's ID.
Potential Impact
An attacker can inject malicious JSON into Angular's TransferState cache by exploiting DOM Clobbering on the predictable 'ng-state' element ID. This allows poisoning of cached HTTP responses, which Angular's HttpClient may return without contacting the backend. Depending on application usage, this can lead to DOM-based cross-site scripting (XSS), privilege escalation by spoofing user or session data, and UI hijacking or redirection by spoofing configuration endpoints.
Mitigation Recommendations
Fixed versions 20.3.25, 21.2.17, and 22.0.1 are available and should be applied to remediate this vulnerability. If immediate upgrade is not possible, apply workarounds: (1) avoid binding user-controlled or dynamic values directly to element IDs or sanitize them with a static prefix, and (2) configure a custom, unpredictable APP_ID to change the state element's ID from the default 'ng-state' to a unique value, reducing the risk of DOM Clobbering.
Core: Angular Client Hydration DOM Clobbering & Response-Cache Poisoning (CVE-2026-54267)
Description
Angular's client hydration feature in Server-Side Rendered (SSR) environments uses a predictable DOM element ID ('ng-state') to store serialized runtime state, including cached HTTP responses. This predictable ID allows an attacker to perform DOM Clobbering by injecting an element with the same ID before the genuine script tag is parsed. As a result, Angular may parse attacker-controlled JSON as part of its TransferState cache, enabling HTTP response cache poisoning. This can lead to DOM-based XSS, privilege escalation, or UI hijacking depending on how the poisoned data is used by the application. Patched versions 20.3.25, 21.2.17, and 22.0.1 address this issue. Workarounds include avoiding user-controlled IDs and configuring a custom, unpredictable APP_ID to change the state element's ID.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Angular's hydration mechanism for SSR outputs a script tag with a fixed ID ('ng-state') containing serialized application state. During client bootstrap, Angular retrieves this element by ID to restore state. Because the ID is predictable, an attacker can inject a DOM element with the same ID before the script tag is parsed, causing Angular to parse attacker-controlled JSON. This enables poisoning of Angular's TransferState cache, particularly the HTTP Transfer Cache used by HttpClient. Consequently, forged API responses can be returned without backend requests, potentially leading to DOM-based XSS, privilege escalation, or UI hijacking. Versions up to and including 19.2.25 are affected. The issue is fixed in versions 20.3.25, 21.2.17, and 22.0.1. Mitigations include avoiding dynamic or user-controlled IDs and setting a custom APP_ID to obfuscate the state element's ID.
Potential Impact
An attacker can inject malicious JSON into Angular's TransferState cache by exploiting DOM Clobbering on the predictable 'ng-state' element ID. This allows poisoning of cached HTTP responses, which Angular's HttpClient may return without contacting the backend. Depending on application usage, this can lead to DOM-based cross-site scripting (XSS), privilege escalation by spoofing user or session data, and UI hijacking or redirection by spoofing configuration endpoints.
Mitigation Recommendations
Fixed versions 20.3.25, 21.2.17, and 22.0.1 are available and should be applied to remediate this vulnerability. If immediate upgrade is not possible, apply workarounds: (1) avoid binding user-controlled or dynamic values directly to element IDs or sanitize them with a static prefix, and (2) configure a custom, unpredictable APP_ID to change the state element's ID from the default 'ng-state' to a unique value, reducing the risk of DOM Clobbering.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-rgjc-h3x7-9mwg
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-54267"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a58b41268715ace43d6825d
Added to database: 07/16/2026, 10:36:02 UTC
Last enriched: 07/16/2026, 10:53:53 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.