Skip to main content

Angular CVE-2026-54267

| EUVDEUVD-2026-38271 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-06-15 https://github.com/angular/angular GHSA-rgjc-h3x7-9mwg
8.6
CVSS 4.0 · Vendor: https://github.com/angular/angular
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify SSR Angular target with hydration
  2. Delivery
    Inject content with id="ng-state" via CMS or stored input
  3. Exploit
    Victim loads page with clobbering element
  4. Install
    Angular hydration reads attacker JSON as TransferState
  5. C2
    HttpClient serves poisoned response for target API
  6. Execute
    Forged data renders or drives auth decision
  7. Impact
    XSS, session spoof, or UI hijack

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all of the following: the target application must be an Angular SSR application that calls provideClientHydration() (the affected hydration feature must be enabled); the application must render attacker-controlled content into an element id attribute (e.g., template binding such as <div [id]="userInput">, or CMS HTML that yields an element with id="ng-state") so the clobbering node is parsed before the genuine state <script>; and a victim must visit the resulting page (UI:P passive interaction per the CVSS 4.0 vector). No authentication is required to deliver the payload (PR:N), but real-world impact further depends on the app consuming a cached API response in a security-sensitive way - for XSS, the poisoned field must reach an unsafe binding; for privilege escalation, the cached endpoint must drive trust decisions. Applications that do not use SSR hydration, that use a non-default APP_ID, or that never echo untrusted input into id attributes are not exploitable.

Impact

The published CVSS 4.0 base score is 8.6 (High) with AV:N/AC:L/PR:N/UI:P and high confidentiality and integrity impact, reflecting that exploitation requires only a victim visiting a vulnerable SSR-hydrated Angular page that also reflects attacker-controlled content into an element id. The realistic risk is moderated by two substantial preconditions: the target app must (a) use provideClientHydration and (b) bind untrusted input to id attributes (or otherwise let attacker-controlled markup land in the DOM ahead of the genuine ng-state script). EPSS and KEV data were not provided in the input, and there is no public exploit identified at time of analysis, so this is best treated as a high-impact, condition-dependent flaw rather than an opportunistic mass-exploitation issue - but applications using a CMS or rich content sinks alongside SSR hydration should treat it as a priority because successful exploitation poisons the HTTP transfer cache and can pivot to XSS or session spoofing.

Exploit ScenarioDerived

An attacker submits CMS content (e.g., an author bio or comment containing an <a> tag) whose id attribute is rendered into a page that uses Angular SSR hydration; the malicious element appears in the DOM before the legitimate <script id="ng-state"> block. When a victim loads the page, Angular's hydration calls getElementById('ng-state') and reads the attacker's JSON, poisoning the HTTP Transfer Cache so that subsequent HttpClient lookups for a target API URL return a forged payload - for example a spoofed /api/user response that elevates the victim's role or a configuration response that triggers DOM-based XSS via an unsafe binding downstream.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 22, 2026

DOM Clobbering and HTTP Transfer Cache poisoning in Angular's Client Hydration (provideClientHydration) allows remote attackers to inject arbitrary JSON into the TransferState by hijacking the predictable 'ng-state' element ID. Affected versions are @angular/core 20.x through 22.x prior to the fixes, and the flaw can be leveraged for DOM-based XSS, privilege escalation, or UI hijacking when applications bind untrusted input to element id attributes. No public exploit identified at time of analysis, but a vendor patch and detailed advisory (GHSA-rgjc-h3x7-9mwg) are available.

Earlier versions of this analysis (2)
v2 Jun 22, 2026 - 17:01 cvss changed CVSS 8.6

DOM Clobbering in Angular's client-side hydration allows attackers to poison the TransferState cache and HTTP Transfer Cache in Server-Side Rendered (SSR) applications using provideClientHydration(). Affected versions include Angular Core up to 22.0.1, 21.2.17, and 20.3.25 (with no fix for 19.2.25 and earlier); successful exploitation can yield DOM-based XSS, privilege escalation, or UI hijacking. No public exploit identified at time of analysis, but a detailed advisory and patch diff are public, lowering the bar to weaponization.

v1 Jun 15, 2026 - 15:50

DOM Clobbering in Angular's client-side hydration mechanism allows attackers who can inject HTML with controlled element IDs into SSR-rendered pages to poison the TransferState/HTTP Transfer Cache, leading to DOM-based XSS, privilege escalation via spoofed session data, or UI hijacking. Affects @angular/core in SSR applications using provideClientHydration() across versions prior to 22.0.1, 21.2.17, and 20.3.25, with no public exploit identified at time of analysis. The flaw stems from Angular's reliance on an unqualified document.getElementById('ng-state') lookup that returns any element matching the predictable ID, not just the intended <script> tag.

RemediationAI

