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

Published Oct 1, 2026
·
Updated

stream-json is a micro-library of stream components for processing JSON and JSONC with a minimal memory footprint. Prior to 3.6.0, the JSONC parser at stream-json/jsonc/parser.js and verifier at stream-json/jsonc/verifier.js restart comment-terminator scanning from the opening slash whenever a block or line comment spans an input chunk, while retaining the accumulated comment buffer. Delivering a large valid comment across many small chunks therefore causes quadratic CPU work and can stall the Node.js event loop. The maintainer characterizes the attack vector as local because the documented JSONC input is locally owned or user-controlled configuration, rather than input intended for the open internet. This JSONC-only scope does not include the plain JSON parser, which advances through and discards consumed string and number data. This issue is fixed in version 3.6.0.

Affected Software

1 affected component
npm/stream-json<3.6.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade stream-json to a version that resolves this vulnerability.

    Fixed in 3.6.0

Event History

Oct 1, 2026
CVE Published
via MITRE·08:15 PM
Data Sourced
via MITRE·08:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which uses of stream-json are affected?

Only the JSONC parser and verifier are affected when comments span input chunks. The plain JSON parser is not affected.

2

What does exploitation require?

An attacker or local user must be able to provide JSONC input containing a large valid block or line comment delivered in many small chunks. This causes repeated rescanning of the accumulated comment and can stall the Node.js event loop.

3

Are applications that only process remotely supplied JSON exposed?

The maintainer characterizes the attack vector as local because documented JSONC input is locally owned or user-controlled configuration, not input intended for the open internet. Exposure therefore depends on whether untrusted parties can influence JSONC configuration or otherwise control chunked JSONC input.

4

What should be done if the issue is relevant?

Upgrade stream-json to version 3.6.0, which fixes the issue. If upgrading is not immediately possible, avoid processing large JSONC comments from untrusted or user-controlled sources, especially when input can arrive in many small chunks.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203