Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-106447 Overview
CVE-2026-106447 is an uncontrolled recursion vulnerability [CWE-674] in the @stablelib/cbor package, part of the StableLib TypeScript and JavaScript library collection. Versions prior to 2.0.4 decode nested Concise Binary Object Representation (CBOR) arrays, maps, and tags recursively through the _decodeValue() function without enforcing a maximum nesting depth. An attacker who submits a sufficiently deep CBOR structure can exhaust the JavaScript call stack. The resulting decoding exception can terminate an uncaught request worker or process, producing a denial-of-service condition. The issue is fixed in @stablelib/cbor version 2.0.4.
Critical Impact
Remote attackers can crash Node.js workers or server processes that decode untrusted CBOR input, degrading or interrupting service availability.
Affected Products
- @stablelib/cbor versions prior to 2.0.4
- Node.js and browser applications that pass untrusted CBOR data to the decoder
- Downstream libraries and services that depend on vulnerable @stablelib/cbor releases
Discovery Timeline
- 2026-10-06 - CVE-2026-106447 published to NVD
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2026-106447
Vulnerability Analysis
The @stablelib/cbor decoder parses CBOR data by walking the input stream and invoking _decodeValue() for each element. When the decoder encounters a container type such as an array, map, or tag, it recurses into _decodeValue() to process child elements. The decoder does not track or cap recursion depth. Each nested container therefore adds another frame to the JavaScript call stack.
An attacker who crafts a payload consisting of deeply nested containers forces the engine to exceed its maximum call stack size. The runtime raises a RangeError. If the caller does not wrap the decode operation in a try/catch, the exception propagates and can terminate the worker or process. In server contexts that accept CBOR input from the network, this converts a single small payload into a reliable denial-of-service primitive.
Root Cause
The root cause is the absence of a configurable depth limit in the recursive descent decoder. The function treats container nesting as unbounded, which is unsafe for parsers operating on attacker-controlled input. This matches the CWE-674: Uncontrolled Recursion weakness pattern.
Attack Vector
The attack vector is network-based and requires no authentication or user interaction. Any endpoint that accepts CBOR-encoded data and passes it to @stablelib/cbor for decoding is reachable. The attacker only needs to transmit a small CBOR document whose header bytes describe a long chain of nested arrays, maps, or tags. The server stack size, not the payload size, determines the failure threshold.
Full technical details are available in the GitHub Security Advisory GHSA-5jg4-p4qw-cgfr and the upstream fix commit.
Detection Methods for CVE-2026-106447
Indicators of Compromise
- Repeated RangeError: Maximum call stack size exceeded entries in Node.js logs correlated with CBOR decode operations.
- Unexpected worker, container, or process restarts following inbound requests carrying application/cbor or similar content types.
- Spikes in short-lived request errors from a single source targeting endpoints that accept binary payloads.
Detection Strategies
- Inventory dependencies with npm ls @stablelib/cbor across projects and flag any version below 2.0.4.
- Add runtime instrumentation around CBOR decode calls to log payload size and depth metrics for anomaly review.
- Correlate web server access logs with application crash events to identify payloads that precede process termination.
Monitoring Recommendations
- Alert on sustained process restart loops in services that handle CBOR input from untrusted clients.
- Monitor API gateways for anomalous ratios of binary request content type against baseline traffic.
- Track dependency drift using software composition analysis tooling and raise findings on @stablelib/cbor < 2.0.4.
How to Mitigate CVE-2026-106447
Immediate Actions Required
- Upgrade @stablelib/cbor to version 2.0.4 or later in all applications and transitive dependencies.
- Audit services that accept CBOR input and ensure decode calls are wrapped in error handlers that cannot terminate the process.
- Apply ingress rate limiting and request size limits to endpoints that accept binary serialization formats.
Patch Information
The fix landed in @stablelib/cbor 2.0.4. See the release notes and the patch commit for the exact code change that introduces depth tracking during decode.
Workarounds
- If an immediate upgrade is not possible, wrap decode() calls in try/catch blocks and reject payloads that raise RangeError.
- Enforce a maximum request body size at the reverse proxy or API gateway to limit the practical nesting depth an attacker can submit.
- Isolate CBOR decoding in a sacrificial worker process so that a crash does not take down the parent request handler.
# Upgrade the vulnerable dependency
npm install @stablelib/cbor@^2.0.4
# Verify no vulnerable versions remain in the tree
npm ls @stablelib/cbor
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

