CVE-2026-27970: @angular/core Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-prjf-86w9-mfqv
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-27970
GHSA Identifier GHSA-prjf-86w9-mfqv
Severity HIGH
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product @angular/core
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

@angular/core fixed: 21.2.0
npm install @angular/core@21.2.0
@angular/core fixed: 21.1.6
npm install @angular/core@21.1.6
@angular/core fixed: 20.3.17
npm install @angular/core@20.3.17
@angular/core fixed: 19.2.19
npm install @angular/core@19.2.19
@angular/core fixed: Latest secure release
npm install @angular/core@Latest secure release
Verify Direct and Transitive Dependencies

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

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)

CVE-2026-27970 Affected @angular/core Versions

5 component(s)
Fixed Versions:
21.2.021.1.620.3.1719.2.19
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?
CVE-2026-27970 is a security vulnerability in @angular/core involving Angular i18n vulnerable to Cross-Site Scripting under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which @angular/core versions are affected?
Affected versions include releases prior to 21.2.0, 21.1.6, 20.3.17, 19.2.19 across affected packages: @angular/core.
What version fixes CVE-2026-27970?
Upgrading to 21.2.0, 21.1.6, 20.3.17, 19.2.19 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @angular/core affected?
Yes, @angular/core is affected in releases prior to 21.2.0, 21.1.6, 20.3.17, 19.2.19, Latest secure release. Upgrade your dependency to 21.2.0, 21.1.6, 20.3.17, 19.2.19, Latest secure release or later.
What is the CVSS score of CVE-2026-27970?
CVE-2026-27970 has a CVSS v3.1 base score of 6.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-27970?
CVE-2026-27970 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check npm dependencies for CVE-2026-27970?
Run the dependency tree command: 'npm ls @angular/core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}