CVE-2025-4690

Regular Expression Denial of Service
Affects
AngularJS
in
AngularJS
No items found.
Versions
>=0.0.0
Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

AngularJS is a JavaScript framework for developing dynamic web applications. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Its ngSanitize module provides functionality to sanitize HTML code.

A Regular expression Denial of Service (ReDoS) vulnerability (CVE-2025-4690) has been identified in AngularJS' ngSanitize module, which allows attackers to cause a denial of service of the application.

Per OWASP: The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). An attacker can then cause a program using a Regular Expression (Regex) to enter these extreme situations and then hang for a very long time.

This issue affects all versions of AngularJS.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the angular-sanitize package in all versions of AngularJS.

The linky filter, which is provided by the angular-sanitize package, is used for finding links in an input text and turning them into sanitized HTML links (using the $sanitize service under the hood). The logic for finding links in text is powered by a Regular Expression.

Due to an implementation bug, the Regular Expression has a super-linear runtime relative to the input size. With a long, specially-crafted input, an attacker could cause a denial of service of the application, monopolizing browser resources or completely crash the application.

Steps To Reproduce

  • Create an AngularJS application that uses the ngSanitize module. For example:
angular.module('app', ['ngSanitize']);

  • Use the linky filter in an HTML template with an input text that contains a user-provided value. For example:
<span>{{ textWithUserProvidedValue | linky }}</span>

  • Alternatively, use the linky filter programmatically. For example:
angular
    .module('app')
    .run(['linkyFilter', linkyFilter => {
      linkyFilter(textWithUserProvidedValue);
    }])
    // Or...
    .run(['$filter', $filter => {
      $filter('linky')(textWithUserProvidedValue);
    }]);

Proof Of Concept

A full reproduction with code similar to the above can be found here:

linky filter ReDoS POC

Mitigation

The AngularJS project is End-of-Life and will not receive any updates to address this issue. For more information see here.

Users of the affected components should apply one of the following mitigations:

  • Migrate affected applications away from AngularJS.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.

Credits

  • George Kalpakas from HeroDevs (finder)
Vulnerability Details
ID
CVE-2025-4690
PROJECT Affected
AngularJS
Versions Affected
>=0.0.0
Published date
August 19, 2025
≈ Fix date
May 28, 2025
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
Category
Regular Expression Denial of Service
Sign up for the latest vulnerability alerts fixed in
NES for AngularJS
Rss feed icon
Subscribe via RSS
or

By clicking “submit” I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.