CVE-2026-114129
stream-json: FlexAssembler string/RegExp path filters join the full key stack per container start, giving O(depth^2) CPU denial of service
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
6.2
stream-json: FlexAssembler string/RegExp path filters join the full key stack per container start, giving O(depth^2) CPU denial of service
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.
- Record
CVE-2026-114129- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
EUVDEUVD-2026-107412
6.2
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.
- Record
EUVD-2026-107412- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-jj87-hc4r-jwfw
6.2
stream-json: FlexAssembler string/RegExp path filters join the full key stack per container start, giving O(depth^2) CPU denial of service
Summary
FlexAssembler, the custom-container assembler shipped in the stream-json package (src/core/utils/flex-assembler.js, re-exported at stream-json/utils/flex-assembler.js and stream-json/web/utils/flex-assembler.js), compiles a string or RegExp path filter into a matcher that runs keyStack.join(separator) on every container start. Because the key stack grows one entry per open object or array with no depth bound, a JSON document nested to depth D drives D container-start tokens that each perform an O(D) join, for O(D^2) total CPU on the single-threaded event loop. An unauthenticated party who can supply JSON bytes to a pipeline that uses a FlexAssembler with a string or RegExp rule filter can stall the process with a small input: roughly 96 KB (depth 16000) blocks the event loop for over a second, and the cost grows quadratically.
Root Cause
FlexAssembler reconstructs JavaScript values from the parser token stream and supports custom containers selected by path-matching rules. When a rule filter is a string or RegExp, compileFilter returns a matcher that computes the joined path from the full key stack before making any match decision. That join is O(current depth), and it is invoked unconditionally for every rule on every container start. The key stack that feeds the join has no depth cap. The package does have a depth guard (maxDepth), but it exists only in the unrelated filter base state machine and never executes on the FlexAssembler code path, so nested input is unbounded here.
src/core/utils/flex-assembler.js
compileFilter (lines 5-21): string branch computes `path.join(separator)` (line 10)
before the `=== filter || startsWith(...)` comparison; RegExp branch computes
`filter.test(path.join(separator))` (line 17). The join runs first, unconditionally.
FlexAssembler._matchRule (lines 160-166): calls `rule.filter(this.keyStack)` for every
rule; invoked from startObject (line 184) and startArray (line 197) on every
container start.
FlexAssembler._pushState (lines 168-176): pushes one entry onto `keyStack` per open
container with no depth bound.
Impact
An attacker who can deliver JSON to a pipeline whose FlexAssembler is configured with a string or RegExp rule filter (a documented, tested, first-class option: Filter = string | RegExp | FilterFunction) can cause quadratic CPU consumption. The join runs regardless of whether the rule ultimately matches, so no attacker knowledge of the schema is required beyond nesting depth, which the attacker fully controls. The demonstrated capability is an availability impact: a small crafted document blocks the Node.js event loop, stalling all concurrent work on the process. There is no confidentiality or integrity impact. A consumer that uses only a function filter or no rules is not affected, which narrows the vulnerable population but does not raise attack complexity once such a configuration is in use.
Proof of Concept
Node.js and the published [email protected] package. Drive a FlexAssembler configured with a string rule filter, comparing against a function filter as a negative control.
- Install
[email protected]. - Construct a deeply nested object token stream (or equivalently parse a document like
'{"k":'repeated D times, a1, then'}'repeated D times, throughparser/parserStream). - Feed it to a
FlexAssemblerwhoseobjectRulescontains a rule with a stringfilter. - Observe wall-clock time scaling as roughly 4x per doubling of D (quadratic), while a function-filter configuration stays flat.
import FlexAssembler from 'stream-json/utils/flex-assembler.js';
function run(filter, D) {
const asm = new FlexAssembler(filter ? {objectRules: [{filter, create: () => ({})}]} : undefined);
const t = performance.now();
asm.startObject();
for (let i = 0; i < D; i++) { asm.keyValue('k'); asm.startObject(); }
return performance.now() - t;
}
for (const D of…
- Record
GHSA-jj87-hc4r-jwfw- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
NVD
6.2
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.
- Record
CVE-2026-114129- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
OSV
6.2
stream-json: FlexAssembler string/RegExp path filters join the full key stack per container start, giving O(depth^2) CPU denial of service
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.
- Record
CVE-2026-114129- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
OSVGHSA-jj87-hc4r-jwfw
6.2
stream-json: FlexAssembler string/RegExp path filters join the full key stack per container start, giving O(depth^2) CPU denial of service
Summary
FlexAssembler, the custom-container assembler shipped in the stream-json package (src/core/utils/flex-assembler.js, re-exported at stream-json/utils/flex-assembler.js and stream-json/web/utils/flex-assembler.js), compiles a string or RegExp path filter into a matcher that runs keyStack.join(separator) on every container start. Because the key stack grows one entry per open object or array with no depth bound, a JSON document nested to depth D drives D container-start tokens that each perform an O(D) join, for O(D^2) total CPU on the single-threaded event loop. An unauthenticated party who can supply JSON bytes to a pipeline that uses a FlexAssembler with a string or RegExp rule filter can stall the process with a small input: roughly 96 KB (depth 16000) blocks the event loop for over a second, and the cost grows quadratically.
Root Cause
FlexAssembler reconstructs JavaScript values from the parser token stream and supports custom containers selected by path-matching rules. When a rule filter is a string or RegExp, compileFilter returns a matcher that computes the joined path from the full key stack before making any match decision. That join is O(current depth), and it is invoked unconditionally for every rule on every container start. The key stack that feeds the join has no depth cap. The package does have a depth guard (maxDepth), but it exists only in the unrelated filter base state machine and never executes on the FlexAssembler code path, so nested input is unbounded here.
src/core/utils/flex-assembler.js
compileFilter (lines 5-21): string branch computes `path.join(separator)` (line 10)
before the `=== filter || startsWith(...)` comparison; RegExp branch computes
`filter.test(path.join(separator))` (line 17). The join runs first, unconditionally.
FlexAssembler._matchRule (lines 160-166): calls `rule.filter(this.keyStack)` for every
rule; invoked from startObject (line 184) and startArray (line 197) on every
container start.
FlexAssembler._pushState (lines 168-176): pushes one entry onto `keyStack` per open
container with no depth bound.
Impact
An attacker who can deliver JSON to a pipeline whose FlexAssembler is configured with a string or RegExp rule filter (a documented, tested, first-class option: Filter = string | RegExp | FilterFunction) can cause quadratic CPU consumption. The join runs regardless of whether the rule ultimately matches, so no attacker knowledge of the schema is required beyond nesting depth, which the attacker fully controls. The demonstrated capability is an availability impact: a small crafted document blocks the Node.js event loop, stalling all concurrent work on the process. There is no confidentiality or integrity impact. A consumer that uses only a function filter or no rules is not affected, which narrows the vulnerable population but does not raise attack complexity once such a configuration is in use.
Proof of Concept
Node.js and the published [email protected] package. Drive a FlexAssembler configured with a string rule filter, comparing against a function filter as a negative control.
- Install
[email protected]. - Construct a deeply nested object token stream (or equivalently parse a document like
'{"k":'repeated D times, a1, then'}'repeated D times, throughparser/parserStream). - Feed it to a
FlexAssemblerwhoseobjectRulescontains a rule with a stringfilter. - Observe wall-clock time scaling as roughly 4x per doubling of D (quadratic), while a function-filter configuration stays flat.
import FlexAssembler from 'stream-json/utils/flex-assembler.js';
function run(filter, D) {
const asm = new FlexAssembler(filter ? {objectRules: [{filter, create: () => ({})}]} : undefined);
const t = performance.now();
asm.startObject();
for (let i = 0; i < D; i++) { asm.keyValue('k'); asm.startObject(); }
return performance.now() - t;
}
for (const D of…
- Record
GHSA-jj87-hc4r-jwfw- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
stream-jsonnpm |
2.0.0 to 3.6.0 | 3.7.0 |
stream-jsonnpm |
2.0.0 up to 3.7.0 | 3.7.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-114129 is a medium vulnerability (CVSS 6.2) in Uhop Stream-json, published October 21, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.25%, the 17th percentile. Fixed in stream-json 3.7.0.
References
github.com/uhop/stream-json/security/advisories/GHSA-jj87-hc4r-jwfw
github.com/uhop/stream-json/commit/1929fd80495d45b47e8f8cb1d4e132f915aef012
github.com/uhop/stream-json/commit/c06c9a3c02adef89543e26ecebb45837cb284512
github.com/uhop/stream-json/releases/tag/3.7.0
nvd.nist.gov/vuln/detail/CVE-2026-114129
github.com/advisories/GHSA-jj87-hc4r-jwfw
github.com/CVEProject/cvelistV5/tree/main/cves/2026/114xxx/CVE-2026-114129.json
github.com/uhop/stream-json
Left out here: the rest of 2 source descriptions. The JSON record has them.