CVE-2026-52725 Angular Template and Dynamic Component Namespace Bypass leading to Cross-Site Scripting (XSS)

Medium 5.3 Published Updated

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.

PackageAffectedFixed in
@angular/core npmAll versions to 18.2.14None
@angular/core npmAll versions to 18.2.14None
@angular/core npmFrom 19.0.0-next.019.2.23
@angular/core npmFrom 19.0.0-next.019.2.23
@angular/core npmFrom 20.0.0-next.020.3.22
@angular/core npmFrom 20.0.0-next.020.3.22
4 more packages
@angular/core npmFrom 21.0.0-next.021.2.15
@angular/core npmFrom 21.0.0-next.021.2.15
@angular/core npmFrom 22.0.0-next.022.0.0-rc.2
@angular/core npmFrom 22.0.0-next.022.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.

Sources

Also known as CLSA-2026-1792931815, DEBIAN-CVE-2026-52725, GHSA-692r-grfm-v8x7, UBUNTU-CVE-2026-52725.

Is CVE-2026-52725 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free