漏洞描述:
Babel 是开源的 JavaScript 编译器。
当使用依赖 path.evaluate() 或 path.evaluateTruthy()方法的插件编译攻击者可控的代码时将会执行恶意代码
以下插件受影响:
1. @babel/plugin-transform-runtime
2. @babel/preset-env(当使用 useBuiltIns 选项时)
3. 任何依赖于 @babel/helper-define-polyfill-provider 的 polyfill provider 插件,包括: babel-plugin-polyfill-corejs3、babel-plugin-polyfill-corejs2、babel-plugin-polyfill-es-shims、babel-plugin-polyfill-regenerator、babel-plugin-polyfill-custom
babel/下的其他插件不受影响, 但可能存在受影响的第三方插件
影响范围:
babel/traverse@(-∞, 7.23.2)
babel/traverse@[8.0.0-alpha.0, 8.0.0-alpha.4)
node-babel(-∞, 6.26.0+dfsg-3+deb10u1)
node-babel影响所有版本
node-babel7(-∞, 7.20.15+ds1+~cs214.269.168-5)
node-babel影响所有版本
node-babel7(-∞, 7.20.15+ds1+~cs214.269.168-5)
修复方案:
升级babel/traverse到 7.23.2、8.0.0-alpha.4 或更高版本
如果无法升级 @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
将组件 node-babel 升级至 6.26.0+dfsg-3+deb10u1 及以上版本
将组件 node-babel7 升级至 7.20.15+ds1+~cs214.269.168-5 及以上版本
参考链接:
https://github.com/babel/babel/commit/b13376b346946e3f62fc0848c1d2a23223314c82
https://github.com/babel/babel/security/advisories/GHSA-67hx-6x53-jw92
https://steakenthusiast.github.io/2023/10/11/CVE-2023-45133-Finding-an-Arbitrary-Code-Execution-Vulnerability-In-Babel/
原文始发于微信公众号(飓风网络安全):【漏洞预警】Babel 插件任意代码执行漏洞CVE-2023-45133
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论