MEDIUMCVSS v3.1 6.2Vulnerability

CVE-2026-114129

## 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. ```text 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 (lin

Properties

Severity
medium
Summary
stream-json: FlexAssembler string/RegExp path filters join the full key stack per container start, giving O(depth^2) CPU denial of service
Nvd fetched at
2026-10-22T22:14:18.200859+00:00
Epss score
0.00137
Cvss severity
MEDIUM
Cvss score
6.2
Retrieved at
2026-10-22T22:17:33+00:00
Ghsa published
2026-10-22T15:49:54Z
Source url
https://github.com/advisories/GHSA-jj87-hc4r-jwfw
Ghsa updated
2026-10-22T15:49:55Z
Ghsa id
GHSA-jj87-hc4r-jwfw
Last source
FIRST EPSS
Score
6.2
Cvss version
3.1
Cve id
CVE-2026-114129
Cvss vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
First seen by Signal
2026-10-21T22:34:38+00:00
Is ghsa only
false
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published at
2026-10-21T18:17:25.650

Related Entities (3)

AFFECTS (1)

→[Software]npm/stream-json

HAS_WEAKNESS (1)

VULNERABLE_TO (1)

←[Software]npm/stream-json

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-114129 (CVSS v3.1 6.2) — Ninja Signal Threat Intelligence | Ninja Signal