Babel vulnerable to arbitrary code execution when compiling specifically crafted malicious code
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
Babel is a compiler for writingJavaScript. In `@babel/traverse` prior to versions 7.23.2 and 8.0.0-alpha.4 and all versions of `babel-traverse`, using Babel to compile code that was specifically crafted by an attacker can lead to arbitrary code execution during compilation, when using plugins that rely on the `path.evaluate()`or `path.evaluateTruthy()` internal Babel methods. Known affected plugins are `@babel/plugin-transform-runtime`; `@babel/preset-env` when using its `useBuiltIns` option; and any "polyfill provider" plugin that depends on `@babel/helper-define-polyfill-provider`, such as `babel-plugin-polyfill-corejs3`, `babel-plugin-polyfill-corejs2`, `babel-plugin-polyfill-es-shims`, `babel-plugin-polyfill-regenerator`. No other plugins under the `@babel/` namespace are impacted, but third-party plugins might be. Users that only compile trusted code are not impacted. The vulnerability has been fixed in `@babel/[email protected]` and `@babel/[email protected]`. Those who cannot upgrade `@babel/traverse` and are using one of the affected packages mentioned above should upgrade them to their latest version to avoid triggering the vulnerable code path in affected `@babel/traverse` versions: `@babel/plugin-transform-runtime` v7.23.2, `@babel/preset-env` v7.23.2, `@babel/helper-define-polyfill-provider` v0.4.3, `babel-plugin-polyfill-corejs2` v0.4.6, `babel-plugin-polyfill-corejs3` v0.8.5, `babel-plugin-polyfill-es-shims` v0.10.0, `babel-plugin-polyfill-regenerator` v0.5.3.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| babel | babel | before 7.23.2; 8.0.0-alpha.0 to before 8.0.0-alpha.4 | 7.23.2, 8.0.0-alpha.4 | Patch available | CNA |
| — | @babel/traverse (npm) | before 7.23.2 | 7.23.2 | Patch available | GHSA-67hx-6x53-jw92 |
| — | @babel/traverse (npm) | 8.0.0-alpha.0 to before 8.0.0-alpha.4 | 8.0.0-alpha.4 | Patch available | GHSA-67hx-6x53-jw92 |
| — | babel-traverse (npm) | all versions | — | No fix listed | GHSA-67hx-6x53-jw92 |
- babel Vendorbabel Affected before 7.23.2; 8.0.0-alpha.0 to before 8.0.0-alpha.4 Fixed in 7.23.2, 8.0.0-alpha.4 Patch available CNA
- @babel/traverse (npm) Vendor— Affected before 7.23.2 Fixed in 7.23.2 Patch available GHSA-67hx-6x53-jw92
- @babel/traverse (npm) Vendor— Affected 8.0.0-alpha.0 to before 8.0.0-alpha.4 Fixed in 8.0.0-alpha.4 Patch available GHSA-67hx-6x53-jw92
- babel-traverse (npm) Vendor— Affected all versions Fixed in — No fix listed GHSA-67hx-6x53-jw92
CPE configurations NVD · 15
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* | 10.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* | 11.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:12.0:*:*:*:*:*:*:* | 12.0 | Vulnerable | Debian |
| cpe:2.3:a:babeljs:babel:*:*:*:*:*:nodejs:*:* | before 7.23.2 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel:8.0.0:alpha.0:*:*:*:nodejs:*:* | 8.0.0 alpha.0 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel:8.0.0:alpha.1:*:*:*:nodejs:*:* | 8.0.0 alpha.1 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel:8.0.0:alpha.2:*:*:*:nodejs:*:* | 8.0.0 alpha.2 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel:8.0.0:alpha.3:*:*:*:nodejs:*:* | 8.0.0 alpha.3 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel-helper-define-polyfill-provider:*:*:*:*:*:nodejs:*:* | before 0.4.3 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel-plugin-polyfill-corejs2:*:*:*:*:*:nodejs:*:* | before 0.4.6 | Vulnerable | Babeljs |
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* Versions 11.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:12.0:*:*:*:*:*:*:* Versions 12.0 Vulnerable ·Debian
- cpe:2.3:a:babeljs:babel:*:*:*:*:*:nodejs:*:* Versions before 7.23.2 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel:8.0.0:alpha.0:*:*:*:nodejs:*:* Versions 8.0.0 alpha.0 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel:8.0.0:alpha.1:*:*:*:nodejs:*:* Versions 8.0.0 alpha.1 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel:8.0.0:alpha.2:*:*:*:nodejs:*:* Versions 8.0.0 alpha.2 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel:8.0.0:alpha.3:*:*:*:nodejs:*:* Versions 8.0.0 alpha.3 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel-helper-define-polyfill-provider:*:*:*:*:*:nodejs:*:* Versions before 0.4.3 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel-plugin-polyfill-corejs2:*:*:*:*:*:nodejs:*:* Versions before 0.4.6 Vulnerable ·Babeljs
Show 5 more CPE
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:babeljs:babel-plugin-polyfill-corejs3:*:*:*:*:*:nodejs:*:* | before 0.8.5 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel-plugin-polyfill-es-shims:*:*:*:*:*:nodejs:*:* | before 0.10.0 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel-plugin-polyfill-regenerator:*:*:*:*:*:nodejs:*:* | before 0.5.3 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel-plugin-transform-runtime:*:*:*:*:*:nodejs:*:* | before 7.23.2 | Vulnerable | Babeljs |
| cpe:2.3:a:babeljs:babel-preset-env:*:*:*:*:*:nodejs:*:* | before 7.23.2 | Vulnerable | Babeljs |
- cpe:2.3:a:babeljs:babel-plugin-polyfill-corejs3:*:*:*:*:*:nodejs:*:* Versions before 0.8.5 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel-plugin-polyfill-es-shims:*:*:*:*:*:nodejs:*:* Versions before 0.10.0 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel-plugin-polyfill-regenerator:*:*:*:*:*:nodejs:*:* Versions before 0.5.3 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel-plugin-transform-runtime:*:*:*:*:*:nodejs:*:* Versions before 7.23.2 Vulnerable ·Babeljs
- cpe:2.3:a:babeljs:babel-preset-env:*:*:*:*:*:nodejs:*:* Versions before 7.23.2 Vulnerable ·Babeljs
Remediation
- Fix · CNA babel (babel) Fixed in 7.23.2, 8.0.0-alpha.4
- Fix · GHSA-67hx-6x53-jw92 @babel/traverse (npm) Fixed in 7.23.2 Advisory →
- Fix · GHSA-67hx-6x53-jw92 @babel/traverse (npm) Fixed in 8.0.0-alpha.4 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Storage 3 | Affected | No fix planned: Will not fix |
Not affected: 4 products
- Logging Subsystem for Red Hat OpenShift
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Single Sign-On 7
Timeline
- 2026-10-02 Threatist record created from CVE-2023-45133
- 2026-10-03 Alias added: GHSA-67hx-6x53-jw92
References
Patch 3
Advisory 3
More babel vulnerabilities
- TI-2025-20569 Inefficient RexExp complexity in generated code with .replace when transpiling named capturing groups CVSS 3.1MEDIUM 6.2
- TI-2026-32615 Type confusion in babel CVSS 3.1HIGH 8.2
- TI-2026-36529 Babel: Arbitrary File Read via sourceMappingURL Comment in @babel/core CVSS 3.1LOW 3.6
Sources
- CVE-2023-45133 · CVE Program
- CVE-2023-45133 · NVD
- FIRST EPSS
- GHSA-67hx-6x53-jw92 · GitHub Advisory Database · CC BY 4.0
- CVE-2023-45133 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences