Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:npm/%40angular/core@21.2.0-rc.0
purl pkg:npm/%40angular/core@21.2.0-rc.0
Next non-vulnerable version 21.2.4
Latest non-vulnerable version 22.0.0-next.3
Risk 4.0
Vulnerabilities affecting this package (2)
Vulnerability Summary Fixed by
VCID-1j73-ybyt-p7hh
Aliases:
CVE-2026-32635
GHSA-g93w-mfhg-p222
Angular vulnerable to XSS in i18n attribute bindings 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](https://github.com/angular/angular/pull/67541) - [Fix 2](https://github.com/angular/angular/pull/67561)
21.2.4
Affected by 0 other vulnerabilities.
22.0.0-next.3
Affected by 0 other vulnerabilities.
VCID-qnkc-h667-5bcf
Aliases:
CVE-2026-27970
GHSA-prjf-86w9-mfqv
Angular i18n vulnerable to Cross-Site Scripting A [Cross-site Scripting (XSS)](https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/XSS) vulnerability has been identified in the Angular internationalization (i18n) pipeline. In ICU messages (International Components for Unicode), HTML from translated content was not properly sanitized and could execute arbitrary JavaScript. Angular i18n typically involves three steps, extracting all messages from an application in the source language, sending the messages to be translated, and then merging their translations back into the final source code. Translations are frequently handled by contracts with specific partner companies, and involve sending the source messages to a separate contractor before receiving final translations for display to the end user. If the returned translations have malicious content, it could be rendered into the application and execute arbitrary JavaScript. ### Impact When successfully exploited, this vulnerability allows for execution of attacker controlled JavaScript in the application origin. Depending on the nature of the application being exploited this could lead to: - **Credential Exfiltration**: Stealing sensitive user data stored in page memory, LocalStorage, IndexedDB, or cookies available to JS and sending them to an attacker controlled server. - **Page Vandalism:** Mutating the page to read or act differently than intended by the developer. ### Attach Preconditions - **The attacker must compromise the translation file (xliff, xtb, etc.).** - Unlike most XSS vulnerabilities, this one is not exploitable by arbitrary users. An attacker must first compromise an application's translation file before they can escalate privileges into the Angular application client. - The victim application must use Angular i18n. - The victim application must use one or more ICU messages. - The victim application must render an ICU message. - The victim application must not defend against XSS via a safe [Content-Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) or [Trusted Types](https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API). ### Patches - 21.2.0 - 21.1.6 - 20.3.17 - 19.2.19 ### Workarounds Until the patch is applied, developers should consider: - **Reviewing and verifying translated content** received from untrusted third parties before incorporating it in an Angular application. - **Enabling strict CSP controls** to block unauthorized JavaScript from executing on the page. - [**Enabling Trusted Types**](https://angular.dev/best-practices/security#enforcing-trusted-types) to enforce proper HTML sanitization. ### References - [Fix](https://github.com/angular/angular/pull/67183)
21.2.0
Affected by 1 other vulnerability.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-04-17T00:40:45.092049+00:00 GitLab Importer Affected by VCID-1j73-ybyt-p7hh https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/@angular/core/CVE-2026-32635.yml 38.4.0
2026-04-17T00:27:30.535151+00:00 GitLab Importer Affected by VCID-qnkc-h667-5bcf https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/@angular/core/CVE-2026-27970.yml 38.4.0
2026-04-13T14:31:31.842474+00:00 GitLab Importer Affected by VCID-1j73-ybyt-p7hh https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/@angular/core/CVE-2026-32635.yml 38.3.0
2026-04-12T01:52:09.878622+00:00 GitLab Importer Affected by VCID-qnkc-h667-5bcf https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/@angular/core/CVE-2026-27970.yml 38.3.0
2026-04-03T02:00:28.069307+00:00 GitLab Importer Affected by VCID-qnkc-h667-5bcf https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/@angular/core/CVE-2026-27970.yml 38.1.0
2026-04-01T16:08:16.872311+00:00 GHSA Importer Affected by VCID-qnkc-h667-5bcf https://github.com/advisories/GHSA-prjf-86w9-mfqv 38.0.0