Description
Babel is a compiler for writing next generation JavaScript. Prior to 8.0.0-rc.6 and 7.29.6, @babel/core affected by an arbitrary file read via a sourceMappingURL comment. Using @babel/core to compile maliciously crafted code can allow an attacker to read any source map from the system that is running Babel, if the attacker controls the input source code, can read the output source code, and knows the path of the source map file that they want to read. This vulnerability is fixed in 8.0.0-rc.6 and 7.29.6.
Published: 2026-06-22
Score: 3.2 Low
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability lies in the handling of a sourceMappingURL comment by @babel/core. Injecting a specially crafted comment allows a code consumer who controls the input source text to trigger Babel to read any source map file that is present on the host system, provided the path of the desired file is known. This results in an information‑exposure flaw, potentially revealing source map contents that may contain source code or configuration data. The weaknesses underlying the issue correspond to information exposure (CWE-200) and path traversal (CWE-22), and the impact is limited to reading the contents of arbitrary files on the system.

Affected Systems

Vendors and products affected are Babel’s @babel/core compiler. All versions prior to 8.0.0-rc.6 and 7.29.6 are vulnerable; the problem is fixed in 8.0.0-rc.6 and 7.29.6 and later releases.

Risk and Exploitability

The CVSS score of 3.2 indicates a low severity assessment; no EPSS score is provided, and the vulnerability is not listed in CISA KEV. The exploit requires that an attacker can supply input source code that is processed by a running instance of Babel, which is typically a local or trusted‑code scenario. Based on the description, it is inferred that an attacker without network access would need to obtain execution privileges on the host executing Babel to supply malicious code. The low CVSS score reflects that the primary consequence is confidential data exposure via file reads, rather than code execution or denial of service.

Generated by OpenCVE AI on June 22, 2026 at 18:24 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade @babel/core to 7.29.6 or later, or 8.0.0-rc.6 or later.
  • If an upgrade is not possible, sanitize or strip sourceMappingURL comments from any code before it is processed by Babel.
  • Disable source‑map generation or store source maps in a directory that is inaccessible to the process running the compiler.

Generated by OpenCVE AI on June 22, 2026 at 18:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-4x5r-pxfx-6jf8 @babel/core: Arbitrary File Read via sourceMappingURL Comment
History

Mon, 22 Jun 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 22 Jun 2026 17:30:00 +0000

Type Values Removed Values Added
Description Babel is a compiler for writing next generation JavaScript. Prior to 8.0.0-rc.6 and 7.29.6, @babel/core affected by an arbitrary file read via a sourceMappingURL comment. Using @babel/core to compile maliciously crafted code can allow an attacker to read any source map from the system that is running Babel, if the attacker controls the input source code, can read the output source code, and knows the path of the source map file that they want to read. This vulnerability is fixed in 8.0.0-rc.6 and 7.29.6.
Title Babel: Arbitrary File Read via sourceMappingURL Comment in @babel/core
Weaknesses CWE-200
CWE-22
References
Metrics cvssV3_1

{'score': 3.2, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-22T17:23:03.327Z

Reserved: 2026-05-29T14:35:45.904Z

Link: CVE-2026-49356

cve-icon Vulnrichment

Updated: 2026-06-22T17:22:59.765Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-22T18:30:15Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')