CVE Professor
/
All CVEs
CVE-2026-140012

CVE-2026-140012 — Terser — CWE-540

MEDIUM CVSS 5.3 ⚡ EPSS 0.4% CVE.org

### 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).

### 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).

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality Low C:L
Integrity None I:N
Availability None A:N
EPSS — Exploit Prediction Scoring System
0.4%
30-day probability
In the 41. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-140012
CVSS 5.3/10 · MEDIUM · 30.11.2026
CWE: CWE-540
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 WHAT IS THIS VULNERABILITY?
Summary: ### 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 debu…
Affected: terser terser

⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · no user interaction (UI:N) · low attack complexity (AC:L).

🌍 REAL WORLD IMPACT
Partial confidentiality disclosure (C:L).

🛡️ REMEDIATION
→ Apply vendor security update for terser terser.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.

⚠️ URGENCY
📋 Routine update cycle (30 days)

────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="terser terser"
CVSS Score
5.3 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-540
Affected Products (1)
terser:terser (>= 5.0.0, < 5.51.3)
References & Advisories (5)
Related CVEs
7.6
CVE-2026-132109
Incorrect authorization in the binary exporter servlet (BinaryExporterServlet, /contentAsset) and in legacy co
8.9
CVE-2026-144591
PhpSpreadsheet through 5.12.0 contains a server-side request forgery vulnerability that allows attackers to re
8.5
CVE-2026-120096
Missing authorization in the push publishing endpoints REST API (/api/v1/environments/endpoints) and in the pu
8.2
CVE-2026-144617
Traccar 6.13.0 before 6.18.0 contains a denial of service vulnerability that allows remote attackers knowing a
8.2
CVE-2026-144623
Micronaut core HTTP client 4.10.24 through 4.10.37 and 5.0.1 through 5.3.0 contains a credential leak vulnerab
8.2
CVE-2026-144684
postcss-selector-parser before 6.1.6 and 7.x before 7.1.8 contains a denial of service vulnerability that allo
8.2
CVE-2026-144963
Docutils before 0.23.1 contains a TeX injection vulnerability in the LaTeX writer that allows attackers supply