Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify Angular app accepting user-controlled template input
-
DeliveryCraft payload using svg: namespace prefix (e.g., <svg:script src=attacker.js>)
-
ExploitSubmit payload bypassing application-layer input checks
-
InstallAngular template preparser fails to match ':svg:script' as script element
-
C2Malicious element survives template compilation and attribute sanitization
-
ExecuteVictim browser renders compiled template and executes injected script
-
ImpactSession hijack or data exfiltration under application 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 all three of the following conditions to be simultaneously true: (1) The target Angular application must use runtime JIT (Just-In-Time) template compilation and accept user-controlled strings as template input - this is a non-default, explicitly security-discouraged pattern; standard Angular production applications use AOT compilation with static templates and are unaffected. (2) The attacker must be able to supply input containing XML namespace prefixes such as 'svg:' or ':svg:' that is processed directly by the Angular template preparser without prior stripping. (3) The application must not perform independent server-side sanitization of namespace-prefixed elements before passing content to the Angular compiler. Exploitation is limited by the rarity of the runtime-JIT-with-user-input pattern; authentication requirements depend on the individual application's access controls, not on the vulnerability itself. Angular applications compiled with AOT (the default in Angular CLI production builds) are not in scope. |
| Impact | No CVSS score has been assigned by NVD or the Angular team at time of analysis; the following assessment is independently derived. EPSS data is unavailable and no CISA KEV listing exists, meaning no confirmed active exploitation has been recorded. The practical blast radius is significantly narrowed by the exploitation preconditions: the application must use Angular's JIT compiler to process user-supplied template strings at runtime, a pattern that is explicitly discouraged in Angular's security documentation and absent from the AOT (Ahead-of-Time) compilation default used in production builds. Applications using strictly static templates compiled at build time are not affected regardless of Angular version. For the minority of Angular applications that do expose runtime template compilation to user input - such as CMS platforms, no-code/low-code builders, or dynamic form renderers - the risk is high, as the bypass is clean and the XSS payload executes with full same-origin privileges in the victim's browser. The public PR diffs (#68689, #68868) reveal the exact bypass mechanism (namespace prefix prepended to 'script'), which lowers the effort required to develop a working exploit. Overall: low-urgency patch for standard deployments, high-urgency patch for runtime-JIT applications. |
| Exploit ScenarioDerived | An attacker targeting an Angular application that dynamically compiles user-submitted content as templates - such as a custom dashboard builder or a CMS with Angular-rendered previews - submits a widget template containing |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 15, 2026
Cross-site scripting execution is possible in Angular applications (@angular/compiler and @angular/core) through a dual-bypass of the framework's template sanitization engine using XML namespace prefixes. The Angular template preparser used a simple string comparison for 'script' that failed to match namespaced representations such as ':svg:script', allowing those elements to survive template compilation unstripped. Concurrently, the security context schema mappings for namespaced SVG and MathML attributes were incomplete, allowing malicious attribute bindings to evade both compile-time and runtime sanitizers. No public exploit has been identified at time of analysis, and exploitation requires the specific non-default deployment condition of runtime JIT template compilation with user-controlled input.
RemediationAI
Vendor-released patches are available; upgrade @angular/core and @angular/compiler to one of the following fixed versions: 19.2.22 or 19.2.23 (verify exact v19 fix version against npm for your minor branch), 20.3.22, 21.2.15, or 22.0.0-rc.2. Both packages must be upgraded together as the fixes span compiler and runtime components. The patch PRs are https://github.com/angular/angular/pull/68689 and https://github.com/angular/angular/pull/68868. If an immediate upgrade is not feasible, the most effective compensating control is to disable or remove any code path that passes user-controlled strings into Angular's JIT compiler (e.g., uses of JitCompilerFactory, platformBrowserDynamic with dynamic templates, or eval-equivalent template rendering APIs) - this eliminates the attack surface entirely and has no side effects on AOT-compiled code. If runtime template compilation is a required product feature, implement server-side allowlist filtering of namespace-prefixed tag names (rejecting any input containing 'svg:', 'math:', or ':svg:' prefixes) before passing content to the Angular compiler. Note that client-side pre-filtering alone is insufficient as a control, as it can be bypassed directly via API calls.
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
The vulnerability resides in two cooperating Angular packages: @angular/compiler (CPE: pkg:npm/@angular_compiler) and @angular/core (CPE: pkg:npm/@angular_core). In packages/compiler/src/template_parser/template_preparser.ts, SCRIPT_ELEMENT was a plain string literal 'script', causing the identity check to miss Angular's internal canonical form ':svg:script' used when a browser-namespace prefix is present. The fix widens this to a Set including ':svg:script'. In packages/compiler/src/schema/dom_security_schema.ts and packages/core/src/sanitization/sanitization.ts, SVG script element attributes (src, href, xlink:href) were registered under RESOURCE_URL security context but not consistently applied to namespaced forms, creating a gap through which arbitrary URL-valued attributes could escape sanitization. The root cause class is CWE-79 (Improper Neutralization of Input During Web Page Generation), arising from incomplete allowlist/blocklist coverage when XML namespace prefixes are prepended to otherwise-dangerous element names. A secondary logic bug was also fixed in sanitization_spec.ts: a boolean short-circuit error (SecurityContext.URL || SecurityContext.RESOURCE_URL instead of context === ...) caused security context checks to be trivially bypassed.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
AC:H reflects the three required non-default preconditions; S:C and UI:R reflect classic stored/reflected XSS impact on a third-party victim browser; PR:N because the attacker does not need credentials to the Angular application itself.
Primary rating from Vendor (https://github.com/angular/angular).
CVSS VectorVendor: https://github.com/angular/angular
Lifecycle Timeline
1DescriptionCVE.org
An issue in the @angular/compiler and @angular/core packages allows bypassing element and attribute sanitization/validation through specific namespace workarounds.
Specifically, namespaced script elements (e.g., <svg:script> or <:svg:script>) were not properly identified as script elements by the Angular template preparser, allowing them to pass through template compilation without being stripped.
Furthermore, security context schema mappings for element attributes did not consistently handle attributes within namespaced elements (like SVG and MathML), opening up gaps where malicious namespaced attributes could bypass runtime and compile-time sanitizers.
Combined, these flaws enable an attacker who can inject or supply a template/tag structure with custom namespaces to bypass Angular's script-stripping logic and attribute sanitizers, leading to client-side Cross-Site Scripting (XSS).
Impact
Any Angular application that compiles user-controlled templates at runtime, or relies on sanitization of namespaced elements/attributes, is vulnerable to this security bypass.
Once exploited, this allows a malicious actor to inject a namespaced script element or dynamic attribute bindings, bypassing core sanitization constraints to execute arbitrary JavaScript within the target user's browser context. This could lead to session hijacking, sensitive data exposure, or unauthorized actions on behalf of the user.
Attack Preconditions
To successfully exploit these vulnerabilities, the following environment parameters and application states must all concurrently exist:
- User-Controlled Template Input: The application must accept user-controlled inputs that are directly processed by the Angular template compiler at runtime.
- Namespace Parsing Support: The input structure must employ custom namespace prefixes (such as
<svg:script>) to evade standard tag-name blocklists/checks. - Absence of Additional Context Sanitization: The application does not perform separate input sanitization before feeding values to the Angular compiler.
Patches
- 22.0.0-rc.2
- 21.2.15
- 20.3.22
- 19.2.23
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.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-38257
GHSA-f3m7-gqxr-g87x
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB