Intel

AIKIDO-2026-618845

@angular/core is vulnerable to Cross-Site Scripting (XSS)

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 22, 2026
July 22, 2026

53

CVE Score

Medium

Cross-Site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the @angular/core library to the patch version.

Who does this affect?

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.

Versions

20.0.0 - 20.3.25

Fixed in 20.3.26

21.0.0 - 21.2.17

Fixed in 21.2.18

22.0.0 - 22.0.4

Fixed in 22.0.5

Background info

@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.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea