@babel/core
Affected
- introduced
8.0.0-alpha.0, fixed8.0.0-rc.6(semver)
Fixed versions
8.0.0-rc.6
Fix
- Fixed version
8.0.0-rc.6npm install @babel/[email protected]
Advisory
Also known as: CVE-2026-49356
@babel/core: Arbitrary File Read via sourceMappingURL Comment
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:
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.
Low Basis: The source's own band: LOW
8.0.0-alpha.0, fixed 8.0.0-rc.6 (semver)8.0.0-rc.6
8.0.0-rc.6npm install @babel/[email protected]0, fixed 7.29.6 (semver)7.29.6
7.29.6npm install @babel/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0