stream-json is vulnerable to Denial of Service (DoS)
62
Medium Risk
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.
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.
stream-json is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 3.5.0.
Upgrade the stream-json library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.