Intel

AIKIDO-2026-925863

cbor2 is vulnerable to Memory Leak

GHSA-x2xm-p98v-j3v7Published Aug 5, 2026
August 5, 2026

53

CVE Score

Medium

Memory Leak

Are you affected? Scan for Free

TL;DR

The C extension decoder in cbor2 decodes a definite-length text string larger than 64 KB by reading it in chunks and concatenating them. Each concatenation allocates a new combined string but the previous intermediate string is never released, so memory accumulates for every chunk and is retained for the lifetime of the process. Decoding untrusted CBOR text strings from a network source lets a caller retain large amounts of unreclaimed memory and eventually exhaust available resources. The fix releases each intermediate result before it is overwritten by the concatenated string.

How do I fix this?

Upgrade the cbor2 library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you decode untrusted CBOR data using the C extension decoder.

Package

Versions

5.6.0 - 5.8.0

Fixed in 5.9.0

Background info

cbor2 is vulnerable to Memory Leak in versions 5.6.0 - 5.8.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea