Skip to main content

Angular: Sanitization bypass via directive host bindings on concrete host elements in @angular/core and @angular/compiler (CVE-2026-88057)

0
Medium
Published: 09/10/2026 (09/10/2026, 20:18:02 UTC)
Source: GCVE Database
Product: @angular/core

Description

A vulnerability in Angular's @angular/core and @angular/compiler allows sanitization bypass via directive host bindings on certain concrete host elements. This occurs because the Angular compiler incorrectly determines the security context for directive host bindings based on the directive or component selector rather than the actual host element. This flaw can lead to untrusted inputs, such as javascript: URLs, being inserted into DOM attributes without sanitization, enabling Cross-Site Scripting (XSS) attacks. The issue affects multiple Angular versions prior to patched releases. Official patches are available in versions 22.1.0, 21.2.20, and 20.3.28. Users are advised to sanitize inputs explicitly or restrict URL schemes as a workaround.

CVSS v4.0

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

Affected software

npmghsa
@angular/core
Affected versions
>=22.0.0 <22.1.0
npmghsa
@angular/compiler
Affected versions
>=22.0.0 <22.1.0
npmghsa
@angular/core
Affected versions
>=21.0.0 <21.2.20
npmghsa
@angular/compiler
Affected versions
>=21.0.0 <21.2.20
npmghsa
@angular/core
Affected versions
>=20.0.0 <20.3.28
npmghsa
@angular/compiler
Affected versions
>=20.0.0 <20.3.28
npmghsa
@angular/core
Affected versions
<=19.2.25
npmghsa
@angular/compiler
Affected versions
<=19.2.25

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: 09/10/2026, 22:06:31 UTC

Technical Analysis

Angular automatically sanitizes untrusted values bound to security-sensitive DOM sinks to prevent XSS. Prior to the fix, the Angular compiler determined the SecurityContext for directive host bindings based on the declaring directive or component selector at compile time, not the concrete host element. When directives with security-sensitive host bindings were applied to different concrete host elements (e.g., via hostDirectives composition, class inheritance, dynamic component instantiation, SVG/MathML elements, or tag-neutral selectors), the compiler failed to associate the correct sanitizer or security context. This allowed untrusted inputs bound via host bindings to be written to DOM attributes without sanitization, enabling arbitrary JavaScript execution in the user's browser. The vulnerability is tracked as CVE-2026-88057 and has been patched in Angular versions 22.1.0, 21.2.20, and 20.3.28.

Potential Impact

An attacker who can control values bound to affected directive host bindings can execute arbitrary JavaScript in the context of the user's browser, resulting in Cross-Site Scripting (XSS). This compromises user security by potentially stealing data, hijacking sessions, or performing actions on behalf of the user.

Mitigation Recommendations

A fix is available in Angular versions 22.1.0, 21.2.20, and 20.3.28; upgrading to these versions or later is recommended. As a workaround, explicitly sanitize any user-controlled values assigned to directive host bindings using DomSanitizer.sanitize(SecurityContext.URL, ...) before assignment, or restrict inputs to validated safe URL schemes such as http:// and https://.

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-hh8m-fm6v-7cvg
Osv Schema Version
1.4.0
Aliases
["CVE-2026-88057"]
Ecosystems
["npm"]
Database Specific Severity
MODERATE
Cvss Version
4.0

Threat ID: 6aa3295e91cc7f3848d18df6

Added to database: 09/10/2026, 22:04:14 UTC

Last enriched: 09/10/2026, 22:06:31 UTC

Last updated: 09/10/2026, 22:06:31 UTC

Views: 1

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