cvelo
P3 · MediumCVSS 5.3EPSS 0.4%

Terser: Input sourcemap sourcesContent leaks, revealing input source code

  • CVE-2026-140012
  • GHSA-6jpm-p5cq-9q44
  • EUVD-2026-139738

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.

Text from the CVE.org record.

Recommendation

Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • terser

    Affected versionsFixed in
    >= 5.0.0, < 5.51.3none stated
    < 4.8.2none stated
  • tersernpm

    Affected versionsFixed in
    from 5.0.0 to before 5.51.35.51.3
    before 4.8.24.8.2

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.