NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-49356: @babel/core: Arbitrary File Read via sourceMappingURL Comment

lowCVSS 3.1 3.2GHSA-4x5r-pxfx-6jf8

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.

Published Jun 15, 2026 · Updated Jul 15, 2026

Affected packages

@babel/core

Ecosystem
npm
Affected
>= 8.0.0-alpha.0, < 8.0.0-rc.5
Fixed in
8.0.0-rc.6
Check
npm ls @babel/core

@babel/core

Ecosystem
npm
Affected
<= 7.29.0
Fixed in
7.29.6
Check
npm ls @babel/core

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to radoi-teodor, JLHwung, nicolo-ribaudo, liuxingbaoyu.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology