Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.2%top 90%

Core: Angular: Template and Attribute Namespace Sanitization Bypass (XSS) (CVE-2026-50557)

0
Medium
Published: 06/15/2026 (06/15/2026, 17:21:58 UTC)
Source: GCVE Database
Product: @angular/core

Description

A vulnerability in Angular's @angular/compiler and @angular/core packages allows bypassing element and attribute sanitization via namespaced elements and attributes, such as <svg:script>. This enables attackers who can supply user-controlled templates with custom namespaces to inject script elements or malicious attributes, leading to client-side Cross-Site Scripting (XSS). The issue affects Angular versions up to 18.2.14 and requires runtime compilation of user templates without additional sanitization. Fixed versions include 19.2.23 and later.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Affected software

npmghsa
@angular/core
Affected versions
>=21.0.0-next.0 <21.2.15
npmghsa
@angular/core
Affected versions
>=22.0.0-next.0 <22.0.0-rc.2
npmghsa
@angular/core
Affected versions
>=20.0.0-next.0 <20.3.22
npmghsa
@angular/core
Affected versions
>=19.0.0-next.0 <19.2.22
npmghsa
@angular/core
Affected versions
<=18.2.14
npmghsa
@angular/compiler
Affected versions
>=21.0.0-next.0 <21.2.15
npmghsa
@angular/compiler
Affected versions
>=22.0.0-next.0 <22.0.0-rc.2
npmghsa
@angular/compiler
Affected versions
>=20.0.0-next.0 <20.3.22
npmghsa
@angular/compiler
Affected versions
>=19.0.0-next.0 <19.2.22
npmghsa
@angular/compiler
Affected versions
<=18.2.14

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/16/2026, 10:54:35 UTC

Technical Analysis

The vulnerability (CVE-2026-50557) arises from improper handling of namespaced elements and attributes in Angular's template compiler and runtime sanitizers. Namespaced script elements like <svg:script> were not recognized as script tags, allowing them to bypass Angular's script-stripping logic. Additionally, attribute sanitization did not consistently apply to attributes within namespaced elements (e.g., SVG, MathML), creating gaps for malicious attribute injection. Exploitation requires an Angular application that compiles user-controlled templates at runtime and does not perform separate input sanitization. This leads to client-side XSS by executing arbitrary JavaScript in the user's browser context.

Potential Impact

Successful exploitation allows attackers to inject script elements or malicious attributes that bypass Angular's sanitization, resulting in client-side Cross-Site Scripting (XSS). This can lead to session hijacking, exposure of sensitive information, or unauthorized actions performed on behalf of the user. The vulnerability specifically affects applications that compile user-supplied templates at runtime and rely on Angular's sanitization for namespaced elements and attributes.

Mitigation Recommendations

Official fixes are available in Angular versions 19.2.23, 20.3.22, 21.2.15, and 22.0.0-rc.2. Users should upgrade to one of these versions or later to remediate the vulnerability. Applications should avoid compiling user-controlled templates at runtime or implement additional input sanitization before template compilation to reduce risk. Patch status is confirmed by the vendor advisory. No additional mitigations are indicated beyond applying the official fixes or avoiding the vulnerable usage pattern.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-f3m7-gqxr-g87x
Osv Schema Version
1.4.0
Aliases
["CVE-2026-50557"]
Ecosystems
["npm"]
Database Specific Severity
MODERATE
Cvss Version
4.0

Threat ID: 6a58b41268715ace43d68279

Added to database: 07/16/2026, 10:36:02 UTC

Last enriched: 07/16/2026, 10:54:35 UTC

Last updated: 07/31/2026, 19:22:59 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses