CVE-2023-45133
Babel vulnerable to arbitrary code execution when compiling specifically crafted malicious code
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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/traverse@7.23.2` and `@babel/traverse@8.0.0-alpha.4`. 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.
Babel es un compilador para escribir JavaScript. En `@babel/traverse` anterior a las versiones 7.23.2 y 8.0.0-alpha.4 y en todas las versiones de `babel-traverse`, el uso de Babel para compilar código manipulado específicamente por un atacante puede provocar la ejecución de código arbitrario durante compilación, cuando se utilizan complementos que se basan en los métodos internos de Babel `path.evaluate()`o `path.evaluateTruthy()`. Los complementos afectados conocidos son `@babel/plugin-transform-runtime`; `@babel/preset-env` cuando se usa su opción `useBuiltIns`; y cualquier complemento de "proveedor de polyfill" que dependa de `@babel/helper-define-polyfill-provider`, como `babel-plugin-polyfill-corejs3`, `babel-plugin-polyfill-corejs2`, `babel-plugin- polyfill-es-shims`, `babel-plugin-polyfill-regenerator`. Ningún otro complemento bajo el espacio de nombres `@babel/` se ve afectado, pero los complementos de terceros podrían verse afectados. Los usuarios que solo compilan código confiable no se ven afectados. La vulnerabilidad se ha solucionado en `@babel/traverse@7.23.2` y `@babel/traverse@8.0.0-alpha.4`. Aquellos que no puedan actualizar `@babel/traverse` y estén usando uno de los paquetes afectados mencionados anteriormente deben actualizarlos a su última versión para evitar activar la ruta de código vulnerable en las versiones afectadas `@babel/traverse`: `@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.
CVSS Scores
SSVC
- Decision:Track*
Timeline
- 2023-10-04 CVE Reserved
- 2023-10-12 CVE Published
- 2023-10-25 EPSS Updated
- 2024-09-18 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-184: Incomplete List of Disallowed Inputs
- CWE-697: Incorrect Comparison
CAPEC
References (7)
URL | Tag | Source |
---|---|---|
https://github.com/babel/babel/pull/16033 | Issue Tracking | |
https://github.com/babel/babel/security/advisories/GHSA-67hx-6x53-jw92 | Third Party Advisory | |
https://lists.debian.org/debian-lts-announce/2023/10/msg00026.html | Mailing List | |
https://www.debian.org/security/2023/dsa-5528 | Issue Tracking |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/babel/babel/commit/b13376b346946e3f62fc0848c1d2a23223314c82 | 2023-10-24 | |
https://github.com/babel/babel/releases/tag/v7.23.2 | 2023-10-24 | |
https://github.com/babel/babel/releases/tag/v8.0.0-alpha.4 | 2023-10-24 |
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 10.0 Search vendor "Debian" for product "Debian Linux" and version "10.0" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 11.0 Search vendor "Debian" for product "Debian Linux" and version "11.0" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 12.0 Search vendor "Debian" for product "Debian Linux" and version "12.0" | - |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel Search vendor "Babeljs" for product "Babel" | < 7.23.2 Search vendor "Babeljs" for product "Babel" and version " < 7.23.2" | nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel Search vendor "Babeljs" for product "Babel" | 8.0.0 Search vendor "Babeljs" for product "Babel" and version "8.0.0" | alpha.0, nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel Search vendor "Babeljs" for product "Babel" | 8.0.0 Search vendor "Babeljs" for product "Babel" and version "8.0.0" | alpha.1, nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel Search vendor "Babeljs" for product "Babel" | 8.0.0 Search vendor "Babeljs" for product "Babel" and version "8.0.0" | alpha.2, nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel Search vendor "Babeljs" for product "Babel" | 8.0.0 Search vendor "Babeljs" for product "Babel" and version "8.0.0" | alpha.3, nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel-helper-define-polyfill-provider Search vendor "Babeljs" for product "Babel-helper-define-polyfill-provider" | < 0.4.3 Search vendor "Babeljs" for product "Babel-helper-define-polyfill-provider" and version " < 0.4.3" | nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel-plugin-polyfill-corejs2 Search vendor "Babeljs" for product "Babel-plugin-polyfill-corejs2" | < 0.4.6 Search vendor "Babeljs" for product "Babel-plugin-polyfill-corejs2" and version " < 0.4.6" | nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel-plugin-polyfill-corejs3 Search vendor "Babeljs" for product "Babel-plugin-polyfill-corejs3" | < 0.8.5 Search vendor "Babeljs" for product "Babel-plugin-polyfill-corejs3" and version " < 0.8.5" | nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel-plugin-polyfill-es-shims Search vendor "Babeljs" for product "Babel-plugin-polyfill-es-shims" | < 0.10.0 Search vendor "Babeljs" for product "Babel-plugin-polyfill-es-shims" and version " < 0.10.0" | nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel-plugin-polyfill-regenerator Search vendor "Babeljs" for product "Babel-plugin-polyfill-regenerator" | < 0.5.3 Search vendor "Babeljs" for product "Babel-plugin-polyfill-regenerator" and version " < 0.5.3" | nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel-plugin-transform-runtime Search vendor "Babeljs" for product "Babel-plugin-transform-runtime" | < 7.23.2 Search vendor "Babeljs" for product "Babel-plugin-transform-runtime" and version " < 7.23.2" | nodejs |
Affected
| ||||||
Babeljs Search vendor "Babeljs" | Babel-preset-env Search vendor "Babeljs" for product "Babel-preset-env" | < 7.23.2 Search vendor "Babeljs" for product "Babel-preset-env" and version " < 7.23.2" | nodejs |
Affected
|