CVE-2026-104182: stream-json JSONC parser ReDoS in comment handling

CVE-2026-104182 · Severity: medium · CVSS 6.2 · Published 2026-10-01

stream-json is a Node.js library for efficiently parsing JSON and JSONC (JSON with comments) with minimal memory usage. A flaw in the JSONC comment parser causes it to rescan comments inefficiently when they span multiple data chunks, leading to quadratic CPU consumption that can freeze the Node.js event loop. This attack requires local access to configuration files or user-controlled input processed by the library.

Technologies: stream-json (npm). Vendors: npm, Uhop.

Quick answers

Is CVE-2026-104182 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-104182 being exploited in the wild.
How severe is CVE-2026-104182?
Medium severity, with a CVSS score of 6.2, published 1 October 2026.
Which products and versions are affected?
stream-json (npm) <= 3.5.0, SEMVER:introduced=0,fixed=3.6.0; Uhop Stream-Json before 3.6.0.
Is there a fix for CVE-2026-104182?
Yes. stream-json (npm): upgrade to 3.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-104182 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-104182?
Check whether you run stream-json (npm) or Uhop Stream-Json at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • stream-json (npm): upgrade to 3.6.0 or later
    npm install stream-json@3.6.0

Technical details

The JSONC parser and verifier in stream-json restart comment-terminator scanning from the opening slash on each input chunk while retaining the accumulated comment buffer, causing quadratic time complexity. When a large valid comment is delivered across many small chunks, the CPU work grows quadratically and can stall the event loop. This is a ReDoS-like vulnerability specific to JSONC; the plain JSON parser is unaffected because it properly advances through and discards consumed data. The attack requires local control over chunked input to the JSONC parser.

Affected products

  • uhop stream-json before 3.6.0

Identifiers

  • CVE-2026-104182
  • GHSA-hqr4-qq8f-hg3x

Timeline

  • 2026-10-01: disclosed
  • 2026-08-28: patched: commit c0299dc reworked comment handling

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.