# CVE-2026-52725: Angular XSS via dynamic component mounting on script elements

Source: https://junglewise.ai/threats/cve-2026-52725-angular-xss-via-dynamic-component-mounting-on-script-elements  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-22. Updated: 2026-06-22  
License: CC BY 4.0 with a link back

CVE-2026-52725 · Severity: medium · CVSS 3.1 · Published 2026-06-22

Angular, a popular framework for building web applications, contains a security flaw in how it handles the dynamic creation of website components. If an application allows users to influence which parts of a page are updated, an attacker could trick the system into running malicious scripts in other users' browsers. This could lead to the theft of login sessions, exposure of sensitive personal data, or unauthorized actions being performed on behalf of the user.

Technologies: [@angular/core (npm)](https://junglewise.ai/threats/technologies/angular-core). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-52725 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-52725 being exploited in the wild.

**How severe is CVE-2026-52725?** Medium severity, with a CVSS score of 3.1, published 22 June 2026.

**Which products and versions are affected?** @angular/core (npm) SEMVER:introduced=21.0.0-next.0,fixed=21.2.15.

**Is there a fix for CVE-2026-52725?** Yes. @angular/core (npm): upgrade to 21.2.15 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-52725 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-52725?** Check whether you run @angular/core (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @angular/core (npm): upgrade to 21.2.15 or later

  ```sh
  npm install @angular/core@21.2.15
  ```


## Technical details

A cross-site scripting (XSS) vulnerability exists in the @angular/core package due to insufficient validation in the 'createComponent' function. The mechanism fails to reject mounting components directly onto <script> or namespaced script elements (such as <svg:script>). An attacker who can control the host element or selector parameter passed to 'createComponent' can bypass script-execution restrictions to inject and execute arbitrary JavaScript. This requires the application to accept user-controlled inputs for dynamic component selectors without additional sanitization. The issue is resolved in versions 19.2.23, 20.3.22, 21.2.15, and 22.0.0-rc.2.

## Affected products

- Google Angular < 19.2.23, >= 20.0.0-next.0 < 20.3.22, >= 21.0.0-next.0 < 21.2.15, >= 22.0.0-next.0 < 22.0.0-rc.2

## Identifiers

- CVE-2026-52725
- GHSA-692r-grfm-v8x7

## Timeline

- 2026-05-28: advisory: GitHub Security Advisory GHSA-692r-grfm-v8x7 published
- 2026-06-22: disclosed: CVE-2026-52725 published to NVD

## References

- [https://github.com/angular/angular/pull/68686](https://github.com/angular/angular/pull/68686)
- [https://github.com/angular/angular/pull/68713](https://github.com/angular/angular/pull/68713)
- [https://github.com/angular/angular/security/advisories/GHSA-692r-grfm-v8x7](https://github.com/angular/angular/security/advisories/GHSA-692r-grfm-v8x7)

## Related threats

- [Angular sanitization bypass in directive host bindings](https://junglewise.ai/threats/cve-2026-88057-angular-sanitization-bypass-in-directive-host-bindings)
- [Angular i18n Cross-Site Scripting via event-handler attributes](https://junglewise.ai/threats/cve-2026-69151-angular-i18n-cross-site-scripting-via-event-handler-attributes)
- [Google Angular DOM Clobbering in Client Hydration](https://junglewise.ai/threats/cve-2026-54267-google-angular-dom-clobbering-in-client-hydration)
- [Google Angular XSS bypass via namespaced elements and attributes](https://junglewise.ai/threats/cve-2026-50557-google-angular-xss-bypass-via-namespaced-elements-and-attributes)
- [Angular XSS in i18n attribute bindings](https://junglewise.ai/threats/cve-2026-32635-angular-xss-in-i18n-attribute-bindings)
