GHSA-4x5r-pxfx-6jf8

Suggest an improvement
Source
https://github.com/advisories/GHSA-4x5r-pxfx-6jf8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-4x5r-pxfx-6jf8/GHSA-4x5r-pxfx-6jf8.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4x5r-pxfx-6jf8
Aliases
Downstream
CGA (232)
MINI (13)
Published
2026-06-15T17:14:14Z
Modified
2026-09-10T03:50:48Z
Severity
  • 3.2 (Low) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N CVSS Calculator
Summary
@babel/core: Arbitrary File Read via sourceMappingURL Comment
Details

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/core@7.29.6 and @babel/core@8.0.0-rc.6.

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.

Database specific
{
    "cwe_ids":  [
        "CWE-200",
        "CWE-22"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-06-15T17:14:14Z",
    "nvd_published_at":  "2026-06-22T18:16:41Z",
    "severity":  "LOW"
}
References

Affected packages

npm / @babel/core

Package

Name
@babel/core
View open source insights on deps.dev
Purl
pkg:npm/%40babel/core

Affected ranges

Type
SEMVER
Events
Introduced
8.0.0-alpha.0
Fixed
8.0.0-rc.6

Database specific

last_known_affected_version_range
"< 8.0.0-rc.5"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-4x5r-pxfx-6jf8/GHSA-4x5r-pxfx-6jf8.json"

npm / @babel/core

Package

Name
@babel/core
View open source insights on deps.dev
Purl
pkg:npm/%40babel/core

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
7.29.6

Database specific

last_known_affected_version_range
"<= 7.29.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-4x5r-pxfx-6jf8/GHSA-4x5r-pxfx-6jf8.json"