Intel

AIKIDO-2026-568022

stream-json is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)GHSA-hqr4-qq8f-hg3x Published Yesterday

62

Medium Risk

This Affects:

JSstream-json
0.0.1 - 3.5.0
Fixed in 3.6.0
Are you affected? Scan for Free

TL;DR

The JSONC parser and verifier scan the whole accumulated comment text on every input chunk instead of resuming from the previous scan position. A single comment split across many chunks is re-scanned repeatedly, so a comment of length n costs O(n^2) CPU and stalls the event loop for seconds on a multi-megabyte comment. The fix processes comments as chunked startComment/commentChunk/endComment tokens so scanning resumes across chunks in linear time.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use the JSONC parser or verifier (stream-json/jsonc/*) to process untrusted input.

Background info

stream-json is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 3.5.0.

How to fix this

Upgrade the stream-json library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform