@angular/core is vulnerable to Cross-Site Scripting (XSS)
53
CVE Score
Medium
Cross-Site Scripting (XSS)
Angular's dynamic component creation API infers a component's host element from the component selector when no explicit host node is provided. The guard that rejects <script> tags as host elements runs only for explicitly located hosts, so a component whose inferred host resolves to a script element is still mounted. When an application passes attacker-influenced selectors or host values to createComponent, a component can be mounted onto a script-executing host, enabling Cross-Site Scripting. The fix moves the script-host rejection into ComponentFactory so both the explicit and the inferred host paths are validated consistently.
Upgrade the @angular/core library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and your application passes user-controlled selectors or host elements to dynamic component creation APIs.
20.0.0 - 20.3.25
Fixed in 20.3.2621.0.0 - 21.2.17
Fixed in 21.2.1822.0.0 - 22.0.4
Fixed in 22.0.5@angular/core is vulnerable to Cross-Site Scripting (XSS) in versions 20.0.0 - 20.3.25, 21.0.0 - 21.2.17 and 22.0.0 - 22.0.4.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.