Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Angular app using hostDirectives or SVG host bindings
-
DeliverySubmit malicious javascript: URI as user-controlled input
-
ExploitAngular compiler emits no/wrong sanitizer for affected host binding
-
ExecutionUnsanitized value written to href/src/data DOM attribute
-
PersistVictim clicks or navigates to rendered element
-
ImpactArbitrary JavaScript executes in victim's browser origin
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 that the Angular application uses one or more of the following specific patterns: (1) hostDirectives composition where a child directive's host binding resolves to a different element type than its own selector implies; (2) inherited @HostBinding declarations applied across a selector mismatch; (3) createComponent called with a custom hostElement that differs from the component's declared selector; (4) directives applied to SVG or MathML namespace elements; or (5) tag-neutral selectors such as :not(...) that match security-sensitive HTML elements. In addition, attacker-controlled data must flow into one of the affected attributes-href, src, action, xlink:href, or data-via those host bindings. User interaction is required (CVSS UI:P): the victim must trigger the component rendering the malicious value. No authentication is needed from the attacker's perspective (PR:N). Applications that bind exclusively to typed elements via standard template bindings and do not use these advanced directive composition patterns are not exploitable through this vector. |
| Impact | The CVSS 4.0 base score of 5.3 with vector AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N reflects the fundamental XSS pattern: network-reachable, no privileges needed from the attacker, but user interaction is required and the impact is bounded to the subsequent system (the user's browser context) rather than the Angular application server. The SC:L/SI:L classification is apt-stored or reflected JavaScript execution gives limited but real confidentiality and integrity impact. Critically, real-world exploitability is constrained further than the AC:L metric suggests: the vulnerable application must specifically use hostDirectives composition, SVG/MathML host elements, inherited HostBinding across selector boundaries, or tag-neutral selectors, AND attacker-controlled values must reach those particular bindings. Ordinary Angular templates that bind directly to typed elements are not affected. No CISA KEV listing and no public exploit code have been identified, and EPSS data is absent from the provided intelligence. The net picture is a meaningful but not immediately critical vulnerability-high priority for Angular-heavy enterprise applications using advanced directive composition patterns, lower urgency for simpler SPAs. |
| Exploit ScenarioDerived | An attacker targeting a web application built with Angular that uses hostDirectives composition or SVG elements with host bindings submits a javascript: URI as a profile URL or link field; the Angular application passes this value into a directive's host binding on an anchor or iframe element. Because the compiler emitted no sanitizer (or the wrong one) for that binding, the raw javascript: value is written directly to the href or src DOM attribute. When the victim clicks the rendered link, the browser executes the attacker's JavaScript payload in the application's origin, enabling session token theft or further exploitation. No public exploit code has been identified; the attack requires knowledge of the application's specific directive structure. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 10, 2026
Cross-site scripting in Angular's compiler and runtime (@angular/core, @angular/compiler) prior to versions 20.3.28, 21.2.20, and 22.1.0 allows unauthenticated remote attackers (with user interaction) to execute arbitrary JavaScript by bypassing built-in sanitization for security-sensitive host bindings. The compiler incorrectly derived SecurityContext from the declaring directive's CSS selector rather than the actual concrete host element, causing it to emit the wrong sanitizer-or no sanitizer at all-for attributes such as href, src, action, xlink:href, and data. Vendor-released patches exist for all three active release lines; no public exploit or KEV listing has been identified at time of analysis.
RemediationAI
Vendor-released patches are available: upgrade to Angular 20.3.28, 21.2.20, or 22.1.0 as appropriate for the installed major version, available at the tagged GitHub releases (github.com/angular/angular/releases/tag/v20.3.28, /v21.2.20, /v22.1.0). For applications that cannot immediately upgrade, the Angular team's documented workaround is to call DomSanitizer.sanitize(SecurityContext.URL, value) explicitly before assigning attacker-controlled values to any host binding that targets href, src, action, xlink:href, or data attributes; this restores the sanitization the compiler should have emitted. A complementary defense is to restrict accepted input values to validated HTTP/HTTPS URL schemes via allowlist validation at the component boundary. Note that the DomSanitizer workaround requires identifying all affected binding sites in the codebase-missing even one leaves residual risk. Teams using Content Security Policy with a restrictive script-src directive will limit XSS exploitability as a defense-in-depth measure, though CSP bypass remains possible in some configurations.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 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 ahead-of-time (AOT) compiler performs static analysis at build time to inject sanitizer functions-sanitizeUrl, sanitizeHtml, sanitizeResourceUrl, or sanitizeUrlOrResourceUrl-into generated host-binding code. The SecurityContext enum governs which sanitizer is chosen. Prior to the fix, that context was resolved against the declaring directive's own selector (e.g., a generic :not(...) or a tag-neutral selector) rather than the concrete host element the directive will actually decorate at runtime. The PR diff (pull/69558) confirms the regression: calls were changed from sanitizeUrl to sanitizeUrlOrResourceUrl for href and src, and explicit sanitizeHtml and sanitizeUrlOrResourceUrl calls were added for srcdoc and data attributes respectively. Affected code paths include hostDirectives composition, inherited @HostBinding declarations, createComponent with a custom hostElement, SVG/MathML namespace elements (whose tag names don't match HTML element semantics), and tag-neutral selectors. CWE-79 (Improper Neutralization of Input During Web Page Generation) covers the root cause: unsanitized attacker data reaches a sink-DOM attributes-that the framework was expected to guard.
Know when Angular gets its next vulnerability
- 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
AC:H because exploitation requires the application to use specific advanced Angular directive patterns, not just any Angular deployment; S:C for browser-context XSS.
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 20.3.28, 21.2.20, and 22.1.0, Angular's compiler and runtime in @angular/core and @angular/compiler could omit or select an incorrect sanitizer for security-sensitive directive host bindings because SecurityContext was derived from the declaring directive or component selector rather than the concrete host element. The mismatch is reachable through hostDirectives composition, inherited HostBinding declarations, createComponent with a custom hostElement or dynamic directives, SVG/MathML namespace elements, and tag-neutral selectors such as :not(...). Attacker-controlled href, src, action, xlink:href, or data values can therefore reach DOM attributes without Angular's built-in sanitizer and execute arbitrary JavaScript in the user's browser context. Applications unable to upgrade can use DomSanitizer.sanitize with SecurityContext.URL before assignment or restrict inputs to validated HTTP and HTTPS URL schemes. This issue is fixed in versions 20.3.28, 21.2.20, and 22.1.0.
Blast Radius
ecosystem impact- 1 npm packages depend on @angular/compiler (1 direct, 0 indirect)
- 1 npm packages depend on @angular/core (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 22.0.0 and other introduced versions.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Cross-site scripting via Angular's server-side rendering package (@angular/platform-server) allows arbitrary JavaScript
Cross-site scripting in Angular's server-side rendering engine (`@angular/platform-server`) allows arbitrary JavaScript
Server-Side Rendering in Angular's @angular/platform-server leaks server-side credentials to attacker-controlled origins
Stored XSS in the Angular Template Compiler (npm package @angular/compiler) allows an authenticated attacker who can per
Cross-site scripting in Angular's Template Compiler allows attackers to inject arbitrary JavaScript through unsanitized
An unauthenticated remote attacker can lock up an Angular server-side rendering process by submitting HTML that contains
Server-side request forgery in Angular's @angular/ssr package (all versions from 19.0.0-next.0 before 19.2.18, 20.0.0-ne
Command injection via untrusted Markdown rendering in the Angular Language Service VS Code extension (versions prior to
Arbitrary code execution in the Angular Language Service VS Code extension prior to 21.2.4 allows attackers to silently
Server-Side Request Forgery in Angular's @angular/platform-server (SSR) lets remote unauthenticated attackers hijack the
Heap exhaustion and CPU starvation in @angular/router under Angular Server-Side Rendering on Node.js allow unauthenticat
Denial of service in the npm package @angular/router when Server-Side Rendering (SSR) is enabled on Node.js allows an un
EUVD-2026-75678
GHSA-hh8m-fm6v-7cvg
NVD
CVE.org
EPSS
Exploit-DB