CVE-2025-27789 | Inefficient RexExp complexity in generated code with .replace when transpiling named capturing groups

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.

Published: 2025-03-11 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2025-27789 is rated Low Risk (38.3/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.48%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-27789

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.05% 0.48% +0.43%
2 2025-10-20 0.04% 0.05% +0.01%
3 2025-10-17 0.04%

Full EPSS history (7 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-27789

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.2 3.1 MEDIUM
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.5 3.6 [email protected]

Weakness enumeration for CVE-2025-27789

GitHub Security Advisory for CVE-2025-27789

GHSA-968p-4wvh-cqc8 · Severity: medium · Ecosystem: npm — Babel has inefficient RegExp complexity in generated code with .replace when transpiling named capturing groups

OS Trackers for CVE-2025-27789

vendor priority summary link
ubuntu medium CVE-2025-27789 medium priority: Ubuntu including 2 source packages (node-babel, node-babel7), 15 status rows across 8 suites (bionic, focal, jammy, noble, oracular, plucky, questing, upstream): needs-triage 7, DNE 6, ignored 2. https://ubuntu.com/security/CVE-2025-27789

Affected software / configurations for CVE-2025-27789

Vendor Product Version Raw CPE
No affected products in dataset.

References for CVE-2025-27789

cvelogic Threat Intelligence