Critical Vulnerability in cbor2 Package: Potential Service Crash Due to Malicious CBOR Input

cbor2 Updated 02 Oct 2025

Summary

19/02/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-26134: cbor2 provides encoding and decoding for the Concise Binary Object Representation (CBOR) (RFC 8949) serialization format. Affects cbor2 versions < 5.6.2-1. Fixed in 5.6.2-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The cbor2 package provides encoding and decoding functionalities for the Concise Binary Object Representation (CBOR) serialization format, as defined in RFC 8949. It is widely used in applications that require efficient data serialization and deserialization. However, versions prior to 5.6.2 are vulnerable to a specific attack that can lead to service crashes when processing malformed CBOR data.

Vulnerability Detail

The vulnerability arises from a flaw in the cbor2 package, specifically in versions 5.5.1 through 5.6.1. An attacker can exploit this vulnerability by sending a specially crafted CBOR object that is excessively long, causing the service utilizing cbor2 to crash. This could lead to denial of service, impacting the availability of applications relying on this package. The issue has been addressed in version 5.6.2, which includes a patch to mitigate the risk.

How To Fix

Minimum fixed version

5.6.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade cbor2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not feasible, consider implementing input validation to restrict the size of CBOR objects processed by your application. This can help mitigate the risk of service crashes until the package can be updated.

Conclusion

The cbor2 package has a critical vulnerability that can lead to service crashes when processing malicious CBOR data. It is essential to update to version 5.6.2 or later to mitigate this risk. Implementing input validation can serve as a temporary measure until the update is applied.

See every vulnerability recorded for cbor2 →

Share this vulnerability

FAQ

cbor2 is a Python library that provides encoding and decoding for the Concise Binary Object Representation (CBOR) serialization format, allowing efficient data serialization.

Versions 5.5.1 through 5.6.1 of the cbor2 package are affected by this vulnerability.

Exploiting this vulnerability can lead to a denial of service, causing applications that use cbor2 to crash when processing malicious CBOR data.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without any signup.

Implement input validation to restrict the size of CBOR objects processed by your application as a temporary workaround until you can update to the patched version.

Related vulnerabilities

Recent vulnerabilities recorded for cbor2.

How To Fix

Minimum fixed version

5.6.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade cbor2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback