{"id":"CVE-2026-49356","aliases":["CVE-2026-49356","GHSA-4x5r-pxfx-6jf8"],"related":[],"kind":"vulnerability","state":"published","title":"Babel: Arbitrary File Read via sourceMappingURL Comment in @babel/core","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Impact\n\nUsing `@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:\n- the attacker controls the input source code\n- the attacker can read the output source code\n- the attacker knows the path of the source map file that they want to read\n\n**Users that only compile trusted code are not impacted.**\n\n## Patches\n\nThe vulnerability has been fixed in `@babel/core@7.29.6` and `@babel/core@8.0.0-rc.6`.\n\n## Workarounds\n\nCallers can mitigate the issue without upgrading by setting [`inputSourceMap: false`](https://babeljs.io/docs/options#inputsourcemap) in their Babel options.\n\nCallers 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).\n\n## Credits\n\nThanks Teodor-Cristian Radoi for reporting the vulnerability.","format":"markdown","source":"ghsa"}],"published":"2026-06-15T17:14:14.000Z","modified":"2026-09-10T03:50:48.280Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N","score":3.2,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N","score":3.2,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N","score":3.2,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N","score":3.6,"rating":"LOW"}],"cwes":["CWE-22","CWE-200"],"affected":[{"ranges":[{"version":">= 8.0.0-alpha.0, < 8.0.0-rc.5","status":"affected"},{"version":"< 7.29.6","status":"affected"}],"vendor":"babel","product":"babel","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"8.0.0-alpha.0","status":"affected","fixed":"8.0.0-rc.6"}],"ecosystem":"npm","package":"@babel/core","purl":"pkg:npm/%40babel/core","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"7.29.6"}],"ecosystem":"npm","package":"@babel/core","purl":"pkg:npm/%40babel/core","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"7.29.6"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"},{"status":"affected","version":"8.0.0"}],"vendor":"babel","product":"babel","cpe":"cpe:2.3:a:babel:babel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/babel/babel/security/advisories/GHSA-4x5r-pxfx-6jf8","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49356","tags":["advisory"],"sources":["ghsa"]},{"url":"https://babeljs.io/docs/options#inputsourcemap","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/babel/babel","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-22T17:22:57.466Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49356","url":"https://www.cve.org/CVERecord?id=CVE-2026-49356","licence":"CVE Terms of Use","modified":"2026-06-22T17:23:03.327Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4x5r-pxfx-6jf8","url":"https://github.com/advisories/GHSA-4x5r-pxfx-6jf8","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:48.280Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49356","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49356","licence":"Public domain","modified":"2026-06-26T20:04:23.897Z"}],"updatedAt":"2026-11-25T22:59:25.383Z","epss":{"score":0.00161,"percentile":0.05497,"date":"2026-12-01T12:00:22.000Z"}}