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.
Patches
The vulnerability has been fixed in @babel/traverse@7.23.2.
Babel 6 does not receive security fixes anymore (see Babel's security policy), hence there is no patch planned for babel-traverse@6.
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:
This PR contains the following updates:
7.23.2
->7.23.3
GitHub Vulnerability Alerts
CVE-2023-45133
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()
orpath.evaluateTruthy()
internal Babel methods.Known affected plugins are:
@babel/plugin-transform-runtime
@babel/preset-env
when using itsuseBuiltIns
option@babel/helper-define-polyfill-provider
, such asbabel-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.
Patches
The vulnerability has been fixed in
@babel/traverse@7.23.2
.Babel 6 does not receive security fixes anymore (see Babel's security policy), hence there is no patch planned for
babel-traverse@6
.Workarounds
@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.@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.3babel-plugin-polyfill-corejs2
v0.4.6babel-plugin-polyfill-corejs3
v0.8.5babel-plugin-polyfill-es-shims
v0.10.0babel-plugin-polyfill-regenerator
v0.5.3Release Notes
babel/babel (@babel/traverse)
### [`v7.23.3`](https://redirect.github.com/babel/babel/blob/HEAD/CHANGELOG.md#v7233-2023-11-09) [Compare Source](https://redirect.github.com/babel/babel/compare/v7.23.2...v7.23.3) ##### :bug: Bug Fix - `babel-plugin-transform-typescript` - [#16071](https://redirect.github.com/babel/babel/pull/16071) Strip type-only TS namespaces ([@colinaaa](https://redirect.github.com/colinaaa)) - `babel-generator` - [#16078](https://redirect.github.com/babel/babel/pull/16078) Fix indentation when generating comments with `concise: true` ([@liuxingbaoyu](https://redirect.github.com/liuxingbaoyu)) - `babel-compat-data`, `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-preset-env` - [#14295](https://redirect.github.com/babel/babel/pull/14295) Add a bugfix plugin for https://crbug.com/v8/12421 ([@nicolo-ribaudo](https://redirect.github.com/nicolo-ribaudo)) - `babel-plugin-transform-object-super` - [#15948](https://redirect.github.com/babel/babel/pull/15948) fix: `super.x` in a loop ([@liuxingbaoyu](https://redirect.github.com/liuxingbaoyu)) - `babel-helper-module-transforms`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` - [#16015](https://redirect.github.com/babel/babel/pull/16015) fix: handle `__proto__` exports name in CJS/AMD/UMD ([@magic-akari](https://redirect.github.com/magic-akari)) ##### :memo: Documentation - [#16044](https://redirect.github.com/babel/babel/pull/16044) docs: Update links in [@babel/eslint-parser](https://redirect.github.com/babel/eslint-parser) README ([@aryehb](https://redirect.github.com/aryehb)) ##### :house: Internal - `babel-core`, `babel-preset-env` - [#15988](https://redirect.github.com/babel/babel/pull/15988) Refactor handling of modules plugins in `preset-env` ([@nicolo-ribaudo](https://redirect.github.com/nicolo-ribaudo)) ##### :running_woman: Performance - `babel-generator` - [#16061](https://redirect.github.com/babel/babel/pull/16061) perf: Improve `@babel/generator` performance ([@liuxingbaoyu](https://redirect.github.com/liuxingbaoyu)) - `babel-traverse` - [#16060](https://redirect.github.com/babel/babel/pull/16060) Avoid dynamic dispatch when calling wrapCheck ([@yepitschunked](https://redirect.github.com/yepitschunked)) ##### :microscope: Output optimization - `babel-plugin-transform-computed-properties` - [#6652](https://redirect.github.com/babel/babel/pull/6652) Optimize computed properties output (byte-wise) ([@Andarist](https://redirect.github.com/Andarist))Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.