Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted deeply-nested JSON document
-
ExploitFlexAssembler joins growing key stack per container
-
ExecutionQuadratic CPU consumed on event loop
-
ImpactAll concurrent work in process stalls
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitation requires the consuming application to use stream-json's FlexAssembler with STRING or REGULAR-EXPRESSION path filters in its objectRules or arrayRules on versions 2.0.0 through 3.6.x; consumers using only function filters or no rules at all are NOT affected. The attacker must be able to supply a JSON or JSONC document with deep, unbounded object/array nesting to that assembler, but needs no authentication (PR:N) and no knowledge of the target schema because the costly key-stack join occurs before the rule-match decision. Limiting factors: the vulnerable string/regex-rule configuration is a non-default, specialized usage pattern; the library is documented as intended for trusted input (dumps/exports/logs), so risk hinges on whether untrusted data actually reaches the assembler; and 3.7.0 mitigates by default via a maxDepth=1024 guard that throws RangeError. |
| Impact | This is a CWE-407 algorithmic-complexity denial-of-service with availability-only impact (CVSS 6.2, vector C:N/I:N/A:H) - not an RCE or data-exposure issue, so despite being exploitable without authentication it is a moderate operational-availability concern rather than a top-tier emergency. No EPSS score, KEV listing, or standalone public exploit was provided, and there is no confirmed active exploitation: status is 'no public exploit identified at time of analysis' (note the fix commit does include a depth-based reproducer test, i.e. a trigger is trivially constructible). The single strongest limiting factor is usage-based: only consumers who use FlexAssembler with STRING or REGULAR-EXPRESSION path filters are affected - those using function filters or no rules are not - which narrows real-world applicability well below the raw library install base. There is a signal conflict worth flagging: NVD scores AV:L (local), implying local data processing consistent with the library's documented trust model ('intended input is data the user owns or trusts'), yet the described attack (a crafted document that stalls all concurrent work in a process) is only dangerous when the process feeds UNTRUSTED, often network-delivered, JSON - verify the actual exposure of your deployment. Priority is real but conditional: patch promptly if you run FlexAssembler with string/regex rules against attacker-influenced input; otherwise it is low urgency. |
| Exploit ScenarioDerived | A Node.js service ingests untrusted JSON/JSONC through stream-json's FlexAssembler configured with string or regex path rules. An attacker submits a document nested to a large depth; because the full key stack is joined on every container start before any rule match, CPU cost grows quadratically with depth, stalling the single-threaded event loop and denying service to all concurrent requests. No standalone public exploit exists, but the fix commit's test (a deeply nested object builder) shows how trivially the condition is reached, and AC:L reflects that crafting the payload requires no schema knowledge. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 21, 2026
Deeply nested JSON or JSONC documents fed into stream-json's FlexAssembler between versions 2.0.0 and 3.6.x can pin the Node.js event loop at full CPU, stalling every other operation in the host process. The trigger is the assembler's string and regular-expression path rules, which rebuild a full key-path string on every container start, so nesting depth D produces D joins of average cost D - quadratic work on a single thread. No credentials, no schema knowledge, and no user interaction are required (PR:N/UI:N), and the impact is availability only (C:N/I:N/A:H), making this a moderate operational-availability concern rather than an RCE or data-exposure emergency; no public exploit code was identified at time of analysis. Version 3.7.0 fixes the issue by adding a default maxDepth of 1024 that throws a RangeError for over-deep containers.
RemediationAI
Vendor-released patch: upgrade to stream-json 3.7.0, which ships a default maxDepth of 1024 and throws a RangeError when a container nested deeper than that starts and rules exist for its kind (see GHSA-jj87-hc4r-jwfw and https://github.com/uhop/stream-json/releases/tag/3.7.0). After upgrading, keep maxDepth at a finite value sized to your legitimate documents and never set it to Infinity for untrusted input, and make sure your stream pipeline catches and translates the RangeError into a controlled rejection rather than an unhandled crash. If upgrading is not immediately possible, switch the string/regex entries in objectRules/arrayRules to equivalent function filters (the function-filter path does not perform the key-stack join) - the trade-off is reimplementing and re-testing path matching semantics, particularly separator handling. Alternatively, enforce a nesting-depth ceiling upstream of the assembler with a lightweight counting transform or a size/depth check at the ingest boundary, rejecting documents beyond the limit; this costs you legitimate deeply nested payloads (exports and dumps can be deep, so tune per feed) and adds a second pass of logic to maintain. Running the assembler in a worker thread or child process with a CPU-time watchdog contains the blast radius by keeping the main event loop responsive, but it does not remove the quadratic cost, adds IPC overhead, and requires timeout handling for partially consumed streams. Because the library is documented as intended for trusted input, also verify that untrusted request bodies, uploads, or third-party feeds are not being piped into a FlexAssembler that still uses string or regex rules.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-407 (inefficient algorithmic complexity) in the FlexAssembler utility of the uhop/stream-json micro-library, a streaming JSON/JSONC parser designed for a minimal memory footprint. FlexAssembler lets callers swap in custom containers (Map, Set, etc.) at specific document paths via objectRules/arrayRules entries of the form {filter, create, add, finalize}. When those filters are expressed as strings or regular expressions, the library compiles them into matchers that, on every container start, join the entire accumulated key stack before deciding whether the rule matches. Because the key stack grows with nesting, a document nested to depth D incurs D joins whose individual cost scales with the current depth, producing quadratic CPU consumption. Critically, the join happens before the rule-match decision, so an attacker does not need to know the target schema or which paths are instrumented - any deeply nested object or array will do. Consumers using only function filters, or no rules at all, never enter the expensive path and are unaffected. Since Node.js runs this work on the single-threaded event loop, the quadratic burn blocks all concurrent work in the process that feeds the document. The fix in 3.7.0 (commits 1929fd8 and c06c9a3) introduces DEFAULT_MAX_DEPTH = 1024, exposes it as the maxDepth option, and throws a RangeError when the key stack exceeds the limit and rules exist for that container kind; the project documentation explicitly frames maxDepth as a guard for untrusted, unbounded input, since the library otherwise assumes data the user owns or trusts.
Know when Stream Json gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Realistic DoS exposure is via untrusted documents reaching a service (AV:N vs. NVD's conservative AV:L); trivial payload and no auth give AC:L/PR:N, with availability-only impact A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
stream-json is a micro-library of stream components for processing JSON and JSONC with a minimal memory footprint. From 2.0.0 until 3.7.0, FlexAssembler compiles string and regular-expression path filters into matchers that join the full key stack on every container start. Because the key stack grows with unbounded object or array nesting, a document nested to depth D causes D joins whose cost grows with the current depth, resulting in quadratic CPU consumption on the single-threaded event loop. The join occurs before the rule match decision, so the attacker does not need to know the target schema. Consumers using only function filters or no rules are not affected. A crafted nested document can stall all concurrent work in a process that feeds it to an affected FlexAssembler. This issue is fixed in 3.7.0, which adds a default maximum depth.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
More in Stream Json
View allQuadratic algorithmic complexity (O(D²)) in stream-json's pick, ignore, filter, and replace path filters allows an attac
Quadratic CPU consumption in the JSONC parser and verifier of the stream-json npm package (stream-json/jsonc/parser.js a
Prototype replacement in stream-json before 3.6.0 lets a JSON key literally named __proto__ overwrite the prototype of a
EUVD-2026-107412
GHSA-jj87-hc4r-jwfw
NVD
CVE.org
EPSS
Exploit-DB