# CVE-2026-50557: Google Angular XSS bypass via namespaced elements and attributes

Source: https://junglewise.ai/threats/cve-2026-50557-google-angular-xss-bypass-via-namespaced-elements-and-attributes  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-22. Updated: 2026-06-22  
License: CC BY 4.0 with a link back

CVE-2026-50557 · Severity: medium · CVSS 3.1 · Published 2026-06-22

Angular is a popular framework used to build web and mobile applications. A security flaw in how it handles certain code tags (like SVG or MathML) could allow an attacker to bypass built-in security filters. If an application processes user-provided content through the Angular compiler, an attacker could execute malicious scripts in a victim's browser, potentially leading to account takeover or the theft of sensitive information.

Technologies: [Google Compiler](https://junglewise.ai/threats/technologies/compiler), [@angular/compiler (npm)](https://junglewise.ai/threats/technologies/angular-compiler), [@angular/core (npm)](https://junglewise.ai/threats/technologies/angular-core). Vendors: [Google](https://junglewise.ai/threats/vendors/google), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-50557 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-50557 being exploited in the wild.

**How severe is CVE-2026-50557?** Medium severity, with a CVSS score of 3.1, published 22 June 2026.

**Which products and versions are affected?** Google Compiler <= 18.2.14, >= 19.0.0-next.0, < 19.2.22, >= 20.0.0-next.0, < 20.3.22, >= 21.0.0-next.0, < 21.2.15, >= 22.0.0-next.0, < 22.0.0-rc.2; @angular/compiler (npm) SEMVER:introduced=21.0.0-next.0,fixed=21.2.15; @angular/core (npm) SEMVER:introduced=21.0.0-next.0,fixed=21.2.15.

**Is there a fix for CVE-2026-50557?** Yes. @angular/compiler (npm): upgrade to 21.2.15 or later; @angular/core (npm): upgrade to 21.2.15 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-50557 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-50557?** Check whether you run Google Compiler, @angular/compiler (npm) or @angular/core (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @angular/compiler (npm): upgrade to 21.2.15 or later

  ```sh
  npm install @angular/compiler@21.2.15
  ```

- @angular/core (npm): upgrade to 21.2.15 or later

  ```sh
  npm install @angular/core@21.2.15
  ```


## Technical details

A vulnerability exists in the @angular/compiler and @angular/core packages where the template preparser fails to correctly identify and strip namespaced script elements (e.g., <svg:script>). Additionally, security context schema mappings for attributes within namespaced elements like SVG and MathML were inconsistent, allowing malicious attributes to bypass both runtime and compile-time sanitizers. An attacker can exploit this by providing a crafted template structure using custom namespaces. This bypasses Angular's script-stripping logic and attribute sanitization, resulting in client-side Cross-Site Scripting (XSS). The vulnerability primarily affects applications that compile user-controlled templates at runtime. Patches are available in versions 19.2.22, 20.3.22, 21.2.15, and 22.0.0-rc.2.

## Affected products

- Google Angular < 19.2.22, >= 19.0.0-next.0 < 19.2.22, >= 20.0.0-next.0 < 20.3.22, >= 21.0.0-next.0 < 21.2.15, >= 22.0.0-next.0 < 22.0.0-rc.2

## Identifiers

- CVE-2026-50557
- GHSA-f3m7-gqxr-g87x

## Timeline

- 2026-05-12: other: Initial pull request for SVG script stripping submitted
- 2026-06-05: advisory: GitHub Security Advisory GHSA-f3m7-gqxr-g87x published
- 2026-06-22: disclosed: CVE-2026-50557 published to NVD

## References

- [https://github.com/angular/angular/pull/68689](https://github.com/angular/angular/pull/68689)
- [https://github.com/angular/angular/pull/68868](https://github.com/angular/angular/pull/68868)
- [https://github.com/angular/angular/security/advisories/GHSA-f3m7-gqxr-g87x](https://github.com/angular/angular/security/advisories/GHSA-f3m7-gqxr-g87x)

## Related threats

- [Angular sanitization bypass in directive host bindings](https://junglewise.ai/threats/cve-2026-88057-angular-sanitization-bypass-in-directive-host-bindings)
- [Angular i18n Cross-Site Scripting via event-handler attributes](https://junglewise.ai/threats/cve-2026-69151-angular-i18n-cross-site-scripting-via-event-handler-attributes)
- [Google Angular DOM Clobbering in Client Hydration](https://junglewise.ai/threats/cve-2026-54267-google-angular-dom-clobbering-in-client-hydration)
- [Google Angular XSS via two-way property binding bypass in @angular/compiler](https://junglewise.ai/threats/cve-2026-54265-google-angular-xss-via-two-way-property-binding-bypass-in-angular)
- [Angular XSS via dynamic component mounting on script elements](https://junglewise.ai/threats/cve-2026-52725-angular-xss-via-dynamic-component-mounting-on-script-elements)
