Miggo Logo

CVE-2025-5897: @vue/cli-plugin-pwa Regular Expression Denial of Service vulnerability

4.3

CVSS Score
3.1

Basic Information

EPSS Score
0.11731%
Published
6/9/2025
Updated
6/9/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
@vue/cli-plugin-pwanpm<= 5.0.8

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability lies in the HtmlPwaPlugin.js file, specifically within the HtmlPwaPlugin class. The apply method of this class registers a callback function that is executed during the webpack compilation process. This callback uses String.prototype.replace with a regular expression to modify the HTML content. The original regular expression /<link rel=\"icon\"[^>]+>/ was susceptible to ReDoS attacks. An attacker could provide a malicious HTML string that causes the regex engine to enter a state of catastrophic backtracking, leading to excessive CPU consumption and a denial of service. The patch d7eb1fdfff4f71f9d7ef7a20a88f42ca582ebfca mitigates this by changing the regex to /<link rel=\"icon\"(?!<link rel=\"icon\")[^>]+>/, which prevents the backtracking issue. The apply method is the entry point for this vulnerable logic, as it sets up the callback containing the problematic regex execution.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* vuln*r**ility w*s *oun* in vu*js vu*-*li up to *.*.*. It **s ***n r*t** *s pro*l*m*ti*. T*is issu* *****ts t** *un*tion *tmlPw*Plu*in o* t** *il* p**k***s/@vu*/*li-plu*in-pw*/li*/*tmlPw*Plu*in.js o* t** *ompon*nt M*rk*own *o** **n*l*r. T** m*nipul*

Reasoning

T** vuln*r**ility li*s in t** `*tmlPw*Plu*in.js` *il*, sp**i*i**lly wit*in t** `*tmlPw*Plu*in` *l*ss. T** `*pply` m*t*o* o* t*is *l*ss r**ist*rs * **ll***k *un*tion t**t is *x**ut** *urin* t** w**p**k *ompil*tion pro**ss. T*is **ll***k us*s `Strin*.p