CVE-2026-52725: @angular/core Cross-Site Scripting Vulnerability
MODERATECVE-2026-52725 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @angular/core libraries in the npm ecosystem. The issue involves angular template and dynamic component namespace bypass leading to cross-site scripting (xss). Remediation is available by upgrading affected packages to version 21.2.15, 22.0.0-rc.2, 19.2.23, 20.3.22.
CVE-2026-52725 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-52725
To remediate this vulnerability, upgrade all affected @angular/core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @angular/core@21.2.15
npm install @angular/core@22.0.0-rc.2
npm install @angular/core@19.2.23
npm install @angular/core@Latest secure release
npm install @angular/core@20.3.22
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @angular/core
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-52725, inspect your project dependencies using npm:
npm ls @angular/core
Analyze the terminal output to locate any version of @angular/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 21.2.15), your application is affected.
Note: The npm ls @angular/core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In @angular/core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-52725 Affected @angular/core Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@angular/core
|
npm |
≥ 21.0.0-next.0
< 21.2.15
|
21.2.15
|
|
@angular/core
|
npm |
≥ 22.0.0-next.0
< 22.0.0-rc.2
|
22.0.0-rc.2
|
|
@angular/core
|
npm |
≥ 19.0.0-next.0
< 19.2.23
|
19.2.23
|
|
@angular/core
|
npm |
≤ 18.2.14
|
|
|
@angular/core
|
npm |
≥ 20.0.0-next.0
< 20.3.22
|
20.3.22
|
References
Frequently Asked Questions
What is CVE-2026-52725?
Which @angular/core versions are affected?
What version fixes CVE-2026-52725?
Is @angular/core affected?
What is the CVSS score of CVE-2026-52725?
What CWE is associated with CVE-2026-52725?
How can I check npm dependencies for CVE-2026-52725?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-692r-grfm-v8x7",
"modified" : "2026-07-15T22:03:32Z",
"published" : "2026-06-15T16:51:35Z",
"aliases" : [ "CVE-2026-52725" ],
"summary" : "@angular/core: Angular Template and Dynamic Component Namespace Bypass leading to Cross-Site Scripting (XSS)",
"details" : "An issue in the `@angular/core` package allows bypassing script-execution restrictions during dynamic component creation.\n\nSpecifically, the dynamic component instantiation mechanism (`createComponent`) failed to reject mounting components directly onto a `<script>` or namespaced script element (such as `<svg:script>`). This enabled the initialization of custom components on a tag that executes scripts, allowing attackers to hijack or inject script-executing hosts.\n\nThis flaw enables an attacker who can control the host element or selector parameter passed to `createComponent` to initialize or mount an Angular component directly onto a `<script>` tag, leading to execution of untrusted code or client-side Cross-Site Scripting (XSS).\n\n### Impact\nAny Angular application that registers dynamic components based on user-supplied parameters (like selectors or host elements) is vulnerable to this security bypass.\n\nOnce exploited, this allows a malicious actor to mount a dynamic component on a script tag, bypassing core dynamic component creation safeguards 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.\n\n### Attack Preconditions\nTo successfully exploit these vulnerabilities, the following environment parameters and application states must all concurrently exist:\n1. **User-Controlled Host Selection:** The application must accept user-controlled inputs that are passed as a selector/host element to `createComponent`.\n2. **Absence of Additional Context Sanitization:** The application does not perform separate input sanitization before feeding values to the dynamic creation APIs.\n\n### Patches\n* 22.0.0-rc.2\n* 21.2.15\n* 20.3.22\n* 19.2.23",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "21.0.0-next.0"
}, {
"fixed" : "21.2.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "22.0.0-next.0"
}, {
"fixed" : "22.0.0-rc.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "19.0.0-next.0"
}, {
"fixed" : "19.2.23"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 19.2.22"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "18.2.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "20.0.0-next.0"
}, {
"fixed" : "20.3.22"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/angular/angular/security/advisories/GHSA-692r-grfm-v8x7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-52725"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/pull/68686"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/pull/68713"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/angular/angular"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-15T16:51:35Z",
"nvd_published_at" : "2026-06-22T16:16:38Z"
}
}