Vendor-released patch: upgrade @angular/core to 22.0.1, 21.2.17, or 20.3.25 depending on your release line, as documented in GHSA-rgjc-h3x7-9mwg (https://github.com/angular/angular/security/advisories/GHSA-rgjc-h3x7-9mwg) and merged in PR https://github.com/angular/angular/pull/69064. If immediate upgrade is not feasible, apply the vendor-recommended workarounds: avoid binding raw user- or CMS-supplied values to the [id] attribute and instead prepend a static safe prefix such as 'safe-prefix-' before concatenating untrusted input, and configure a unique non-predictable APP_ID (e.g. provide APP_ID with a long random string) so the state element ID becomes '<obfuscated>-state' rather than the well-known 'ng-state' - note the latter is obfuscation, not a structural fix, and is bypassable if an attacker can enumerate or leak the APP_ID. Both workarounds require auditing every template and CMS pipeline that influences id attributes, which can be invasive in large content-driven apps.

Affected VersionsENISA

angular 22.0.0-next.0 < 22.0.1
angular 20.0.0-next.0 < 20.3.25
angular ≤ 19.2.25
angular 21.0.0-next.0 < 21.2.17

Affected Packages

npm @angular/core fix: 20.3.25, 21.2.17, 22.0.1
euvd angular fix: 20.3.25, 21.2.17, 22.0.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Angular's SSR hydration mechanism serializes runtime state - including cached HttpClient responses - into an inline <script type="application/json" id="ng-state"> tag, which the client retrieves at bootstrap via document.getElementById('ng-state'). Because the lookup relies solely on a static, predictable ID, it is vulnerable to DOM Clobbering (CWE-79 manifesting via DOM property collision): any earlier element in the DOM tree carrying id="ng-state" - including ones produced by binding untrusted user/CMS content to [id] - wins the getElementById lookup. The upstream fix in PR #69064 adds a tagName === 'SCRIPT' guard in retrieveTransferredState so non-<script> clobbering nodes are ignored. The CPE data confirms the affected package is the npm distribution pkg:npm/@angular/core.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/angular/angular) PRIMARY 8.6 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 8.0 HIGH

Network delivery with no auth, but exploitation depends on the app binding untrusted input into id attributes and on hydration being enabled (AC:H); victim must load the page (UI:R); cache poisoning crosses into the API/auth trust boundary (S:C) yielding high C and I, no availability impact.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Red Hat 4.7 MEDIUM

Primary rating from Vendor (https://github.com/angular/angular).

CVSS VectorVendor: https://github.com/angular/angular

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Jun 22, 2026 - 17:01 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 22, 2026 - 17:01 vuln.today
v2 - CVSS changed
CVSS changed
Jun 22, 2026 - 16:52 NVD
8.6 (HIGH)

DescriptionCVE.org

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:

html
<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.

Impact

By clobbering the state element, the attacker can inject a custom JSON payload into Angular's TransferState cache. The most critical exploitation vector is poisoning the HTTP Transfer Cache.

  1. The attacker injects a clobbered ng-state element containing custom JSON.
  2. The JSON maps a key (representing a target API endpoint URL) to a malicious payload of the attacker's choice.
  3. During client-side initialization, Angular's HttpClient checks TransferState before making requests. Finding the poisoned key, HttpClient returns the forged response instantly instead of requesting the genuine backend API.

Depending on how the application processes and renders the affected API response, this can lead to:

  • DOM-based Cross-Site Scripting (XSS) if poisoned fields are rendered using unsafe bindings.
  • Privilege Escalation by spoofing user info or session details retrieved from poisoned API payloads.
  • UI Hijacking and redirection by spoofing configuration endpoints.

Patched Versions

  • 22.0.1
  • 21.2.17
  • 20.3.25

Workarounds

If you cannot immediately update to a patched Angular version, apply the following workarounds:

A. Avoid Dynamic/User-Controlled IDs

Avoid binding raw user-supplied values or dynamic CMS IDs directly to element attributes. If dynamic IDs are required, sanitize them or prepend a static safe prefix:

html
<!-- Vulnerable Pattern -->
<div [id]="userControlledInput">...</div>

<!-- Mitigated Pattern -->
<div [id]="'safe-prefix-' + userControlledInput">...</div>
B. Configure a Custom Application ID

Declaring a unique, non-predictable APP_ID changes the ID suffix of the state element, making it harder for attackers to predict and target:

ts
// app.config.ts

import { APP_ID } from '@angular/core';
import { provideClientHydration } from '@angular/platform-browser';

export const appConfig = {
  providers: [
    { provide: APP_ID, useValue: 'unique-obfuscated-app-id' },
    provideClientHydration()
  ]
};

This changes the state element lookup ID from ng-state to unique-obfuscated-app-id-state.

Executive ViewAI

Why It Matters

Angular framework versions 20 through 22 contain a vulnerability (CVE-2026-54267) that allows remote attackers to inject unauthorized content through web application state, potentially enabling account takeover or UI manipulation. Organizations deploying these Angular versions in customer-facing applications face immediate risk of session compromise and user data exposure. Patching is required to secure dependent systems before exploitation becomes targeted.

Business Impact: High
Compensating Controls

Patch available per vendor advisory. If patching is delayed: disable Server-Side Rendering or remove provideClientHydration() until patched (requires testing); restrict application access to trusted networks only.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy