Mittel

Angular: Template and Attribute Namespace Sanitization Bypass (XSS)

  • Veröffentlicht: 15.06.2026
  • Aktualisiert: 11.10.2026 10:22

An issue in the @angular/compiler and @angular/core packages allows bypassing element and attribute sanitization/validation through specific namespace workarounds.

Specifically, namespaced script elements (e.g., <svg:script> or <:svg:script>) were not properly identified as script elements by the Angular template preparser, allowing them to pass through template compilation without being stripped.

Furthermore, security context schema mappings for element attributes did not consistently handle attributes within namespaced elements (like SVG and MathML), opening up gaps where malicious namespaced attributes could bypass runtime and compile-time sanitizers.

Combined, these flaws enable an attacker who can inject or supply a template/tag structure with custom namespaces to bypass Angular's script-stripping logic and attribute sanitizers, leading to client-side Cross-Site Scripting (XSS).

Impact

Any Angular application that compiles user-controlled templates at runtime, or relies on sanitization of namespaced elements/attributes, is vulnerable to this security bypass.

Once exploited, this allows a malicious actor to inject a namespaced script element or dynamic attribute bindings, bypassing core sanitization constraints to execute arbitrary JavaScript within the target user's browser context. This could lead to session hijacking, sensitive data exposure, or unauthorized actions on behalf of the user.

Attack Preconditions

To successfully exploit these vulnerabilities, the following environment parameters and application states must all concurrently exist:

  1. User-Controlled Template Input: The application must accept user-controlled inputs that are directly processed by the Angular template compiler at runtime.
  2. Namespace Parsing Support: The input structure must employ custom namespace prefixes (such as <svg:script>) to evade standard tag-name blocklists/checks.
  3. Absence of Additional Context Sanitization: The application does not perform separate input sanitization before feeding values to the Angular compiler.

Patches

  • 22.0.0-rc.2
  • 21.2.15
  • 20.3.22
  • 19.2.23

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket @angular/compiler >= 21.0.0-next.0, < 21.2.15, >= 22.0.0-next.0, < 22.0.0-rc.2, >= 20.0.0-next.0, < 20.3.22, >= 19.0.0-next.0, < 19.2.22, <= 18.2.14 21.2.15, 22.0.0-rc.2, 20.3.22, 19.2.22
npm-Paket @angular/core >= 21.0.0-next.0, < 21.2.15, >= 22.0.0-next.0, < 22.0.0-rc.2, >= 20.0.0-next.0, < 20.3.22, >= 19.0.0-next.0, < 19.2.22, <= 18.2.14 21.2.15, 22.0.0-rc.2, 20.3.22, 19.2.22

Verweise

CVSS-Wert 6.1/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Schwäche (CWE)
CWE-79
Plattform
npm
Paket
@angular/compiler, @angular/core
Veröffentlicht
15.06.2026
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-f3m7-gqxr-g87x - CC BY 4.0

Schwachstellenhistorie: @angular/compiler

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Einträge insgesamt
7
Erste → letzte
12.2025 09.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 4
  • Mittel 3

Veröffentlichungen pro Jahr

  1. 2025: 1
  2. 2026: 6
  1. Mittel CVE-2026-88057 >= 22.0.0, < 22.1.0, >= 21.0.0, < 21.2.20, >= 20.0.0, < 20.3.28, <= 19.2.25 22.1.0, 21.2.20, 20.3.28
  2. Hoch CVE-2026-69151 >= 22.0.0-next.0, < 22.0.1, >= 21.0.0-next.0, < 21.2.19, >= 20.0.0-next.0, < 20.3.27, <= 19.2.25 22.0.1, 21.2.19, 20.3.27
  3. Mittel · 6.1 CVE-2026-54265 >= 22.0.0-next.0, < 22.0.1, >= 21.0.0-next.0, < 21.2.17, >= 20.0.0-next.0, < 20.3.25, <= 19.2.25 22.0.1, 21.2.17, 20.3.25
  4. Angular: Template and Attribute Namespace Sanitization Bypass (XSS) dieser Eintrag
    Mittel · 6.1 CVE-2026-50557 >= 21.0.0-next.0, < 21.2.15, >= 22.0.0-next.0, < 22.0.0-rc.2, >= 20.0.0-next.0, < 20.3.22, >= 19.0.0-next.0, < 19.2.22, <= 18.2.14 21.2.15, 22.0.0-rc.2, 20.3.22, 19.2.22
  5. Hoch · 9.0 CVE-2026-32635 >= 22.0.0-next.0, < 22.0.0-next.3, >= 21.0.0-next.0, < 21.2.4, >= 20.0.0-next.0.0.0, < 20.3.18, >= 19.0.0-next.0, < 19.2.20, >= 17.0.0-next.0, <= 18.2.14 22.0.0-next.3, 21.2.4, 20.3.18, 19.2.20
  6. Hoch CVE-2026-22610 >= 21.1.0-next.0, < 21.1.0-rc.0, >= 21.0.0-next.0, < 21.0.7, >= 20.0.0-next.0, < 20.3.16, >= 19.0.0-next.0, < 19.2.18, <= 18.2.14 21.1.0-rc.0, 21.0.7, 20.3.16, 19.2.18
  7. Hoch CVE-2025-66412 >= 21.0.0-next.0, < 21.0.2, >= 20.0.0-next.0, < 20.3.15, >= 19.0.0-next.0, < 19.2.17, <= 18.2.14 21.0.2, 20.3.15, 19.2.17

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.