CVE-2026-32635: Angular has XSS in i18n attribute bindings

Published Mar 13, 2026
·
Updated

A Cross-Site Scripting (XSS) vulnerability has been identified in the Angular runtime and compiler. It occurs when the application uses a security-sensitive attribute (for example href on an anchor tag) together with Angular's ability to internationalize attributes. Enabling internationalization for the sensitive attribute by adding i18n-<attribute> name bypasses Angular's built-in sanitization mechanism, which when combined with a data binding to untrusted user-generated data can allow an attacker to inject a malicious script.

The following example illustrates the issue: html <a href="{{maliciousUrl}}" i18n-href>Click me</a>

The following attributes have been confirmed to be vulnerable: - action - background - cite - codebase - data - formaction - href - itemtype - longdesc - poster - src - xlink:href

Impact When exploited, this vulnerability allows an attacker to execute arbitrary code within the context of the vulnerable application's domain. This enables: - Session Hijacking: Stealing session cookies and authentication tokens. - Data Exfiltration: Capturing and transmitting sensitive user data. - Unauthorized Actions: Performing actions on behalf of the user.

Attack Preconditions 1. The application must use a vulnerable version of Angular. 2. The application must bind unsanitized user input to one of the attributes mentioned above. 3. The bound value must be marked for internationalization via the presence of a i18n-<name> attribute on the same element.

Patches - 22.0.0-next.3 - 21.2.4 - 20.3.18 - 19.2.20

Workarounds The primary workaround is to ensure that any data bound to the vulnerable attributes is never sourced from untrusted user input (e.g., database, API response, URL parameters) until the patch is applied, or when it is, it shouldn't be marked for internationalization.

Alternatively, users can explicitly sanitize their attributes by passing them through Angular's DomSanitizer: ts import {Component, inject, SecurityContext} from '@angular/core'; import {DomSanitizer} from '@angular/platform-browser';

@Component({ template: <form action="{{url}}" i18n-action> <button>Submit</button> </form> , }) export class App { url: string;

constructor() { const dangerousUrl = 'javascript:alert(1)'; const sanitizer = inject(DomSanitizer); this.url = sanitizer.sanitize(SecurityContext.URL, dangerousUrl) || ''; } }

References - Fix 1 - Fix 2

Other sources

Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.0-next.3, 21.2.4, 20.3.18, and 19.2.20, a Cross-Site Scripting (XSS) vulnerability has been identified in the Angular runtime and compiler. It occurs when the application uses a security-sensitive attribute (for example href on an anchor tag) together with Angular's ability to internationalize attributes. Enabling internationalization for the sensitive attribute by adding i18n-<attribute> name bypasses Angular's built-in sanitization mechanism, which when combined with a data binding to untrusted user-generated data can allow an attacker to inject a malicious script. This vulnerability is fixed in 22.0.0-next.3, 21.2.4, 20.3.18, and 19.2.20.

NVD

Affected Software

19 affected componentsFixes available
npm/@angular/core<22.0.0-next.3
npm/@angular/core<21.2.4
npm/@angular/core<20.3.18
npm/@angular/core<19.2.20
npm/@angular/compiler>=17.0.0-next.0<=18.2.14
npm/@angular/compiler>=19.0.0-next.0<19.2.20
19.2.20
npm/@angular/core>=17.0.0-next.0<=18.2.14
npm/@angular/core>=19.0.0-next.0<19.2.20
19.2.20
npm/@angular/compiler>=20.0.0-next.0.0.0<20.3.18
20.3.18
npm/@angular/compiler>=21.0.0-next.0<21.2.4
21.2.4
npm/@angular/compiler>=22.0.0-next.0<22.0.0-next.3
22.0.0-next.3
npm/@angular/core>=20.0.0-next.0.0.0<20.3.18
20.3.18
npm/@angular/core>=21.0.0-next.0<21.2.4
21.2.4
npm/@angular/core>=22.0.0-next.0<22.0.0-next.3
22.0.0-next.3
angular Angular Cli>=17.0.0<19.2.0
angular Angular Cli>=20.0.0<=20.3.18
angular Angular Cli>=21.0.0<21.2.4
angular Angular Cli=22.0.0-next0
angular Angular Cli=22.0.0-next1

Event History

Mar 13, 2026
Advisory Published
via GitHub·08:56 PM
Data Sourced
via GitHub·08:56 PM
DescriptionWeaknessAffected Software
CVE Published
via MITRE·08:58 PM
Data Sourced
via MITRE·08:58 PM
DescriptionWeakness
Mar 16, 2026
Data Sourced
via NVD·02:19 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:19 PM
RemedyAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-32635?

CVE-2026-32635 is categorized as a Cross-Site Scripting (XSS) vulnerability, which is considered a high severity issue.

2

How do I fix CVE-2026-32635?

To mitigate CVE-2026-32635, ensure you upgrade to Angular versions 19.2.20, 20.3.18, 21.2.4, or 22.0.0-next.3.

3

Which versions of Angular are affected by CVE-2026-32635?

CVE-2026-32635 affects all Angular versions prior to 19.2.20, 20.3.18, 21.2.4, and 22.0.0-next.3.

4

What are the implications of CVE-2026-32635 for web applications?

The implications of CVE-2026-32635 include potential unauthorized access and manipulation of data due to XSS attacks.

5

Is user input validation enough to protect against CVE-2026-32635?

User input validation alone is not sufficient; upgrading to the patched Angular versions is essential to fully protect against CVE-2026-32635.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203