CVE-2026-59885: pyasn1 Denial of Service Vulnerability Due to Quadratic Complexity in OID Processing

pyasn1 Updated 22 Jul 2026

Summary

21/07/2026
Yes i
High
7.5

CVE-2026-59885: pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service. 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 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

pyasn1 is a pure-Python implementation of ASN.1 (Abstract Syntax Notation One) data structures, widely used for encoding and decoding data in various applications such as certificates, LDAP, SNMP, and Kerberos. The library allows developers to work with ASN.1 data in a straightforward manner, but it is susceptible to performance issues when handling certain malformed inputs, leading to potential denial of service attacks.

Vulnerability Detail

The vulnerability arises from the BER/CER/DER decoders in pyasn1, which process OBJECT IDENTIFIER and RELATIVE-OID values with quadratic complexity relative to the number of arcs. A crafted payload with many arcs can significantly increase CPU usage during decoding, leading to denial of service in applications that decode untrusted ASN.1 data. This issue is exacerbated by the fact that the encoders exhibit the same quadratic behavior, making it possible for an attacker to exploit this vulnerability through re-encoding previously decoded values.

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

As a temporary workaround, limit the size of untrusted ASN.1 input before decoding. This can be done by implementing checks in your application to restrict the maximum allowable size of the input data.

Conclusion

In summary, CVE-2026-59885 represents a significant denial of service vulnerability in the pyasn1 library due to inefficient processing of certain ASN.1 data structures. It is crucial for developers using this library to update to the patched version or implement workarounds to mitigate potential risks.

See every vulnerability recorded for pyasn1 →

Share this vulnerability

FAQ

CVE-2026-59885 is a vulnerability in the pyasn1 library that allows for denial of service due to quadratic complexity in processing OBJECT IDENTIFIER and RELATIVE-OID values.

If your application uses pyasn1 to decode untrusted ASN.1 data, it may be susceptible to denial of service attacks, where an attacker can craft inputs that consume excessive CPU resources.

Versions of pyasn1 up to and including 0.6.3 are affected by this vulnerability. Version 0.6.4 and later contain the necessary fixes.

You can use Vulert, a tool that monitors and alerts for open-source vulnerabilities in your software. Without requiring access to the code or installation, you can check your application by using the Pipfile.lock with Vulert's playground.

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

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