CVE-2026-59884
Python vulnerability analysis and mitigation

Overview

CVE-2026-59884 is a denial-of-service vulnerability in the pyasn1 Python library, specifically in its BER/CER/DER decoder, caused by unbounded long-form tag ID parsing. It affects all pyasn1 versions up to and including 0.6.3, and was fixed in version 0.6.4. The advisory was first published on July 9, 2026, with NVD publication on July 14, 2026. It carries a CVSS v3.1 base score of 7.5 (High) (Github Advisory, Red Hat Bugzilla).

Technical details

The root cause is uncontrolled resource consumption (CWE-400, CWE-770) in pyasn1.codec.ber.decoder. The BER decoder accumulates continuation octets when parsing long-form ASN.1 tag IDs in a loop with no upper bound, allowing a crafted input to force construction of an arbitrarily large integer whose CPU cost grows quadratically with input size — a ~1 MB crafted input can consume over a minute of CPU time. Additionally, on Python 3.11+, the oversized tag ID can trigger an unhandled ValueError during error message formatting (due to the interpreter's integer-to-string conversion limit), violating the documented PyAsn1Error contract and potentially bypassing caller error handling. The affected components are pyasn1.codec.ber.decoder (and by inheritance pyasn1.codec.cer.decoder and pyasn1.codec.der.decoder), as well as pyasn1.type.tag repr paths; encoders and the native codec are not affected (Github Advisory, Patch Commit).

Impact

Successful exploitation causes excessive CPU consumption and potential application crashes in any service that decodes untrusted BER, CER, or DER input using pyasn1. There is no confidentiality or integrity impact; the vulnerability is purely an availability risk. Given pyasn1's widespread use as a dependency in Python cryptography, SNMP, LDAP, and PKI tooling, the blast radius can extend to any downstream application or service relying on the library for ASN.1 parsing (Github Advisory, Red Hat Bugzilla).

Exploitation steps

  1. Identify target: Locate applications or services that accept and decode untrusted BER, CER, or DER encoded data using pyasn1 versions ≤ 0.6.3 (e.g., SNMP agents, LDAP servers, TLS/PKI tools, or custom protocol parsers built on pyasn1).
  2. Craft malicious input: Construct a BER-encoded payload with a long-form tag ID containing a large number of continuation octets (high-bit set bytes) exceeding 20 octets, forcing the decoder to accumulate an arbitrarily large integer. A ~1 MB crafted input is sufficient to cause over a minute of CPU consumption.
  3. Deliver payload: Submit the crafted BER/CER/DER input to the target application's parsing endpoint — this could be a network packet, file upload, API request, or any other input channel that feeds into pyasn1.codec.ber.decoder.decode().
  4. Trigger DoS: The decoder enters a CPU-intensive loop building the oversized integer; on Python 3.11+, error formatting may additionally raise an unhandled ValueError, crashing the application or bypassing its error handling.
  5. Sustain impact: Repeat submissions to maintain denial of service, as each crafted input independently triggers the quadratic CPU cost (Github Advisory, Patch Commit).

Indicators of compromise

  • Network: Unusual or repeated submissions of large (approaching or exceeding 1 MB) BER/CER/DER-encoded payloads to application endpoints that perform ASN.1 decoding; unexpected spikes in inbound data to SNMP, LDAP, or PKI services.
  • Process: Sustained high CPU utilization on processes running Python applications that use pyasn1, particularly pyasn1.codec.ber.decoder; processes becoming unresponsive or crashing unexpectedly.
  • Logs: Unhandled ValueError exceptions in application logs referencing pyasn1 tag rendering or integer-to-string conversion (Python 3.11+); repeated PyAsn1Error or unexpected exception tracebacks in ASN.1 decoding paths.
  • File System: No specific file artifacts expected for this DoS-only vulnerability.

Mitigation and workarounds

Upgrade pyasn1 to version 0.6.4 or later, which limits long-form tag IDs to 20 octets (140-bit tag IDs) and hardens tag ID rendering against Python 3.11+'s integer-to-string conversion limit. As an interim workaround, applications should validate and bound the size of untrusted input before passing it to decode(). Additionally, restricting network access to services that decode untrusted BER/CER/DER input and monitoring for unusual CPU consumption can reduce exposure until patching is complete (Github Advisory, pyasn1 Release).

Community reactions

Red Hat tracked the issue via Bugzilla (Bug 2500204) and issued a related errata (RHSA-2026:40236), reflecting the library's broad use in Red Hat ecosystem packages. The Yocto Project security mailing list also discussed the vulnerability, indicating impact on embedded Linux distributions. No significant public researcher commentary or social media discussion beyond standard CVE tracking has been observed (Red Hat Bugzilla).

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