Terser: Input sourcemap sourcesContent leaks, revealing input source code
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| terserterser | — | Not listed |
| npmterser |
≥ 5.0.0, < 5.51.3→ 5.51.3 |
5.51.3 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Ubuntu UBUNTU-CVE-2026-140012 node-terser No fixed version in this record
Original description The description as published by the source.
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.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- patch github.com
- web github.com
- web github.com
- web github.com