CVE-2023-45133CWE-184

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

Critical · published October 12, 2023

CVSS v3.1
9.4
EPSS
1%
Percentile
43.6
In the wild
Unconfirmed
What it is

🔥 A crafty code snippet can exploit Babel's internals to execute arbitrary code during compilation! Think of it like a restaurant that allows customers to prepare their own meals, but some ingredients on the shelf could be contaminated. If an attacker knows how to mix things just right, they could serve you something toxic without you even realizing it! An attacker could potentially take control of your environment by running malicious code during the compilation process, leading to a cascade of devastating effects from data breaches to system takeovers. This is absolutely serious!

Put simply

Think of it like a restaurant that allows customers to prepare their own meals, but some ingredients on the shelf could be contaminated. If an attacker knows how to mix things just right, they could serve you something toxic without you even realizing it! This vulnerability in `@babel/traverse` allows attackers to execute arbitrary code by crafting input that triggers the internal `path.evaluate()` or `path.evaluateTruthy()` methods when compiling JavaScript. Affected plugins like `@babel/plugin-transform-runtime` and `@babel/preset-env` are particularly vulnerable when using specific options.

What to do

An attacker could potentially take control of your environment by running malicious code during the compilation process, leading to a cascade of devastating effects from data breaches to system takeovers. This is absolutely serious! Upgrade `@babel/traverse` to versions 7.23.2 or 8.0.0-alpha.4 immediately. If you're using any of the affected plugins, update them to their latest versions as well to ensure you're safe from this vulnerability. Don’t let attackers in! You've got this! By taking these steps, you’ll be one step closer to securing your code! 🛡️

The record
Technical detail
CVSS v3.1
9.4 · CRITICAL
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00525 · 43.6th percentile
Weakness
CWE-184 · Incomplete List of Disallowed Inputs
Published
2023-10-12T16:17Z
EPSS history
Timeline
  • 12 OCT 16:17Z
    Babel vulnerable to arbitrary code execution when compiling specifically crafted malicious code
    cvelistv5