IT SBIT Services
Schneeberger
DEEN
CVE tracker

@stablelib/cbor: Stack exhaustion denial of service via deeply nested CBOR data

CVE-2026-106447High 8.7

← All vulnerabilities

Summary

The @stablelib/cbor npm package decodes CBOR data by processing nested arrays, maps and tags recursively, without a maximum nesting depth, before version 2.0.4. An attacker who can send crafted, deeply nested CBOR data to an application that decodes untrusted input can exhaust the JavaScript call stack. This causes a decoding exception that can terminate the request worker or process, resulting in a denial of service. No authentication is required where the decoder processes untrusted input.

Affected

  • @stablelib/cbor (npm) versions before 2.0.4 according to the CVE record
  • GitHub advisory GHSA-5jg4-p4qw-cgfr lists versions below 2.0.3; treat 2.0.4 as the minimum safe version

Fixed in

  • 2.0.4 (release tag @stablelib/cbor@2.0.4). Sources conflict on 2.0.3, so 2.0.4 is the safe target.

Workaround

  • Catch the depth-exceeded error thrown by the decoder so that the process is not terminated (per the GHSA advisory)
  • Validate or limit CBOR nesting depth before calling the decoder; the fix adds a default nesting limit of 128, configurable via the maxDepth option
  • Restrict endpoints that accept CBOR and enforce request size limits (suggestion, not from a source)

Exploitation

  • A public proof of concept exists (reproduction example in the GHSA advisory); CISA SSVC lists exploitation as poc and automatable as yes, with partial technical impact
  • No evidence of active exploitation or KEV listing was found in the sources

Our recommendation

  • Upgrade @stablelib/cbor to 2.0.4 or later, after verifying the current version
  • Check whether your applications use this package directly or via dependencies (for example with npm ls @stablelib/cbor)
  • Until patched, apply the workarounds and monitor for unexpected worker or process crashes

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 05:27.

Original description (NVD)

StableLib is a stable library of useful TypeScript and JavaScript code. Prior to 2.0.4, the @stablelib/cbor decoder recursively processes nested CBOR arrays, maps, and tags through _decodeValue() without enforcing a maximum nesting depth. A sufficiently deep structure exhausts the JavaScript call stack, causing a decoding exception and potentially terminating an uncaught request worker or process. This issue is fixed in version 2.0.4.

NVD references (4)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.