Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @angular/core
  4. ›
  5. CVE-2026-54267

CVE-2026-54267: Angular Client Hydration DOM Clobbering & Response-Cache Poisoning

June 15, 2026 (updated July 15, 2026)

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:

<script type="application/json" id="ng-state">
{"some-api-url": {"body": ...}}
</script>

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.

References

  • github.com/advisories/GHSA-rgjc-h3x7-9mwg
  • github.com/angular/angular/commit/6bde84fa8e6a5770b54040fbbc9bf10d5d0386fa
  • github.com/angular/angular/pull/69064
  • github.com/angular/angular/security/advisories/GHSA-rgjc-h3x7-9mwg
  • nvd.nist.gov/vuln/detail/CVE-2026-54267

Code Behaviors & Features

Detect and mitigate CVE-2026-54267 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 19.2.25, all versions starting from 20.0.0-next.0 before 20.3.25, all versions starting from 21.0.0-next.0 before 21.2.17, all versions starting from 22.0.0-next.0 before 22.0.1

Fixed versions

  • 20.3.25
  • 21.2.17
  • 22.0.1

Solution

Upgrade to versions 20.3.25, 21.2.17, 22.0.1 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-471: Modification of Assumed-Immutable Data (MAID)
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/@angular/core/CVE-2026-54267.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:03 +0000.