CVE-2025-27789
March 11, 2025
Babel is a compiler for writing next generation JavaScript. When using versions of Babel prior to 7.26.10 and 8.0.0-alpha.17 to compile regular expression named capturing groups, Babel will generate a polyfill for the ".replace" method that has quadratic complexity on some specific replacement pattern strings (i.e. the second argument passed to ".replace"). Generated code is vulnerable if all the following conditions are true: Using Babel to compile regular expression named capturing groups, using the ".replace" method on a regular expression that contains named capturing groups, and the code using untrusted strings as the second argument of ".replace". This problem has been fixed in "@babel/helpers" and "@babel/runtime" 7.26.10 and 8.0.0-alpha.17. It's likely that individual users do not directly depend on "@babel/helpers", and instead depend on "@babel/core" (which itself depends on "@babel/helpers"). Upgrading to "@babel/core" 7.26.10 is not required, but it guarantees use of a new enough "@babel/helpers" version. Note that just updating Babel dependencies is not enough; one will also need to re-compile the code. No known workarounds are available.
Affected Packages
https://github.com/babel/babel.git (GITHUB):
Affected version(s) >=v1.7.7 <v7.26.10Fix Suggestion:
Update to version v7.26.10@babel/runtime-corejs3 (NPM):
Affected version(s) >=8.0.0-alpha.0 <8.0.0-alpha.17Fix Suggestion:
Update to version 8.0.0-alpha.17@babel/runtime (NPM):
Affected version(s) >=7.0.0-beta.4 <7.26.10Fix Suggestion:
Update to version 7.26.10@babel/runtime-corejs3 (NPM):
Affected version(s) >=7.4.0 <7.26.10Fix Suggestion:
Update to version 7.26.10@babel/runtime-corejs2 (NPM):
Affected version(s) >=7.0.0-beta.56 <7.26.10Fix Suggestion:
Update to version 7.26.10@babel/helpers (NPM):
Affected version(s) >=7.0.0-beta.4 <7.26.10Fix Suggestion:
Update to version 7.26.10@babel/runtime-corejs2 (NPM):
Affected version(s) Fix Suggestion:
Update to version 7.26.10@babel/runtime (NPM):
Affected version(s) Fix Suggestion:
Update to version 7.26.10@babel/runtime-corejs2 (NPM):
Affected version(s) >=8.0.0-alpha.0 <8.0.0-alpha.17Fix Suggestion:
Update to version 8.0.0-alpha.17@babel/helpers (NPM):
Affected version(s) Fix Suggestion:
Update to version 7.26.10@babel/runtime-corejs3 (NPM):
Affected version(s) Fix Suggestion:
Update to version 7.26.10@babel/helpers (NPM):
Affected version(s) >=8.0.0-alpha.0 <8.0.0-alpha.17Fix Suggestion:
Update to version 8.0.0-alpha.17@babel/runtime (NPM):
Affected version(s) >=8.0.0-alpha.0 <8.0.0-alpha.17Fix Suggestion:
Update to version 8.0.0-alpha.17Related ResourcesĀ (5)
Do you need more information?
Contact UsCVSS v4
Base Score:
6.9
Attack Vector
LOCAL
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
6.2
Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Weakness Type (CWE)
Inefficient Regular Expression Complexity
EPSS
Base Score:
0.1