CVE-2023-45133

CVE-2023-45133 is a critical-severity security vulnerability in @babel/traverse (npm), affecting versions < 7.23.2. It is fixed in 7.23.2, 8.0.0-alpha.4.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Babel vulnerable to arbitrary code execution when compiling specifically crafted malicious code

Workarounds

  • Upgrade @babel/traverse to v7.23.2 or higher. You can do this by deleting it from your package manager's lockfile and re-installing the dependencies. @babel/core >=7.23.2 will automatically pull in a non-vulnerable version.
  • If you cannot upgrade @babel/traverse and are using one of the affected packages mentioned above, 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

Impact

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
  • 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.

CVE-2023-45133 has a CVSS score of 9.3 (Critical). The vector is requires local access, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (7.23.2, 8.0.0-alpha.4); upgrading removes the vulnerable code path.

Affected versions

@babel/traverse (< 7.23.2) @babel/traverse (>= 8.0.0-alpha.0, < 8.0.0-alpha.4) babel-traverse (< 7.23.2)

Security releases

@babel/traverse → 7.23.2 (npm) @babel/traverse → 8.0.0-alpha.4 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The vulnerability has been fixed in @babel/[email protected].

Babel 6 does not receive security fixes anymore (see Babel's security policy), hence there is no patch planned for babel-traverse@6.

Frequently Asked Questions

  1. What is CVE-2023-45133? CVE-2023-45133 is a critical-severity security vulnerability in @babel/traverse (npm), affecting versions < 7.23.2. It is fixed in 7.23.2, 8.0.0-alpha.4.
  2. How severe is CVE-2023-45133? CVE-2023-45133 has a CVSS score of 9.3 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2023-45133?
    • @babel/traverse (npm) (versions < 7.23.2)
    • babel-traverse (npm) (versions < 7.23.2)
  4. Is there a fix for CVE-2023-45133? Yes. CVE-2023-45133 is fixed in 7.23.2, 8.0.0-alpha.4. Upgrade to this version or later.
  5. Is CVE-2023-45133 exploitable, and should I be worried? Whether CVE-2023-45133 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2023-45133 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2023-45133?
    • Upgrade @babel/traverse to 7.23.2 or later
    • Upgrade @babel/traverse to 8.0.0-alpha.4 or later

Stop the waste.
Protect your environment with Kodem.