CVE-2026-27970: @angular/core Cross-Site Scripting Vulnerability
HIGHCVE-2026-27970 is a HIGH (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @angular/core libraries in the npm ecosystem. The issue involves angular i18n vulnerable to cross-site scripting. Remediation is available by upgrading affected packages to version 21.2.0, 21.1.6, 20.3.17, 19.2.19.
CVE-2026-27970 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-27970
To remediate this vulnerability, upgrade all affected @angular/core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @angular/core@21.2.0
npm install @angular/core@21.1.6
npm install @angular/core@20.3.17
npm install @angular/core@19.2.19
npm install @angular/core@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @angular/core
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-27970, inspect your project dependencies using npm:
npm ls @angular/core
Analyze the terminal output to locate any version of @angular/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 21.2.0), your application is affected.
Note: The npm ls @angular/core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In @angular/core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-27970 Affected @angular/core Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@angular/core
|
npm |
≥ 21.2.0-next.0
< 21.2.0
|
21.2.0
|
|
@angular/core
|
npm |
≥ 21.0.0-next.0
< 21.1.6
|
21.1.6
|
|
@angular/core
|
npm |
≥ 20.0.0-next.0
< 20.3.17
|
20.3.17
|
|
@angular/core
|
npm |
≥ 19.0.0-next.0
< 19.2.19
|
19.2.19
|
|
@angular/core
|
npm |
≤ 18.2.14
|
|
References
Frequently Asked Questions
What is CVE-2026-27970?
Which @angular/core versions are affected?
What version fixes CVE-2026-27970?
Is @angular/core affected?
What is the CVSS score of CVE-2026-27970?
What CWE is associated with CVE-2026-27970?
How can I check npm dependencies for CVE-2026-27970?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-prjf-86w9-mfqv",
"modified" : "2026-02-27T18:33:16Z",
"published" : "2026-02-27T18:33:16Z",
"aliases" : [ "CVE-2026-27970" ],
"summary" : "Angular i18n vulnerable to Cross-Site Scripting",
"details" : "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.\n\nAngular 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.\n\nIf the returned translations have malicious content, it could be rendered into the application and execute arbitrary JavaScript.\n\n### Impact\nWhen 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:\n\n- **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.\n- **Page Vandalism:** Mutating the page to read or act differently than intended by the developer.\n\n### Attach Preconditions\n\n- **The attacker must compromise the translation file (xliff, xtb, etc.).**\n- 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.\n- The victim application must use Angular i18n.\n- The victim application must use one or more ICU messages.\n- The victim application must render an ICU message.\n- 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).\n\n### Patches\n- 21.2.0\n- 21.1.6\n- 20.3.17\n- 19.2.19\n\n### Workarounds\nUntil the patch is applied, developers should consider:\n\n- **Reviewing and verifying translated content** received from untrusted third parties before incorporating it in an Angular application.\n- **Enabling strict CSP controls** to block unauthorized JavaScript from executing on the page.\n- [**Enabling Trusted Types**](https://angular.dev/best-practices/security#enforcing-trusted-types) to enforce proper HTML sanitization.\n\n### References\n\n- [Fix](https://github.com/angular/angular/pull/67183)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "21.2.0-next.0"
}, {
"fixed" : "21.2.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 21.2.0-rc.0"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "21.0.0-next.0"
}, {
"fixed" : "21.1.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 21.1.5"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "20.0.0-next.0"
}, {
"fixed" : "20.3.17"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 20.3.16"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "19.0.0-next.0"
}, {
"fixed" : "19.2.19"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 19.2.18"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "18.2.14"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/angular/angular/security/advisories/GHSA-prjf-86w9-mfqv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27970"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/pull/67183"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/commit/306f367899dfc2e04238fecd3455547b5d54075d"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/commit/7d58b798c626bb0e4e5f89ca8affdce4f352b232"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/commit/b85830953281ff3a1a77bbfe69019d352d509c93"
}, {
"type" : "WEB",
"url" : "https://angular.dev/best-practices/security#enforcing-trusted-types"
}, {
"type" : "WEB",
"url" : "https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API"
}, {
"type" : "WEB",
"url" : "https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP"
}, {
"type" : "WEB",
"url" : "https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/XSS"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/angular/angular"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-27T18:33:16Z",
"nvd_published_at" : "2026-02-26T02:16:24Z"
}
}