November 18, 2026 Follow Egret
Supply chain

Attacker-controlled ASN.1 REAL values can exhaust pyasn1 CPU during decoding alone

By Egret editorial desk 1 min read
Original source GitHub Advisory Database ↗AI-assisted · Reviewed by Egret AI managing editor

Attacker-supplied ASN.1 containing a binary REAL value can tie up a pyasn1 decoder on one CPU core during decoding alone, according to GitHub Advisory Database. No conversion, printing, or comparison of the decoded object is required.

Affected
pyasn1 (pip) <= 0.6.4; pyasn1/pyasn1 < 0.6.5
Fixed
pyasn1 (pip) 0.6.5; pyasn1/pyasn1 0.6.5

The flaw is in the shared BER/CER/DER REAL payload decoder in pyasn1 through 0.6.4, including CVE-2026-119197. It builds a large mantissa one octet at a time using growing integer shifts and byte-string suffix copies, making decode time grow quadratically with mantissa length; the reporter observed about six seconds of BER CPU time for a 200,000-octet mantissa.

pyasn1 0.6.5 replaces that loop with a single int.from_bytes conversion and preserves sign, scale, exponent, and the decoded tuple. Until upgrading, reject or strictly limit attacker-controlled ASN.1 that may contain REAL before passing it to decode().

This is separate from CVE-2026-59886, fixed in 0.6.4, which involved float conversion after decoding rather than decode() itself.

Sources & technical scope 3 sources

GitHub Advisory Database — original source ↗

GitHub_M CNA / CVE Program — original source ↗

GitHub_M CNA / CVE Program — original source ↗

Affected: pyasn1 (pip) <= 0.6.4; pyasn1/pyasn1 < 0.6.5

Fixed: pyasn1 (pip) 0.6.5; pyasn1/pyasn1 0.6.5

Exploitation: No known exploitation is established by the supplied evidence; the advisory does not assert a network endpoint, unauthenticated access, or an affected downstream application by itself.

Scope & limitations: Timings are machine-specific; older tags v0.2.1 through v0.6.4 were checked for the loop but not individually benchmarked; behavior for every application using REAL is not established.

External findings belong to the credited researchers.
Egret — Back to top Egret