Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. stream-json
  4. ›
  5. CVE-2026-104182

CVE-2026-104182: stream-json: JSONC parser and verifier re-scan the whole accumulated comment on every input chunk

October 5, 2026

The JSONC parser (stream-json/jsonc/parser.js) and verifier (stream-json/jsonc/verifier.js) scan a comment for its terminator starting from the comment’s opening / on every input chunk. When a comment doesn’t finish inside the current buffer, the scanner returns the comment’s start offset and the buffer keeps the whole comment, so the next chunk re-scans everything seen so far. A single comment of length n delivered across many chunks costs O(n²) CPU.

This is the same class as GHSA-528h-pc64-c93x (path filters, medium, CWE-407): an algorithmic-complexity re-scan in a streaming feature. It’s a different code path though — the comment scanner in handleComment, which the 3.5.0 depth cap doesn’t touch — so upgrading past that advisory doesn’t help here. The plain JSON parser is fine: its strings and numbers advance and drop consumed bytes, and only comments retain and re-scan.

References

  • github.com/advisories/GHSA-hqr4-qq8f-hg3x
  • github.com/uhop/stream-json/commit/c0299dc168ce9455ef5ca5b6a0f6850ee7fa0468
  • github.com/uhop/stream-json/releases/tag/3.6.0
  • github.com/uhop/stream-json/security/advisories/GHSA-hqr4-qq8f-hg3x
  • nvd.nist.gov/vuln/detail/CVE-2026-104182

Code Behaviors & Features

Detect and mitigate CVE-2026-104182 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 3.6.0

Fixed versions

  • 3.6.0

Solution

Upgrade to version 3.6.0 or above.

Impact 6.2 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-407: Inefficient Algorithmic Complexity

Source file

npm/stream-json/CVE-2026-104182.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 23 Oct 2026 00:16:49 +0000.