CVE-2025-27789: Inefficient RexExp complexity in generated code with .replace when transpiling named capturing groups
Vulnerability summary
CVE-2025-27789 is a medium (CVSS 6.2) vulnerability in babel. EPSS estimates a 0.56% chance of exploitation in the next 30 days, higher than 46.8% of scored vulnerabilities.
Not severe (CVSS 6.2, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 0 · Related 11Timeline
- 11-03-2025PublishedVulnerability first disclosed.
- 11-03-2025Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
6 scores · 6 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated6.2MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · WolfiEcosystem advisory · calculated6.2MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · NpmEcosystem advisory · calculated6.2MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · ChainguardEcosystem advisory · calculated6.2MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- NVDNIST6.2MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.56%
Chance of exploitation in the next 30 days
Percentile
47%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.56% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard77 products
- arangodb-3.11< 3.11.14.5-r26
- arangodb-3.12< 3.12.11-r0
- argo-workflows< 3.6.5-r1
- gitlab-rails-ce-18.1All versions (No fix recorded)
- gitlab-rails-ce-18.10All versions (No fix recorded)
Wolfi22 products
- argo-workflows< 3.6.5-r1
- jitsucom-jitsu< 2.8.6-r3
- jitsucom-jitsu-console< 2.8.6-r3
- jitsucom-jitsu-rotor< 2.8.6-r3
- katib-earlystopping< 0.19.0-r31
@babel4 products
- helpers< 7.26.10 | ≥ 8.0.0-alpha.0, < 8.0.0-alpha.17
- runtime< 7.26.10 | ≥ 8.0.0-alpha.0, < 8.0.0-alpha.17
- runtime-corejs2< 7.26.10 | ≥ 8.0.0-alpha.0, < 8.0.0-alpha.17
- runtime-corejs3< 7.26.10 | ≥ 8.0.0-alpha.0, < 8.0.0-alpha.17
Ubuntu2 products
- node-babelAll versions (No fix recorded)
- node-babel7All versions (No fix recorded)
Babel1 product
- babel< 7.26.10 | ≥ 8.0.0-alpha.0, < 8.0.0-alpha.17
5 vendors · 106 products
References
8 links- github.com/babel/babelPACKAGE