CVE-2026-140012
MEDIUM 5.3CVSS 3.1Terser: Input sourcemap sourcesContent leaks, revealing input source code
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.
- Published
- 30 Nov 2026
- Last modified
- 3 Dec 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Received
- Weakness
- CWE-540
- Also known as
- GHSA-6jpm-p5cq-9q44
- Sources
- NVDJSONCVE ListJSONOSV GHSA-6jpm-p5cq-9q44JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| CVE List | GitHub_M | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| CVE List | CISA-ADP | SSVC | Exploitation: none; Automatable: yes; Technical Impact: partial |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| CVE List | terser | terser | = >= 5.0.0, < 5.51.3; = < 4.8.2 | |
| OSV | npm | terser | < 4.8.2 | 4.8.2 |
| OSV | npm | terser | >= 5.0.0, < 5.51.3 | 5.51.3 |
References
- https://github.com/terser/terser/commit/a63e814e816405e1d9cad106b1aeaa29c5c12bdc · x_refsource_MISC, WEB
- https://github.com/terser/terser/commit/bab93bde6e2156cdd2fdd27eadc4dffd7362dee3 · x_refsource_MISC, WEB
- https://github.com/terser/terser/releases/tag/v4.8.2 · x_refsource_MISC, WEB
- https://github.com/terser/terser/releases/tag/v5.51.3 · x_refsource_MISC, WEB
- https://github.com/terser/terser/security/advisories/GHSA-6jpm-p5cq-9q44 · x_refsource_CONFIRM, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-140012 · ADVISORY
- https://github.com/terser/terser · PACKAGE
History
- 3 Dec 2026 17:56 UTC · NVD: updated (other details)
- 3 Dec 2026 16:56 UTC · CVE List: updated (other details)
- 1 Dec 2026 19:30 UTC · OSV: first stored (published 1 Dec 2026)
- 30 Nov 2026 22:30 UTC · NVD: first stored (published 30 Nov 2026)
- 30 Nov 2026 22:08 UTC · CVE List: first stored (published 30 Nov 2026)