Terser source code leak in source map generation
- Exploited
- No known exploitation
- Fix
- Fixed in 5.51.3, 4.8.2
- Who is exposed
- Not reported
Summary
Terser, a JavaScript minification toolkit, copies input source map contents into generated source maps even when that option is turned off, so anyone who receives the generated map can read the original source code, which may include secrets. An attacker can do this remotely, without logging in or any user action.
Written by a model
Original 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.
What to do
Upgrade to a fixed version: 5.51.3, 4.8.2.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-140012 (Terser: Input sourcemap sourcesContent leaks, revealing input source code), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-140012 (entry last updated 2026-11-30):
Affected:
- terser terser: from 5.0.0, fixed in 5.51.3; fixed in 4.8.2
Fixed versions: 5.51.3, 4.8.2.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
CISA KEV: CVE-2026-140012 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-140012 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/terser/terser/security/advisories/GHSA-6jpm-p5cq-9q44
- https://github.com/terser/terser/commit/a63e814e816405e1d9cad106b1aeaa29c5c12bdc
- https://github.com/terser/terser/commit/bab93bde6e2156cdd2fdd27eadc4dffd7362dee3
- https://github.com/terser/terser/releases/tag/v4.8.2
- https://github.com/terser/terser/releases/tag/v5.51.3
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-140012
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-140012"}.Affected versions
- terser terserFrom 5.0.0 · fixed in 5.51.3; fixed in 4.8.2
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure17/25No login or user action needed per the CVSS vector, reachable over the network without a login · Unknown: No advisory context yet
- Reach?/20Unknown. No tracked technology or package matched
- Severity5.3/10CVSS 5.3
- No patch0/5No signal
What would change the score
- Would score about 67 if added to CISA KEV
- Would score about 62 if CISA's SSVC rates exploitation active
- Would score about 27 if advisories confirm default setups are exposed
Timeline
- CVE published
- First seen by cve.now
Evidence 7
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Advisory | GitHub · terser/terser · Advisory GHSA-6jpm-p5cq-9q44 |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-140012 |
| Record | NVD · CVE-2026-140012 |
| Other links 4 | |
| Repository | GitHub · terser/terser · Commit a63e814e |
| Repository | GitHub · terser/terser · Commit bab93bde |
| Repository | GitHub · terser/terser · Release v4.8.2 |
| Repository | GitHub · terser/terser · Release v5.51.3 |
Questions about CVE-2026-140012
Is CVE-2026-140012 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-140012?
terser: from 5.0.0 before 5.51.3; before 4.8.2.
Source: cve.now feed data
How do I fix CVE-2026-140012?
Upgrade to a fixed version: 5.51.3, 4.8.2.
Source: cve.now feed data
Related
- CVE-2026-78192WebDyne versions from 2.022 before 3.022 for Perl disclose application source to unauthenticated clients via the viewer in the default…
- CVE-2026-105623Zenitel Connect web interface serves production JavaScript source maps without authentication
- CVE-2025-0166Multiple vulnerabilities in IBM watsonx Orchestrate with watsonx Assistant Cartridge
- CVE-2026-138424TOTOLINK N350RT Web Management cstecgi.cgi missing authentication
- CVE-2026-138417Tenda AX9 Web Management Backend setMacFilterCfg system os command injection
- CVE-2026-138407Beetel 777VR1 Broadband Router Router Management Console improper authentication
No corrections so far. Something wrong on this page? Report an error.