CVE-2026-59884
Analyzed Analyzed - Analysis Complete

Denial of Service in pyasn1 ASN.1 Library

Vulnerability report for CVE-2026-59884, 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 decoder shared by the CER and DER codecs parses long-form tags by accumulating continuation octets without an upper bound on the tag ID size, allowing a crafted input to force construction of an arbitrarily large integer with CPU cost growing quadratically and to trigger unhandled ValueError exceptions in Python 3.11+ error formatting paths. Any application decoding untrusted BER, CER, or DER input is affected. 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-03
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.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-59884 is a vulnerability in the pyasn1 library, a generic ASN.1 library for Python. The issue affects versions 0.6.3 and earlier and involves a denial of service (DoS) vulnerability in the BER/CER/DER decoder.

The BER decoder in pyasn1 parses long-form tags by accumulating continuation octets without an upper bound on the tag ID size. This allows a crafted input to force the construction of an arbitrarily large integer, leading to excessive CPU consumption. The CPU cost grows quadratically with the input size, meaning a 1 MB input could take over a minute to process.

Additionally, on Python 3.11 and later, the oversized tag ID can trigger unhandled ValueError exceptions during error message formatting. This violates the PyAsn1Error contract and may bypass error handling mechanisms in applications using the library.

The vulnerability is patched in version 0.6.4, where long-form tag IDs are limited to 20 octets, and additional hardening prevents ValueError exceptions.

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 behavior related to ASN.1 decoding.

  • Check the installed version of pyasn1: Use the following Python command to verify the version: 'import pyasn1; print(pyasn1.__version__)'. If the version is 0.6.3 or earlier, the system is vulnerable.
  • Monitor network traffic for malformed ASN.1 inputs: Use network monitoring tools to inspect traffic for unusually large or malformed BER, CER, or DER encoded data, which could indicate an attempt to exploit this vulnerability.
  • Check system logs for unhandled ValueError exceptions: On Python 3.11+, monitor logs for unhandled ValueError exceptions during ASN.1 decoding, which may indicate exploitation attempts.
  • Test for excessive CPU usage: If an application using pyasn1 experiences unusually high CPU usage when processing ASN.1 inputs, it may be under attack. Use system monitoring tools like 'top' or 'htop' to observe CPU consumption.
Impact Analysis

This vulnerability can impact you in several ways if you use the pyasn1 library to decode untrusted BER, CER, or DER input:

  • Denial of Service (DoS): An attacker can craft malicious input to exploit the unbounded tag ID parsing, causing excessive CPU and memory consumption. This can lead to your application becoming unresponsive or crashing.
  • Resource Exhaustion: The quadratic growth in CPU cost means that even moderately sized inputs can cause significant delays, disrupting service availability.
  • Unhandled Exceptions: On Python 3.11+, the vulnerability can trigger unhandled ValueError exceptions, which may bypass your application's error handling and lead to unexpected crashes or behavior.

If your application relies on pyasn1 for decoding ASN.1 data from untrusted sources, you are at risk of these impacts until you update to the patched version (0.6.4) or implement input size bounds as a workaround.

Compliance Impact

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

  • GDPR (General Data Protection Regulation): If the vulnerability leads to a denial of service (DoS) or resource exhaustion, it could disrupt the availability of services processing personal data. GDPR requires the protection of personal data against accidental or unlawful destruction, loss, alteration, or unauthorized disclosure. A DoS attack exploiting this vulnerability could violate these requirements, potentially leading to non-compliance.
  • HIPAA (Health Insurance Portability and Accountability Act): For organizations handling protected health information (PHI), a DoS attack could disrupt access to critical systems, violating HIPAA's requirement for ensuring the availability of PHI. Additionally, if the vulnerability leads to unhandled exceptions or crashes, it could result in unauthorized disclosures or data integrity issues, further risking non-compliance.
  • Other Standards: Many compliance frameworks, such as ISO 27001 or NIST guidelines, require organizations to protect systems against vulnerabilities that could lead to service disruption or data breaches. Failure to patch this vulnerability could result in non-compliance with these standards.

To maintain compliance, organizations should update to the patched version of pyasn1 (0.6.4) or implement mitigations to prevent exploitation of this vulnerability.

Mitigation Strategies

To mitigate this vulnerability, follow these immediate steps:

  • Upgrade pyasn1 to version 0.6.4 or later: This version includes the fix for the unbounded long-form tag ID issue. Use the command 'pip install --upgrade pyasn1' to update the library.
  • Implement input size bounds: If upgrading is not immediately possible, restrict the size of ASN.1 inputs processed by your application to prevent excessively large tag IDs from being processed.
  • Isolate affected systems: If the application cannot be updated or patched immediately, consider isolating it from untrusted networks to reduce the risk of exploitation.
  • Monitor for exploitation attempts: Deploy intrusion detection systems (IDS) or network monitoring tools to detect and alert on suspicious ASN.1 inputs that could trigger this vulnerability.

Chat Assistant

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

EPSS Chart