CVE-2026-52725 Angular Template and Dynamic Component Namespace Bypass leading to Cross-Site Scripting (XSS)
Attackers can inject scripts by mounting Angular components onto script tags, leading to client-side code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-52725?
CVE-2026-52725 is a medium-severity cross-site scripting vulnerability in angular, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.0-rc.2, 21.2.15, 20.3.22, and 19.2.23, an issue in the @angular/core package allows bypassing script-execution restrictions during dynamic component creation. Specifically, 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. This 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). This vulnerability is fixed in 22.0.0-rc.2, 21.2.15, 20.3.22, and 19.2.23.
Weakness: CWE-79
Which versions are affected by CVE-2026-52725?
10 open source packages ship an affected version, including @angular/core. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
@angular/core npm | All versions to 18.2.14 | None |
@angular/core npm | All versions to 18.2.14 | None |
@angular/core npm | From 19.0.0-next.0 | 19.2.23 |
@angular/core npm | From 19.0.0-next.0 | 19.2.23 |
@angular/core npm | From 20.0.0-next.0 | 20.3.22 |
@angular/core npm | From 20.0.0-next.0 | 20.3.22 |
4 more packages
@angular/core npm | From 21.0.0-next.0 | 21.2.15 |
@angular/core npm | From 21.0.0-next.0 | 21.2.15 |
@angular/core npm | From 22.0.0-next.0 | 22.0.0-rc.2 |
@angular/core npm | From 22.0.0-next.0 | 22.0.0-rc.2 |
Products include Angular Angular.
How do I fix CVE-2026-52725?
Upgrade @angular/core to a fixed version for your release line: 19.2.23, 20.3.22, 21.2.15 or 22.0.0-rc.2.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-52725 being exploited?
There is no known exploitation of CVE-2026-52725 in the wild and no public exploit code.
Other vulnerabilities in angular
- CVE-2026-68945 Angular: Cache-Key Ambiguity in HttpTransferCache Leading to Cross-Request Response Reuse and State Poisoning
- CVE-2026-46417 Angular: SSRF via Hostname Hijacking in @angular/platform-server
- CVE-2026-50168 Angular: URL Parser Differential in @angular/platform-server leading to SSRF Allowlist Bypass
- CVE-2026-54266 Angular: Weak 32-Bit Cache Key Hashing in `HttpTransferCache` Leading to Cross-Request Data Leakage and State Poisoning
- CVE-2026-41423 Angular: SSRF via protocol-relative and backslash URLs in Angular Platform-Server
Sources
Also known as CLSA-2026-1792931815, DEBIAN-CVE-2026-52725, GHSA-692r-grfm-v8x7, UBUNTU-CVE-2026-52725.