CVE-2026-59886
Python vulnerability analysis and mitigation

Overview

CVE-2026-59886 is a Denial of Service vulnerability in the pyasn1 Python library caused by uncontrolled resource consumption when converting decoded ASN.1 REAL values to Python floats. It affects all pyasn1 versions up to and including 0.6.3, and was fixed in version 0.6.4. The vulnerability was published on July 9, 2026 (GitHub advisory) and formally disclosed via NVD on July 14, 2026. It carries a CVSS v3.1 base score of 7.5 (High) (Github Advisory, Red Hat).

Technical details

The root cause is in pyasn1.type.univ.Real.__float__(), which converted the (mantissa, base, exponent) tuple to a Python float using exact big-integer exponentiation (mantissa * pow(base, exponent)), classified as CWE-400 (Uncontrolled Resource Consumption) and CWE-770 (Allocation of Resources Without Limits or Throttling). A BER, CER, or DER encoded REAL value only a few bytes long can encode an astronomically large exponent, causing the exponentiation to attempt to materialize an enormous integer in memory. Any subsequent operation that triggers float conversion — including prettyPrint(), str(), comparison, arithmetic, int(), or an explicit float() call — will consume excessive CPU and memory, hanging the process. Notably, decoding alone does not trigger the issue; the vulnerability is only activated when the decoded object is subsequently processed (Github Advisory, Patch Commit).

Impact

Successful exploitation results in a Denial of Service: the affected application hangs or crashes due to exhaustion of CPU and memory resources. There is no confidentiality or integrity impact — the vulnerability is purely an availability issue. Any application that decodes untrusted ASN.1 data containing REAL values and then prints, logs, compares, or performs arithmetic on those decoded objects is at risk, which includes a broad range of network services, PKI/certificate processing tools, SNMP implementations, and other systems relying on pyasn1 (Github Advisory, Red Hat Bugzilla).

Exploitation steps

  1. Identify target: Locate a network-accessible service or application that uses pyasn1 (version ≤ 0.6.3) to decode untrusted ASN.1 data and subsequently prints, logs, or compares decoded REAL values (e.g., SNMP agents, TLS/certificate parsers, LDAP services).
  2. Craft malicious payload: Construct a BER, CER, or DER encoded ASN.1 REAL value with a very large exponent. For example, encode a REAL value with base 2 and an exponent such as 76,354,972 or larger — this requires only a handful of bytes in the encoding (e.g., bytes((9, 7, 227, 4, 1, 35, 69, 103, 1)) for a base-2 REAL with a large exponent).
  3. Deliver payload: Submit the crafted ASN.1 data to the target service through its normal input channel (e.g., a network packet, certificate field, SNMP message, or file upload).
  4. Trigger float conversion: The application decodes the payload using pyasn1's BER/CER/DER decoder, producing a univ.Real object. When the application subsequently calls prettyPrint(), str(), performs a comparison, or any arithmetic on the object, __float__() is invoked, triggering the unbounded big-integer exponentiation.
  5. Achieve DoS: The process consumes all available CPU and memory attempting to compute the astronomically large integer, causing the application to hang or be killed by the OS, resulting in a denial of service (Github Advisory, Patch Commit).

Indicators of compromise

  • Process Behavior: Python processes consuming 100% CPU for an extended period with rapidly growing memory usage, particularly processes associated with ASN.1 parsing services (e.g., SNMP daemons, certificate validators, LDAP servers using pyasn1).
  • Logs: Application logs showing repeated or stalled requests that never complete; absence of response log entries following receipt of an ASN.1 message; out-of-memory (OOM) kill events in system logs (/var/log/syslog, dmesg) referencing the affected Python process.
  • Network: Unusual or malformed ASN.1 encoded data in network traffic, particularly BER/CER/DER encoded REAL values with abnormally large exponent fields; repeated connection attempts to ASN.1-based services (SNMP port 161, LDAP port 389/636) from the same source.
  • File System: Core dump files generated by the affected Python process if ulimits permit; crash reports referencing pyasn1.type.univ or Real.__float__ in stack traces.

Mitigation and workarounds

The primary remediation is to upgrade pyasn1 to version 0.6.4 or later, which fixes the vulnerability by using math.ldexp() for base-2 conversions and raising OverflowError for base-10 values with exponents beyond float range, without constructing huge intermediate integers (pyasn1 Release). If immediate patching is not possible, the recommended workaround is to avoid converting, printing, or comparing decoded Real objects from untrusted sources — instead, inspect the raw (mantissa, base, exponent) tuple directly without triggering float conversion (Github Advisory). Additionally, implementing input validation to reject ASN.1 REAL values with unusually large exponents before any float conversion is performed can reduce exposure.

Community reactions

Red Hat has tracked this vulnerability in their Bugzilla system (Bug 2500041) with a high severity rating, and it appears in their security CVE advisory page, indicating it affects Red Hat-distributed packages that depend on pyasn1. The Yocto Project security mailing list also discussed the issue, suggesting broad awareness across embedded Linux ecosystems. No notable independent researcher commentary or significant social media discussion has been identified beyond standard CVE aggregator coverage.

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-hmj8-5xmh-5573HIGH7.5
  • Python logoPython
  • libp2p
NoNoJul 24, 2026
GHSA-94p4-4cq8-9g67HIGH7.5
  • Python logoPython
  • gitpython
NoYesJul 24, 2026
GHSA-47w6-gwp4-w6vcHIGH7.1
  • Python logoPython
  • vantage6
NoNoJul 24, 2026
CVE-2026-59714HIGH7.1
  • Python logoPython
  • open-webui
NoYesJul 24, 2026
GHSA-464c-974j-9xm6LOW3.3
  • JavaScript logoJavaScript
  • software.amazon.awscdk:aws-cdk-lib
NoYesJul 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management