Terser: Input sourcemap sourcesContent leaks, revealing input source code

State
Published
Severity
5.3 Medium
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

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.

ProductVersions
terser terser>= 5.0.0, < 5.51.3 Affected< 4.8.2 Affected

Weaknesses

  • CWE-540 Inclusion of Sensitive Information in Source Code

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.