@babel/core: Arbitrary File Read via sourceMappingURL CommentGHSA-4x5r-pxfx-6jf8
LOWGHSA-4x5r-pxfx-6jf8 is a low-severity (CVSS 3.2) Path Traversal vulnerability in @babel/core. A fix is available for @babel/core — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-4x5r-pxfx-6jf8.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@babel/corenpmDescription
Impact
Using @babel/core to compile maliciously crafted code can allow ab attacker to read any source map from the system that is running Babel, if these conditions are all true:
- the attacker controls the input source code
- the attacker can read the output source code
- the attacker knows the path of the source map file that they want to read
Users that only compile trusted code are not impacted.
Patches
The vulnerability has been fixed in @babel/[email protected] and @babel/[email protected].
Workarounds
Callers can mitigate the issue without upgrading by setting inputSourceMap: false in their Babel options.
Callers can also manually extract the #sourceMappingURL comment from the input source code, validate whether the source map that it links to is allowed to be read, and if it is pass an object to inputSourceMap (passing false when it's not).
Credits
Thanks Teodor-Cristian Radoi for reporting the vulnerability.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @babel/core | ≥ 8.0.0-alpha.0&&< 8.0.0-rc.6 | 8.0.0-rc.6npm install @babel/core@8.0.0-rc.6 |
| 📦npm | @babel/core | all versions | 7.29.6npm install @babel/core@7.29.6 |
Affected Products
babelbabelDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @babel/core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @babel/core to 8.0.0-rc.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-4x5r-pxfx-6jf8 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat rates this issue as having Low impact for Red Hat AI products. @babel/core is bundled only in build-time or developer UI tooling (dashboard, model registry, MLflow) and the arbitrary file read requires local access and attacker-controlled source map processing that is not exposed in normal production use.
Do not process untrusted source maps with @babel/core in production services. Restrict access to developer UI components.Source: Red Hat security advisory for GHSA-4x5r-pxfx-6jf8 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-4x5r-pxfx-6jf8 in your dependencies?
Find it across npm, including transitive dependencies.