Denial of Service Vulnerability in Angular.js Due to Regular Expression Backtracking

angular.js Updated 02 Oct 2025

Summary

10/02/2024
N/A
Yes i
High
7.5

CVE-2024-21490: This affects versions of the package angular from 1.3.0. Affects angular.js versions < 1.8.3-1+deb12u1~deb11u1. Fixed in 1.8.3-1+deb12u1~deb11u1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Angular.js is a widely-used JavaScript framework that simplifies the development of dynamic web applications. It provides features such as two-way data binding, dependency injection, and modularization, making it a popular choice among developers. However, the package has reached its end-of-life (EOL), meaning it will no longer receive updates or security patches, leaving it vulnerable to various security issues, including the one described here.

Vulnerability Detail

The vulnerability arises from a regular expression used in the ng-srcset directive, which is susceptible to super-linear runtime performance issues due to catastrophic backtracking. When large, specially crafted input is processed, it can lead to significant delays or crashes, resulting in a denial of service (DoS). This vulnerability affects all versions of Angular.js starting from 1.3.0 and poses a serious risk to applications still using this outdated framework.

How To Fix

Minimum fixed version

1.8.3-1+deb12u1~deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade angular.js

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As Angular.js is no longer maintained, there are no official workarounds to fix this vulnerability. The best approach is to migrate to a supported framework. If immediate migration is not feasible, consider sanitizing inputs to avoid triggering the vulnerable regular expression, though this is not a foolproof solution.

Conclusion

The CVE-2024-21490 vulnerability in Angular.js poses a significant risk due to its potential to cause denial of service through regular expression backtracking. Given that Angular.js is no longer maintained, the recommended course of action is to migrate to a supported framework. Users should take immediate steps to assess their applications and implement necessary updates to ensure security.

See every vulnerability recorded for angular.js →

Share this vulnerability

FAQ

CVE-2024-21490 is a vulnerability in Angular.js that allows for denial of service due to a vulnerable regular expression in the ng-srcset directive.

All versions of Angular.js starting from 1.3.0 are affected by this vulnerability.

The vulnerability can lead to catastrophic backtracking, causing significant performance degradation or crashes, resulting in denial of service for users.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. By uploading your manifest file, such as package-lock.json, you can check for vulnerabilities without needing to install any software.

While there are no official workarounds, you may attempt to sanitize inputs to prevent triggering the vulnerable regex, but this is not a guaranteed solution.

Related vulnerabilities

Recent vulnerabilities recorded for angular.js.

How To Fix

Minimum fixed version

1.8.3-1+deb12u1~deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade angular.js

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback