# CVE-2026-140012: Terser: Input sourcemap sourcesContent leaks, revealing input source code

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 40% of CVEs (2026-12-01)
- Published: 2026-11-30T21:56:49.877Z
- Modified: 2026-12-01T18:45:08.402Z
- Also known as: GHSA-6jpm-p5cq-9q44
- Weaknesses: CWE-540
- Assigned by: GitHub_M

## Description

Terser is a JavaScript parser, mangler, and compressor toolkit for ES6+. Prior to 4.8.2, and from 5.0.0 to before 5.51.3, when minify() is given an input source map through the sourceMap.content option, Terser copies that map's sourcesContent into the generated source map even when includeSources is false. Anyone who receives the generated source map can read the original source code, which may include comments, constants, or embedded secret tokens. This issue is fixed in versions 4.8.2 and 5.51.3.

(As written by CVE List.)

## Affected

- terser terser: >= 5.0.0, < 5.51.3; < 4.8.2
- terser (npm): before 4.8.2; from 5.0.0 before 5.51.3

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/terser/terser/security/advisories/GHSA-6jpm-p5cq-9q44> (web)
- <https://github.com/terser/terser/commit/a63e814e816405e1d9cad106b1aeaa29c5c12bdc> (web)
- <https://github.com/terser/terser/commit/bab93bde6e2156cdd2fdd27eadc4dffd7362dee3> (web)
- <https://github.com/terser/terser/releases/tag/v4.8.2> (web)
- <https://github.com/terser/terser/releases/tag/v5.51.3> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-140012> (advisory)
- <https://github.com/terser/terser> (package)

## Sources

- CVE List: [CVE-2026-140012](https://www.cve.org/CVERecord?id=CVE-2026-140012), CVE Terms of Use, modified 2026-11-30
- GitHub Advisory Database: [GHSA-6jpm-p5cq-9q44](https://github.com/advisories/GHSA-6jpm-p5cq-9q44), CC-BY-4.0, modified 2026-12-01
- NVD: [CVE-2026-140012](https://nvd.nist.gov/vuln/detail/CVE-2026-140012), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-140012 · Whole record: https://cve.day/CVE-2026-140012.json · Rebuilt by cve.day 2026-12-01T19:07:25.808Z
