Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit JS source with crafted #sourceMappingURL pointing to target file
-
DeliveryBabel resolves path and reads target .map file from host filesystem
-
ExploitFile contents embedded into Babel compilation output
-
ExecutionAttacker reads build output or artifact
-
ImpactTarget file contents exfiltrated
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires all three of the following conditions to be simultaneously true: (1) the attacker controls the content of the source code being compiled by @babel/core - this is the enabling condition and excludes all deployments that only compile internally authored, trusted code; (2) the attacker can read the output produced by Babel after compilation - this limits exploitation to scenarios where build artifacts, transpiled output, or logs are accessible to the attacker; (3) the attacker knows or can guess the absolute or relative path of the source map file they wish to read on the host system. Exploitation is also limited to files that the Babel process has read permissions for on the host filesystem. The |
| Impact | The CVSS base score of 3.2 (Low) reflects a tightly constrained exploitation scenario: AV:L indicates the original assessment treats this as a local-vector attack, AC:H captures the high complexity due to three simultaneous conditions, S:C (Scope Changed) recognizes that Babel reads files outside its own data scope, and C:L reflects limited confidentiality impact. However, in real-world deployments where Babel compiles externally submitted or user-provided code - a common scenario in CI/CD systems accepting pull requests, online JavaScript playgrounds, or multi-tenant transpilation services - the effective attack vector is closer to network-accessible, making the practical risk materially higher than the raw score suggests. No EPSS data was provided in the input, and the vulnerability is not listed in CISA KEV, indicating no confirmed active exploitation. No public proof-of-concept is identified. The three-condition requirement (attacker controls input, attacker can read output, attacker knows the target path) meaningfully limits opportunistic exploitation, but in targeted scenarios - such as a malicious open-source contributor submitting code to a CI pipeline - all three conditions can plausibly be satisfied simultaneously. Teams running Babel against trusted-only code are explicitly not impacted per the vendor advisory. |
| Exploit ScenarioDerived | A malicious contributor submits a pull request to an open-source project whose CI pipeline compiles JavaScript using @babel/core. The submitted file contains a crafted |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 15, 2026
Arbitrary source map file read in @babel/core allows an attacker who controls Babel's input source code to exfiltrate any source map file (.map) accessible to the process running Babel, provided the attacker can also read the compilation output and knows the target file path. This affects all @babel/core versions up to and including 7.29.0 and the 8.0.0 alpha/rc series prior to 8.0.0-rc.6. No public exploit is identified at time of analysis, and exploitation is constrained by three simultaneous conditions, but the vulnerability is significant in environments that compile untrusted or externally submitted code - such as online transpilers, CI/CD pipelines accepting external PRs, or multi-tenant build services.
RemediationAI
The primary fix is to upgrade @babel/core to version 7.29.6 (for the stable 7.x series) or 8.0.0-rc.6 (for the 8.x pre-release series), as confirmed by the vendor advisory at https://github.com/babel/babel/security/advisories/GHSA-4x5r-pxfx-6jf8. For teams unable to upgrade immediately, the vendor provides two workarounds: the simplest is to set inputSourceMap: false in Babel configuration options, which prevents Babel from resolving any #sourceMappingURL hints and eliminates the attack vector entirely - the trade-off is that source map chaining for compiled output will not function, which may affect debugging workflows. A more surgical workaround is to pre-process the input source code before passing it to Babel: extract the #sourceMappingURL comment, validate that the referenced path is within an allowlisted set of locations, pass the validated source map as an object to the inputSourceMap option if allowed, or pass false if the path is not permitted. This preserves source map functionality for trusted inputs while blocking exploitation, but requires careful implementation to avoid incomplete validation. Reference for the inputSourceMap option: https://babeljs.io/docs/options#inputsourcemap.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The JavaScript ecosystem convention of embedding a #sourceMappingURL comment in source files allows debuggers and build tools to locate corresponding source maps. When @babel/core processes input source code containing this comment, it attempts to resolve and read the referenced source map file to preserve debug information across compilation steps - this is controlled by the inputSourceMap option, which defaults to following the #sourceMappingURL hint. CWE-22 (Path Traversal) applies here because Babel does not sufficiently restrict or validate the path embedded in the #sourceMappingURL comment, allowing a crafted comment to point to an arbitrary file path on the host filesystem. Because source map files conventionally use the .map extension and are JSON, the attacker is limited to reading files that Babel can interpret as source maps, but given that the path is attacker-controlled, any file with a path the attacker knows can potentially be targeted. The affected packages are pkg:npm/@babel_core versions <= 7.29.0 and >= 8.0.0-alpha.0 through < 8.0.0-rc.6.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
AV:N reflects realistic deployment as a build service compiling external code; AC:H captures three simultaneous exploitation conditions; C:L for limited source map file read only.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
1DescriptionNVD
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
EUVD-2026-38302
GHSA-4x5r-pxfx-6jf8
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB