CVE-2026-59886: pyasn1: Uncontrolled resource consumption when converting decoded REAL values

Published Jul 14, 2026
·
Updated

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.

Other sources

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.

MITRE

pyasn1: Uncontrolled resource consumption when converting decoded REAL values

Microsoft

Affected Software

4 affected componentsFixes available
pypi/pyasn1<0.6.4
pyasn1 Pyasn1 Python<0.6.4
pip/pyasn1<=0.6.3
0.6.4
Microsoft azl3 python-pyasn1 0.4.8-2<0.4.8-3
0.4.8-3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pyasn1 to a version that resolves this vulnerability.

    Fixed in 0.6.4
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.4.8-3
  3. Upgrade

    Upgrade pyasn1 to a version that resolves this vulnerability.

    Fixed in 0.6.4
  4. Configuration

    When processing untrusted ASN.1 data, do not trigger float conversion on decoded pyasn1.type.univ.Real objects (avoid operations like prettyPrint(), str(), comparisons, arithmetic, or explicit float() calls); instead inspect the raw (mantissa, base, exponent) tuple.

    pyasn1.type.univ.Real handling avoid float conversion/printing/comparison of decoded Real values from untrusted sources = Avoid

Event History

Jul 14, 2026
CVE Published
via MITRE·04:38 PM
Data Sourced
via MITRE·04:38 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 17, 2026
Data Sourced
via Microsoft·08:02 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:02 AM
DescriptionSeverity
Jul 21, 2026
Advisory Published
via GitHub·07:11 PM
Data Sourced
via GitHub·07:11 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-59886?

CVE-2026-59886 has a severity rating of 7.5, classified as high.

2

How do I fix CVE-2026-59886?

To fix CVE-2026-59886, upgrade to pyasn1 version 0.6.4 or later.

3

What causes CVE-2026-59886?

CVE-2026-59886 is caused by uncontrolled resource consumption when converting decoded REAL values due to large exponents.

4

What software is affected by CVE-2026-59886?

CVE-2026-59886 affects the pyasn1 library, specifically versions prior to 0.6.4.

5

What is the impact of CVE-2026-59886?

The impact of CVE-2026-59886 includes potential denial of service due to excessive resource consumption.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203