CVE-2026-59886: pyasn1 Uncontrolled Resource Consumption Vulnerability

pyasn1 Updated 22 Jul 2026

Summary

21/07/2026
Yes i
High
7.5

CVE-2026-59886: pyasn1: Uncontrolled resource consumption when converting decoded REAL values. Affects pyasn1 versions < 0.6.4. Fixed in 0.6.4. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

pyasn1 is a pure-Python implementation of ASN.1 (Abstract Syntax Notation One) data structures, widely used for encoding and decoding data in various protocols. It provides a flexible framework for handling ASN.1 types, including INTEGER, BOOLEAN, and REAL. However, the library has a vulnerability that allows for excessive resource consumption when converting decoded REAL values, particularly when dealing with untrusted input.

Vulnerability Detail

The vulnerability arises from the univ.Real type in pyasn1, which converts its (mantissa, base, exponent) representation to a Python float using exact big-integer exponentiation. This can lead to excessive CPU and memory usage when a BER/CER/DER-encoded REAL value with a large exponent is processed. Operations such as prettyPrint(), str(), comparisons, arithmetic, or explicit float() calls on these decoded values can hang the process, resulting in a denial of service. The issue does not occur during decoding alone, making applications that handle untrusted ASN.1 data particularly susceptible.

How To Fix

Latest published version: 0.6.4 as of 22 Oct 2026

pip install --upgrade "pyasn1==0.6.4"

The newest release already contains this fix.

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

Workaround

Avoid converting, printing, or comparing decoded Real objects from untrusted sources. Instead, inspect the raw (mantissa, base, exponent) tuple directly. For example, if you have a Real object named 'real_value', you can access its components like this: 'real_value._mantissa', 'real_value._base', 'real_value._exponent'.

Conclusion

The pyasn1 library has a significant vulnerability (CVE-2026-59886) that can lead to uncontrolled resource consumption when handling decoded REAL values from untrusted sources. It is crucial to update to version 0.6.4 or later to mitigate this risk. Additionally, employing workarounds can help protect applications until an update can be applied.

See every vulnerability recorded for pyasn1 →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

Versions of pyasn1 up to and including 0.6.3 are affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected without needing to sign up.

Operations that trigger the vulnerability include float conversion, prettyPrint(), str(), comparisons, and arithmetic on decoded Real objects.

If you cannot update pyasn1 right away, ensure that you do not handle untrusted ASN.1 REAL values in your application.

Related vulnerabilities

Recent vulnerabilities recorded for pyasn1.

How To Fix

Latest published version: 0.6.4 as of 22 Oct 2026

pip install --upgrade "pyasn1==0.6.4"

The newest release already contains this fix.

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