CVE-2026-54267 Details
Description
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.1, 21.2.17, and 20.3.25, to optimize client-side bootstrap in Server-Side Rendered (SSR) environments, Angular supports Hydration via provideClientHydration(). During SSR, Angular serializes the application's runtime state (such as cached HttpClient responses) and outputs it into the HTML stream as a <script> tag with a predictable identifier. During client bootstrap, Angular recovers this state by looking up the element via document.getElementById('ng-state') and parsing its text content. Because the DOM element lookup for the state container is predictable and relies solely on the ID selector (ng-state), it is susceptible to DOM Clobbering. If the application binds untrusted user input or CMS content to element properties such as id (e.g., <div [id]="userInput"> or <a id="ng-state">) before the genuine <script> tag is parsed by the browser, the attacker-controlled element takes precedence in the DOM lookup. During hydration, when Angular calls document.getElementById('ng-state'), the browser returns the attacker's clobbered element. Angular then attempts to parse the text content or attributes of this clobbered element as JSON. This vulnerability is fixed in 22.0.1, 21.2.17, and 20.3.25.
A vulnerability exists in Angular's client hydration process for Server-Side Rendered (SSR) applications, prior to versions 22.0.1, 21.2.17, and 20.3.25. This issue arises from the predictable DOM element lookup for the state container, which relies solely on the ID selector 'ng-state'. If an application binds untrusted user input or CMS content to element properties such as id before the genuine 'script' tag containing serialized runtime state is parsed by the browser, an attacker can clobber the state element. During hydration, Angular retrieves the element by its ID, but instead of getting the legitimate state data, it receives the attacker's clobbered element. This allows the injection of a custom JSON payload into Angular's 'TransferState' cache, potentially poisoning the HTTP transfer cache and leading to serious consequences such as DOM-based Cross-Site Scripting (XSS), privilege escalation, or UI hijacking.
Users can update to Angular versions 22.0.1, 21.2.17, or 20.3.25. If an immediate update is not possible, avoid binding raw user-supplied values or dynamic CMS IDs directly to element attributes. Instead, sanitize them or prepend a static safe prefix. Additionally, configuring a custom application ID can help obscure the state element lookup, making it more difficult for attackers to exploit the vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jun 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/angular/angular/commit/6bde84fa8e6a5770b54040fbbc9bf10d5d0386fa | [email protected] | Patch |
| https://github.com/angular/angular/pull/69064 | [email protected] | Issue TrackingPatch |
| https://github.com/angular/angular/security/advisories/GHSA-rgjc-h3x7-9mwg | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-471 | Modification of Assumed-Immutable Data (MAID) | [email protected] |
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| angular angular | <= 19.2.25 >= 20.0.0, < 20.3.25 >= 21.0.0, < 21.2.17 >= 22.0.0, < 22.0.1 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 9, 2026 | Reanalysis | [email protected] |
| Jun 26, 2026 | Initial Analysis | [email protected] |
| Jun 22, 2026 | CVE Modified | CISA-ADP |
| Jun 22, 2026 | New CVE Received | [email protected] |