GHSA-fv7c-fp4j-7gwp
HIGHGHSA-fv7c-fp4j-7gwp is a high-severity (CVSS 8.2) remote code execution vulnerability in @babel/plugin-transform-modules-systemjs. O3 Security confirms whether GHSA-fv7c-fp4j-7gwp is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
@babel/plugin-transform-modules-systemjs generates arbitrary code when compiling malicious input
Real-World Exposure
@babel/plugin-transform-modules-systemjs📦@babel/plugin-transform-modules-systemjsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
Impact
Using Babel to compile code that was specifically crafted by an attacker can cause Babel to generate output code that executes arbitrary code.
Known affected plugins are:
@babel/plugin-transform-modules-systemjs@babel/preset-envwhen using themodules: "systemjs"option, as it delegates to@babel/plugin-transform-modules-systemjs
No other plugins under the @babel namespace are impacted.
Users that only compile trusted code are not impacted.
Patches
The vulnerability has been fixed in @babel/[email protected].
Babel also released @babel/[email protected], updating its @babel/plugin-transform-modules-systemjs dependency, to simplify forcing the update if you are using @babel/preset-env directly.
Workarounds
- Pin
@babel/parserto v7.11.5. The downgrade will completely disable string module name parsing, but it would also disable other new language features and the build pipeline may fail as a result. Only do so if you are working on a legacy codebase and can not upgrade@babel/plugin-transform-modules-systemjsto v7.29.4. - Do not use the
modules: "systemjs"option, migrate the codebase to native ES Modules or any other module formats.
Credits
Babel thanks Daniel Cervera for reporting the vulnerability.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @babel/plugin-transform-modules-systemjs | ≥ 7.12.0&&< 7.29.4 | 7.29.4 |
| 📦npm | @babel/plugin-transform-modules-systemjs | ≥ 8.0.0-alpha.0&&< 8.0.0-alpha.13 | 8.0.0-alpha.13 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @babel/plugin-transform-modules-systemjs. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update @babel/plugin-transform-modules-systemjs to 7.29.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fv7c-fp4j-7gwp is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-fv7c-fp4j-7gwp is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-fv7c-fp4j-7gwp. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-fv7c-fp4j-7gwp in your dependencies?
O3 detects GHSA-fv7c-fp4j-7gwp across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.