CVE-2026-140012

Terser: Input sourcemap sourcesContent leaks, revealing input source code

Published Nov 30, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-6jpm-p5cq-9q44 Terser: Input sourcemap sourcesContent leaks, revealing input source code
History
Type Values Removed Values Added
First Time appeared Terser
Terser terser
Vendors & Products Terser
Terser terser
Type Values Removed Values Added
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.
Title Terser: Input sourcemap sourcesContent leaks, revealing input source code
Weaknesses CWE-540
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Dec 3, 2026, 4:59 PM
Reserved
Nov 30, 2026, 6:42 PM
Status
Received
Published
Nov 30, 2026, 10:17 PM
Modified
Dec 3, 2026, 4:18 PM