Home / babel / babel / CVE-2025-27789
CVE-2025-27789: is it exploited, and which versions of babel are affected and fixed?
CVE-2025-27789 is a regular expression denial of service (ReDoS) vulnerability in babel. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 18:39 UTC). Affected: @babel/helpers before 7.26.10, @babel/runtime before 7.26.10, @babel/runtime-corejs2 before 7.26.10 and 5 more (GitHub advisory GHSA-968p-4wvh-cqc8). Fixed in 7.26.10 and 8.0.0-alpha.17 (GitHub advisory GHSA-968p-4wvh-cqc8). Severity: Medium (6.2, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 18:39 UTC, CVE record November 19, 2026, 07:09 UTC and NVD November 19, 2026, 07:22 UTC.
What is 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.
From the CVE record by GitHub_M, last updated March 11, 2025, 19:53 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| babel | babel | < 7.26.10 >= 8.0.0-alpha.0, < 8.0.0-alpha.17 |
As the CVE record by GitHub_M states it, last updated March 11, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | @babel/helpers | < 7.26.10 | 7.26.10 | GHSA-968p-4wvh-cqc8 |
| npm | @babel/runtime | < 7.26.10 | 7.26.10 | GHSA-968p-4wvh-cqc8 |
| npm | @babel/runtime-corejs2 | < 7.26.10 | 7.26.10 | GHSA-968p-4wvh-cqc8 |
| npm | @babel/runtime-corejs3 | < 7.26.10 | 7.26.10 | GHSA-968p-4wvh-cqc8 |
| npm | @babel/helpers | >= 8.0.0-alpha.0, < 8.0.0-alpha.17 | 8.0.0-alpha.17 | GHSA-968p-4wvh-cqc8 |
| npm | @babel/runtime | >= 8.0.0-alpha.0, < 8.0.0-alpha.17 | 8.0.0-alpha.17 | GHSA-968p-4wvh-cqc8 |
| npm | @babel/runtime-corejs2 | >= 8.0.0-alpha.0, < 8.0.0-alpha.17 | 8.0.0-alpha.17 | GHSA-968p-4wvh-cqc8 |
| npm | @babel/runtime-corejs3 | >= 8.0.0-alpha.0, < 8.0.0-alpha.17 | 8.0.0-alpha.17 | GHSA-968p-4wvh-cqc8 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated April 16, 2025. Summary: Babel has inefficient RegExp complexity in generated code with .replace when transpiling named capturing groups.
How severe is CVE-2025-27789?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 6.2 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | GitHub_M |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2025-27789 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: no; technical impact: partial (CISA ADP, March 11, 2025)
- EPSS
- 0.56% probability of exploitation activity in the next 30 days, percentile 48.3 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-1333 Inefficient Regular Expression Complexity
Where are the vendor advisories and references?
- https://github.com/babel/babel/security/advisories/GHSA-968p-4wvh-cqc8 x_refsource_CONFIRM
- https://github.com/babel/babel/pull/17173 x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- March 6, 2025
- Published
- March 11, 2025, 19:09 UTC
- CVE record updated
- March 11, 2025, 19:53 UTC by GitHub_M
- NVD
- Deferred, last modified June 17, 2026, 09:04 UTC
- Last checked
- CVE list November 19, 2026, 07:09 UTC; NVD November 19, 2026, 07:22 UTC; KEV December 3, 2026, 18:39 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect babel?
- Jun 22, 2026CVE-2026-49356 babel: path traversal (reading or writing files outside the intended folder)
- May 26, 2026CVE-2026-44728 babel: code injection (remote code execution)
- Oct 12, 2023CVE-2023-45133 babel: incomplete List of Disallowed Inputs
Questions about CVE-2025-27789
Is CVE-2025-27789 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 18:39 UTC. FIRST's EPSS gives it a 0.56% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of babel are affected by CVE-2025-27789?
@babel/helpers before 7.26.10, @babel/runtime before 7.26.10, @babel/runtime-corejs2 before 7.26.10, @babel/runtime-corejs3 before 7.26.10, @babel/helpers from 8.0.0-alpha.0 before 8.0.0-alpha.17, @babel/runtime from 8.0.0-alpha.0 before 8.0.0-alpha.17 and 2 more, per the GitHub advisory GHSA-968p-4wvh-cqc8. The tables above give every range the sources list.
Which version fixes CVE-2025-27789?
7.26.10 and 8.0.0-alpha.17, per the GitHub advisory GHSA-968p-4wvh-cqc8. Check the vendor's advisory before you rely on it.
How severe is CVE-2025-27789?
Medium (6.2, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2025-27789?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.