CVE-2026-59886
Analyzed Analyzed - Analysis Complete

Denial of Service in pyasn1 via Large Exponent

Vulnerability report for CVE-2026-59886, 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 univ.Real type converted its mantissa, base, and exponent value to a Python float using exact big-integer exponentiation. A BER, CER, or DER encoded REAL value only a few bytes long can carry a very large exponent, causing float conversion through prettyPrint(), str(), comparison, arithmetic, int(), or an explicit float() call to consume excessive CPU and memory and hang applications that decode untrusted ASN.1 data and then print, log, or compare decoded objects. 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-770 The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.
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-59886 is a vulnerability in the pyasn1 library, which is a generic ASN.1 library for Python. The issue occurs in versions prior to 0.6.4 and involves uncontrolled resource consumption when handling decoded REAL values in ASN.1 data.

The univ.Real type in pyasn1 converts its mantissa, base, and exponent values to a Python float using exact big-integer exponentiation. When processing BER, CER, or DER encoded REAL values, a small encoded value with a very large exponent can cause excessive CPU and memory usage. This happens during operations like float conversion, prettyPrint(), str(), comparisons, arithmetic, or int() calls on decoded REAL objects from untrusted sources.

The vulnerability can lead to applications hanging or crashing due to resource exhaustion, resulting in a denial of service. The issue is fixed in version 0.6.4 by introducing optimizations and safety checks to prevent the creation of huge intermediate integers.

Detection Guidance

Detecting this vulnerability requires identifying applications or systems that use the pyasn1 library (versions prior to 0.6.4) to decode ASN.1 data, particularly REAL values, and then perform operations like float conversion, printing, logging, or comparison on those decoded objects.

  • Check installed versions of pyasn1: Use package managers to verify the version. For example, in Python environments, run `pip show pyasn1` or `pip list | grep pyasn1` to check the installed version. If the version is 0.6.3 or earlier, the system is vulnerable.
  • Inspect application code: Look for code that uses pyasn1 to decode ASN.1 data and then calls methods like `float()`, `str()`, `prettyPrint()`, or performs arithmetic/comparison operations on `univ.Real` objects. Example code patterns to search for: `from pyasn1.type import univ` followed by `univ.Real()` or `decoder.decode()`.
  • Monitor network traffic: If ASN.1 data is received over the network, inspect the traffic for maliciously crafted REAL values. Tools like Wireshark can be used to capture and analyze ASN.1-encoded packets. Look for unusually large exponents in REAL values, which may indicate an attempt to exploit the vulnerability.
  • Log analysis: Review application logs for errors or crashes related to excessive CPU/memory usage when processing ASN.1 data. Look for logs containing `OverflowError` or `MemoryError` exceptions, which may indicate exploitation attempts.

There are no direct commands to detect active exploitation, but monitoring system resources (CPU, memory) during ASN.1 data processing can help identify unusual spikes that may indicate an attack.

Impact Analysis

This vulnerability can impact you in several ways if you use the pyasn1 library (versions 0.6.3 or earlier) to decode ASN.1 data from untrusted sources:

  • Denial of Service (DoS): An attacker can craft malicious ASN.1 REAL values with extremely large exponents. When your application processes these values (e.g., by printing, logging, or comparing them), it may consume excessive CPU and memory, causing your application to hang or crash.
  • System Resource Exhaustion: The uncontrolled resource consumption can lead to memory and CPU exhaustion, affecting not only the vulnerable application but also other processes running on the same system.
  • Remote Exploitation: The vulnerability can be exploited remotely without requiring any privileges or user interaction, making it easier for attackers to target your systems.

The impact is primarily on system availability, as the vulnerability does not directly lead to data breaches or unauthorized access but can disrupt services.

Compliance Impact

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

  • GDPR (General Data Protection Regulation): While the vulnerability itself does not directly expose personal data, a denial-of-service attack could disrupt services handling personal data. Under GDPR, organizations must ensure the availability and resilience of processing systems. A successful 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), system availability is critical. A denial-of-service attack could disrupt access to PHI, violating HIPAA's requirements for ensuring the confidentiality, integrity, and availability of electronic PHI. This could result in non-compliance and potential penalties.
  • Other Standards (e.g., ISO 27001, NIST): Standards like ISO 27001 and NIST frameworks emphasize the importance of system availability and resilience. A vulnerability that allows resource exhaustion and denial of service could indicate gaps in security controls, potentially leading to non-compliance with these standards.

To maintain compliance, organizations should promptly apply the fix (pyasn1 version 0.6.4) and ensure that their systems are protected against such vulnerabilities.

Mitigation Strategies

To mitigate CVE-2026-59886, follow these immediate steps:

  • Upgrade pyasn1: Update the pyasn1 library to version 0.6.4 or later. This is the most effective mitigation. Use the command `pip install --upgrade pyasn1` to upgrade the package in Python environments.
  • Avoid unsafe operations: If upgrading is not immediately possible, avoid converting, printing, logging, or comparing decoded `univ.Real` objects from untrusted sources. This includes operations like `float()`, `str()`, `prettyPrint()`, arithmetic, or comparisons on REAL values.
  • Input validation: Validate ASN.1 input data before processing. Ensure that REAL values do not contain excessively large exponents that could trigger resource exhaustion.
  • Isolate affected systems: If the application cannot be patched or modified, isolate systems that process ASN.1 data from untrusted sources to limit the impact of potential exploitation.
  • Monitor for exploitation: Set up monitoring for unusual CPU or memory usage spikes in applications that process ASN.1 data. This can help detect ongoing attacks.

For long-term mitigation, ensure all dependencies are regularly updated and consider implementing additional security measures like sandboxing or rate-limiting for ASN.1 data processing.

Chat Assistant

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

EPSS Chart