CVE-2026-59886
Impact
The univ.Real type converted its (mantissa, base, exponent) value to a Python float using exact big-integer exponentiation. A BER/CER/DER-encoded REAL value only a few bytes long can carry a very large exponent, causing this computation to attempt to materialize an astronomically large integer.
Any operation that triggers float conversion on such a decoded value — prettyPrint(), str(), comparison, arithmetic, or an explicit float() call — consumes excessive CPU and memory, hanging the process. Applications that decode untrusted ASN.1 data and then print, log, or compare the decoded objects are vulnerable to denial of service. Decoding alone does not trigger the issue.
Affected components
- pyasn1.type.univ.Real — float conversion (float() and everything built on it: prettyPrint(), str(), comparisons, arithmetic, int())
- Reachable through the pyasn1.codec.ber, cer, and der decoders, which produce Real objects from untrusted input; also via directly constructed Real values
The encoders and the native codec are not affected. Applications that never handle ASN.1 REAL values are not affected.
Patches
Fixed in pyasn1 0.6.4. Binary (base-2) values are now converted with math.ldexp(), and decimal (base-10) values with exponents beyond float range raise OverflowError without constructing huge intermediate integers. Existing behavior is preserved: out-of-range values raise OverflowError and prettyPrint() renders them as <overflow>.
Workarounds
Avoid converting, printing, or comparing decoded Real objects from untrusted sources; inspect the raw (mantissa, base, exponent) tuple instead.
CSIRTS triage
- What
- Uncontrolled resource consumption occurs when converting decoded REAL values.
- Who is affected
- Users of pyasn1 are affected by this vulnerability.
- Urgency
- This is a high urgency issue due to its high severity and potential for exploitation.
- Action
- Upgrade to the latest version of pyasn1.
AI-assisted analysis generated from the source advisory — verify against the original.
⚡ Watch CVE-2026-59886
Get an email if CVE-2026-59886 is added to CISA KEV, gains public exploit code, or a new advisory cites it — max one per day, one-click unsubscribe.
Exploitation outlook
- Low exploitation risk0.34% 30-day exploitation probability — currently an unlikely target, but scores change as exploit code circulates. Riskier than 26% of all EPSS-scored CVEs.
Advisory coverage (3)
- highGHSA-hm4w-wwcw-mr6r: pyasn1: Uncontrolled resource consumption when converting decoded REAL valuesghsa · 2026-07-21
- highCVE-2026-59886: pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.4, the univ.Real type converted its…nvd · 2026-07-14
- highCVE-2026-59886: pyasn1: Uncontrolled resource consumption when converting decoded REAL valuesmsrc · 2026-07-14
External references
Embed the live status
— this badge updates automatically when the KEV or exploit status changes. How to embed it →
[](https://www.csirts.com/cve/CVE-2026-59886)