All vulnerabilities

npm

CVE-2026-49356

@babel/core: Arbitrary File Read via sourceMappingURL Comment

Severity
Low 3.2
Published
15 Jun 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
7.29.6, 8.0.0-rc.6
Exploit chance
0.2% in the next 30 daysHigher than 4% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Information exposure (CWE-200)Path traversal (CWE-22)
Attack
Needs local access · Only under certain conditions · No login needed · No user action needed
Attacker can
Read some data
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N
Also known as
GHSA-4x5r-pxfx-6jf8
Sources
OSV.dev and GitHub

Description

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
From the GitHub Advisory Database, CC BY 4.0.

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).

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
@babel/corenpm · osv:npm:@babel/core
  • Every version before 7.29.6
  • From 8.0.0-alpha.0 before 8.0.0-rc.6

About @babel/core

Weekly downloads (npm)
263,851,916npm, 17 Nov 2026

This is the only vulnerability in @babel/core in our list.

References