MEDIUMCVSS v3.1 5.3Vulnerability

CVE-2026-140012

### Impact Leakage of user source code, which may include comments, constants with secret tokens, etc. When using Terser with an input sourcemap (sourceMap.content), and this input sourcemap has original source information (`sourcesContent`), Terser leaks this `sourcesContent` into the output, even when the user specified `includeSources: false` to opt-out. ### Details To help developers debug their JS applications, Terser's minify function reads and produces [source maps](https://developer.mozilla.org/en-US/docs/Glossary/Source_map). To minify a JS file that has a corresponding source map, and generate a source map in turn, we call Terser's minify function like so: ```js const out = await minify(INPUTFILE, { sourceMap: { content: INPUTMAP, }, }); out.map // output source map ``` Source maps may contain the content of files, in their `sourcesContent` property. Files which may include secrets. Terser shouldn't include `sourcesContent` by default, unless we pass `includeSources: true` under `sourceMap` options. But it does include the `sourcesContent` of the INPUTMAP even if `includeSources: false`, which is the leak we're discussing. ### Patches The problem will be patched in version `5.51.3`, and `4.8.2`. ### Workarounds Do not use an input sourcemap (`sourceMap.content` option).

Properties

Severity
medium
Summary
Terser: Input sourcemap sourcesContent leaks, revealing input source code
Nvd fetched at
2026-12-02T06:37:54.190518+00:00
Epss score
0.00449
Cvss severity
MEDIUM
Cvss score
5.3
Retrieved at
2026-12-02T06:40:14+00:00
Ghsa published
2026-12-01T18:35:11Z
Source url
https://github.com/advisories/GHSA-6jpm-p5cq-9q44
Ghsa updated
2026-12-01T18:35:14Z
Ghsa id
GHSA-6jpm-p5cq-9q44
Last source
FIRST EPSS
Score
5.3
Cvss version
3.1
Cve id
CVE-2026-140012
Cvss vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
First seen by Signal
2026-11-30T22:28:40+00:00
Name
CVE-2026-140012
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Related Entities (3)

AFFECTS (1)

→[Software]npm/terser

VULNERABLE_TO (1)

←[Software]npm/terser

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-140012 (CVSS v3.1 5.3) — Ninja Signal Threat Intelligence | Ninja Signal