Medium · 6.2 Node.js & npm GHSA-jj87-hc4r-jwfw CVE-2026-114129
stream-json FlexAssembler Denial-of-Service Flaw Fixed in 3.7.0 (CVE-2026-114129)
A quadratic CPU consumption flaw in stream-json's FlexAssembler component, affecting versions 2.0.0 through 3.6.0, can let a deeply nested JSON document stall a Node.js process. The issue is fixed in 3.7.0.
By PatchBriefing · ·
Produced automatically from official sources with the help of AI. How we work →
AI summary
A vulnerability has been disclosed in stream-json, an npm library used to process JSON and JSONC data as streams with a low memory footprint. The issue, tracked as CVE-2026-114129 (GHSA-jj87-hc4r-jwfw), affects the FlexAssembler component when it is configured with string or regular-expression path filters. It allows a specially crafted, deeply nested JSON document to cause excessive CPU usage. The problem is resolved in version 3.7.0.
What happened
A vulnerability was disclosed in stream-json affecting the FlexAssembler component. When FlexAssembler is configured with string or regular-expression path filters, it compiles those filters into matchers that join the full key stack every time a container (object or array) starts. Because the key stack grows with the nesting depth of the input document, the cost of these joins grows with depth, resulting in quadratic CPU consumption as a document's nesting increases. The join happens before any rule-match decision is made, so an attacker does not need to know the schema of the data being processed to trigger the issue.
Technical cause
The root cause is CWE-407 (Inefficient Algorithmic Complexity). FlexAssembler's string and RegExp path-filter matchers join the entire current key stack on every container start, regardless of nesting depth. Since the key stack length scales with the depth of the JSON document (D), and this join occurs once per container start, the total work scales quadratically with D. Consumers that use only function-based filters, or that configure no path-filter rules at all, are not affected by this issue, since the costly join operation is specific to string and RegExp filter compilation.
Why it matters
stream-json runs on Node.js, which uses a single-threaded event loop for JavaScript execution. A crafted, deeply nested JSON document fed to an affected FlexAssembler configuration can consume disproportionate CPU time, stalling all concurrent work being handled by that process. This is a denial-of-service concern for any service that parses untrusted or externally supplied JSON through FlexAssembler with string or RegExp path filters.
Who is affected
Any application using stream-json's FlexAssembler with string or regular-expression path filters, on versions 2.0.0 through 3.6.0, is affected. Applications that use FlexAssembler exclusively with function-based filters, or without any path-filter rules, are not affected.
Affected versions
stream-json versions from 2.0.0 up to and including 3.6.0 are affected. Version 3.7.0 contains the fix.
Fixes and mitigation
The issue is fixed in stream-json 3.7.0, which adds a default maximum depth limit to prevent unbounded growth of the key stack from driving quadratic CPU cost.
Recommended action
Site owners and developers using stream-json should upgrade to version 3.7.0. Applications that rely on FlexAssembler with string or RegExp path filters to process JSON from untrusted or externally controlled sources should prioritize this update.
PatchBriefing score
6.2 / 10 · Medium
Official CVSS: 6.2
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS 0.0019 (5 percentile)
Why this score
The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.
Affected versions
- stream-json >= 2.0.0, <= 3.6.0
- vulnerable
- stream-json ≥ 2.0.0 < 3.7.0
- vulnerable
- ≥ 3.7.0
- patched
Reported fixes
The issue is fixed in stream-json 3.7.0, which adds a default maximum depth limit to prevent unbounded growth of the key stack from driving quadratic CPU cost.
How this was built
3 source records were collected, matched and used to prepare the report above.
-
NVD (NIST) database
-
GitHub Advisory Database database
-
OSV.dev database
Revision history
- Published
- Generated
- Published
- Generated