CVE-2026-59885
Analyzed Analyzed - Analysis Complete

Denial of Service in pyasn1 ASN.1 Decoder

Vulnerability report for CVE-2026-59885, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-14

Last updated on: 2026-07-21

Assigner: GitHub, Inc.

Description

pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.4, the BER, CER, and DER decoders process OBJECT IDENTIFIER and RELATIVE-OID values in quadratic time relative to the number of arcs, so a small crafted payload containing an OID with many arcs consumes excessive CPU per decode() call and can deny service to applications that decode untrusted ASN.1 data. The corresponding encoders have the same quadratic behavior when an application re-encodes previously decoded attacker-supplied values. This issue is fixed in version 0.6.4.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-14
Last Modified
2026-07-21
Generated
2026-08-04
AI Q&A
2026-07-14
EPSS Evaluated
2026-08-02
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
pyasn1 pyasn1 to 0.6.4 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-400 The product does not properly control the allocation and maintenance of a limited resource.
CWE-407 An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-59885 is a vulnerability in the pyasn1 library, which is a generic ASN.1 library for Python. The issue affects versions 0.6.3 and earlier.

The vulnerability involves quadratic time complexity when processing OBJECT IDENTIFIER (OID) and RELATIVE-OID values during BER, CER, and DER decoding and encoding. This means that when the library decodes or encodes these values, the time it takes increases quadratically with the number of arcs (components) in the OID.

An attacker can exploit this by crafting a small payload containing an OID with many arcs. When the library processes this payload, it consumes excessive CPU time per decode() or encode() call, leading to a denial of service (DoS) condition. This affects applications that decode untrusted ASN.1 data, such as those handling certificates, LDAP, SNMP, or Kerberos.

The vulnerability is fixed in pyasn1 version 0.6.4, where the arc accumulation process was made linear, eliminating the quadratic time complexity.

Detection Guidance

Detecting this vulnerability on your network or system involves checking for the presence of vulnerable versions of the pyasn1 library and monitoring for unusual CPU consumption during ASN.1 decoding operations.

  • Check the installed version of pyasn1 in your Python environment. Versions prior to 0.6.4 are vulnerable. You can use the following command to check the version: pip show pyasn1. Look for the 'Version' field in the output.
  • Monitor applications that decode untrusted ASN.1 data (e.g., certificates, LDAP, SNMP, or Kerberos) for excessive CPU usage. Tools like top, htop, or system monitoring solutions can help identify processes consuming abnormal CPU resources.
  • Review logs for applications that rely on pyasn1 for ASN.1 decoding. Look for errors or timeouts during decoding operations, which may indicate attempts to exploit this vulnerability.
  • If you have access to network traffic, inspect packets for malformed ASN.1 data containing unusually long OBJECT IDENTIFIER or RELATIVE-OID values with many arcs. This may require deep packet inspection tools.
Impact Analysis

This vulnerability can impact you in the following ways:

  • Denial of Service (DoS): If your application uses pyasn1 to decode or encode untrusted ASN.1 data (e.g., certificates, LDAP, SNMP, or Kerberos), an attacker could send a specially crafted payload to consume excessive CPU resources. This could slow down or crash your application, leading to service unavailability.
  • Performance Degradation: Even without a full DoS, the quadratic time complexity could cause noticeable performance issues, especially in systems processing large volumes of ASN.1 data.
  • Security Risks: If your application relies on ASN.1 data for security-critical operations (e.g., authentication or encryption), the vulnerability could be exploited to disrupt these operations, potentially leading to broader security failures.

The impact is primarily on availability, as the CVSS score of 7.5 indicates a high severity for this aspect. No privileges or user interaction are required for exploitation.

Compliance Impact

This vulnerability can affect compliance with common standards and regulations in the following ways:

  • GDPR (General Data Protection Regulation): If your application processes personal data of EU citizens and relies on ASN.1 data (e.g., for authentication or encryption), a DoS attack exploiting this vulnerability could lead to service unavailability. Under GDPR, organizations must ensure the availability and resilience of processing systems. Prolonged downtime or disruption could be seen as a failure to implement appropriate technical measures, potentially leading to non-compliance.
  • HIPAA (Health Insurance Portability and Accountability Act): For healthcare organizations, HIPAA requires the availability and integrity of protected health information (PHI). If your system uses pyasn1 to handle ASN.1 data in healthcare applications (e.g., electronic health records or secure communications), a DoS attack could disrupt access to PHI. This could be interpreted as a failure to safeguard PHI, leading to potential HIPAA violations.
  • Other Standards: Many industry-specific standards (e.g., PCI DSS for payment systems, NIST guidelines for federal agencies) require systems to be resilient against DoS attacks. Failure to patch this vulnerability could result in non-compliance with these standards, especially if the affected system handles sensitive or regulated data.

To maintain compliance, it is critical to apply the patch (pyasn1 version 0.6.4 or later) and ensure that systems processing ASN.1 data are protected against this vulnerability.

Mitigation Strategies

To mitigate this vulnerability, follow these immediate steps:

  • Upgrade the pyasn1 library to version 0.6.4 or later. This version includes a patch that fixes the quadratic time complexity issue. Use the following command to upgrade: pip install --upgrade pyasn1.
  • If upgrading is not immediately possible, restrict the input to ASN.1 decoders to trusted sources only. Avoid processing untrusted ASN.1 data until the library is updated.
  • Implement rate limiting or resource quotas for applications that decode ASN.1 data to prevent excessive CPU consumption from potential attacks.
  • Monitor systems for signs of exploitation, such as unusual CPU spikes or application crashes, and investigate any suspicious activity.
  • Review and update your incident response plan to include steps for handling denial-of-service attacks targeting ASN.1 decoding operations.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-59885. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart