# CVE-2024-21490: angular vulnerable to super-linear runtime due to backtracking

> Attackers can cause denial of service in AngularJS applications via catastrophic backtracking in the ng-srcset directive parser.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Feb 2024
- **Updated:** 6 Jul 2026
- **Also known as:** DEBIAN-CVE-2024-21490, GHSA-4w4v-5hc9-xrr2, MINI-p7r3-8rj6-5488, ROOT-APP-NPM-CVE-2024-21490, UBUNTU-CVE-2024-21490

## What is CVE-2024-21490?

CVE-2024-21490 is a high-severity denial of service vulnerability in angular, published on 10 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

This affects versions of the package angular from 1.3.0; versions of the package angularjs from 1.3.0. A regular expression used to split the value of the ng-srcset directive is vulnerable to super-linear runtime due to backtracking. With large carefully-crafted input, this can result in catastrophic backtracking and cause a denial of service. **Note:**This package is EOL and will not receive any updates to address this issue. Users should migrate to [@angular/core](https://www.npmjs.com/package/@angular/core).

Weakness: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2024-21490?

6 open source packages ship an affected version, including org.webjars.bower:angular, org.webjars.npm:angular and angular. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.webjars.bower:angular` | Maven | From 1.3.0 to 1.8.3 | None |
| `org.webjars.bower:angular` | Maven | From 1.3.0 to 1.8.3 | None |
| `org.webjars.npm:angular` | Maven | From 1.3.0 to 1.8.3 | None |
| `org.webjars.npm:angular` | Maven | From 1.3.0 to 1.8.3 | None |
| `angular` | npm | From 1.3.0 to 1.8.3 | None |
| `angular` | npm | From 1.3.0 to 1.8.3 | None |

Products: Angularjs Angular.js.

## How do I fix CVE-2024-21490?

Product is end of life, replace it.

## Is CVE-2024-21490 being exploited?

There is no known exploitation of CVE-2024-21490 in the wild and no public exploit code.

Public exploit code:

- AngularJS 1.x -> Angular 18 migration guidance for GitHub Copilot. Source-of-truth repo for github/awesome-copilot/instructions/angularjs-to-angular-18.instructions.md. 62 LLM regressions across 3 modes. AngularJS EOL since Dec 31 2021; CVE-2024-21490 unpatched. (github_poc): https://github.com/RoninForge/roninforge-angularjs-migration

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-21490 and fix it if it is affected.

What it is: CVE-2024-21490 is a high-severity denial of service vulnerability in angular, published on 10 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-21490 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.webjars.bower:angular (Maven): affected from 1.3.0 up to 1.8.3; no fix listed
- org.webjars.bower:angular (Maven): affected from 1.3.0 up to 1.8.3; no fix listed
- org.webjars.npm:angular (Maven): affected from 1.3.0 up to 1.8.3; no fix listed
- org.webjars.npm:angular (Maven): affected from 1.3.0 up to 1.8.3; no fix listed
- angular (npm): affected from 1.3.0 up to 1.8.3; no fix listed
- angular (npm): affected from 1.3.0 up to 1.8.3; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-21490/ (Markdown: https://insights.sbomify.com/CVE-2024-21490/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-21490
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-21490
- OSV: https://osv.dev/vulnerability/CVE-2024-21490

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-21490/
Summaries are generated and may contain mistakes; the official description above is the record.
