Angular, Sanitization Bypass, CVE-2026-88057 (Medium) -DC-Sep2026-2342

Listen to this Post

Angular automatically sanitizes untrusted values bound to security-sensitive DOM sinks such as href, src, action, xlink:href, and data to protect against Cross-Site Scripting (XSS). Prior to the fix, the Angular compiler determined the SecurityContext for directive host bindings (host: {‘[attr.href]’: ‘value’} or @HostBinding(‘attr.href’)) based solely on the declaring directive or component selector at compile time, rather than the concrete host element that the directive was applied to. When a directive with a security-sensitive host binding was applied to a different concrete host element—such as through hostDirectives composition, Class inheritance of host bindings, Dynamic component instantiation (createComponent with custom hostElement or dynamic directives), Elements with SVG/MathML namespaces (e.g. , ), or Elements using tag-neutral selectors (e.g. :not(…)), the compiler either failed to associate a sanitizer with the host binding or attached an incorrect security context. As a result, untrusted inputs (e.g. javascript:… URLs) bound via the host binding would be written to the DOM attribute without passing through Angular’s built-in sanitizer. An attacker capable of controlling the value bound to an affected directive host binding could execute arbitrary JavaScript in the user’s browser context (Cross-Site Scripting). This issue has been resolved in versions 20.3.28, 21.2.20, and 22.1.0. Applications unable to upgrade can explicitly sanitize using DomSanitizer.sanitize(SecurityContext.URL, …) before assignment or restrict inputs to validated safe URL schemes such as http:// and https://.

DailyCVE Form:

Platform: Angular
Version: 20.3.28 21.2.20 22.1.0
Vulnerability: Sanitization Bypass
Severity: Medium
date: 2026-09-10

Prediction: 2026-09-10

What Undercode Say:

Analytics:

  • Check Angular version: `ng version`
    – Verify vulnerable pattern: `grep -r “HostBinding.attr.href” src/`
    – Test sanitization bypass with malicious URL: `javascript:alert(1)`

Exploit: (Educational Purposes!)

// Vulnerable directive
@Directive({ selector: 'a' })
export class LinkDirective {
@HostBinding('attr.href') href: string;
}
// Attacker-controlled input
// href = 'javascript:alert("XSS")'

Protection: from this CVE

import { DomSanitizer, SecurityContext } from '@angular/platform-browser';
constructor(private sanitizer: DomSanitizer) {}
const safeUrl = this.sanitizer.sanitize(SecurityContext.URL, userInput);
// Or validate: /^https?:\/\//i.test(userInput)

Impact:

Arbitrary JavaScript execution, session hijacking, data theft, and full Cross-Site Scripting within the user’s browser context.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top