Executive brief
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.
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
Timeline
- 2026-05-28: advisory: GitHub Security Advisory GHSA-692r-grfm-v8x7 published
- 2026-06-22: disclosed: CVE-2026-52725 published to NVD