cve.bz

CVE-2025-27789 babel babel

6.2 mediumEPSS 0.6%Fix available

Medium (6.2) in babel babel. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in @babel/helpers 7.26.10, 8.0.0-alpha.17.

On this page
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.

Severity

CVSS 3.1

6.2 medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 48th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-03-11. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-1333 Inefficient Regular Expression Complexity
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • @babel/helpers (npm): fixed in 7.26.10, 8.0.0-alpha.17
  • @babel/runtime (npm): fixed in 7.26.10, 8.0.0-alpha.17
  • @babel/runtime-corejs2 (npm): fixed in 7.26.10, 8.0.0-alpha.17
  • @babel/runtime-corejs3 (npm): fixed in 7.26.10, 8.0.0-alpha.17

Ask an AI about this CVE

Show the promptExplain CVE-2025-27789 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-27789?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-27789?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-27789 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
babel< 7.26.10
babel>= 8.0.0-alpha.0, < 8.0.0-alpha.17

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-968p-4wvh-cqc8npm@babel/helpers<7.26.107.26.10
GHSA-968p-4wvh-cqc8npm@babel/runtime<7.26.107.26.10
GHSA-968p-4wvh-cqc8npm@babel/runtime-corejs2<7.26.107.26.10
GHSA-968p-4wvh-cqc8npm@babel/runtime-corejs3<7.26.107.26.10
GHSA-968p-4wvh-cqc8npm@babel/helpers>=8.0.0-alpha.0 <8.0.0-alpha.178.0.0-alpha.17
GHSA-968p-4wvh-cqc8npm@babel/runtime>=8.0.0-alpha.0 <8.0.0-alpha.178.0.0-alpha.17
GHSA-968p-4wvh-cqc8npm@babel/runtime-corejs2>=8.0.0-alpha.0 <8.0.0-alpha.178.0.0-alpha.17
GHSA-968p-4wvh-cqc8npm@babel/runtime-corejs3>=8.0.0-alpha.0 <8.0.0-alpha.178.0.0-alpha.17

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu22.04:LTS, 24.04:LTS, 25.10 and 2 morenode-babel7no fix listedUBUNTU-CVE-2025-27789
UbuntuPro:18.04:LTS, Pro:20.04:LTSnode-babelno fix listedUBUNTU-CVE-2025-27789

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu.

Attack patterns (CAPEC)

  • CAPEC-492 Regular Expression Exponential Blowup

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON