stream-json: JSONC parser and verifier re-scan the whole accumulated comment on every input chunk
Published Oct 1, 2026
6.2
MEDIUMCVSS 3.1
Description
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 products
-
- Version < 3.6.0StatusaffectedConstraints-
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Uhop | Stream-Json | n/a |
|
No data.
No data.
No Red Hat product state for this CVE.
No package ranges for this CVE.
Remediation
No remediation recorded yet.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
No EPSS score for this CVE.
References (3)
- https://github.com/uhop/stream-json/commit/c0299dc168ce9455ef5ca5b6a0f6850ee7fa0468 x_refsource_MISC
- https://github.com/uhop/stream-json/releases/tag/3.6.0 x_refsource_MISC
- https://github.com/uhop/stream-json/security/advisories/GHSA-hqr4-qq8f-hg3x x_refsource_CONFIRM
| Link | Providers | Tags |
|---|---|---|
| https://github.com/uhop/stream-json/commit/c0299dc168ce9455ef5ca5b6a0f6850ee7fa0468 | x_refsource_MISC | |
| https://github.com/uhop/stream-json/releases/tag/3.6.0 | x_refsource_MISC | |
| https://github.com/uhop/stream-json/security/advisories/GHSA-hqr4-qq8f-hg3x | x_refsource_CONFIRM |
Change history (0)
No recorded changes yet.