Babel-preset-react-app is a crucial Babel preset tailored for Create React App, streamlining the process of transforming modern JavaScript and JSX code into browser-compatible formats. Examining versions 3.0.2 and 3.0.1 reveals that the core functionality and dependency structure remain largely consistent, ensuring a stable and predictable compilation environment. Both versions rely on key Babel plugins like transform-runtime, dynamic-import-node, and various transform-react-jsx plugins to handle features like asynchronous module loading and JSX syntax.
The most notable difference between versions 3.0.1 and 3.0.2 lies in their release dates. Version 3.0.2 was released on August 9th, 2017, subsequent to version 3.0.1 which was released on June 28th, 2017. While the dependency list remains identical, the later release suggests potential bug fixes, performance improvements, or minor adjustments under the hood. For developers, this highlights the importance of staying updated with the latest minor versions to benefit from these enhancements, even if the changes aren't explicitly documented in patch notes. Due to the lack of specific details on the changes between these versions, developers are encouraged to consult the Create React App changelog or repository history for comprehensive information on the specific improvements introduced in version 3.0.2. Staying up to date ensures you have the most stable and performant Babel configuration for your React projects.
All the vulnerabilities related to the version 3.0.2 of the package
Babel vulnerable to arbitrary code execution when compiling specifically crafted malicious code
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@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
.
Babel 6 does not receive security fixes anymore (see Babel's security policy), hence there is no patch planned for babel-traverse@6
.
@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.3