Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

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

0
High
Published: 07/21/2026 (07/21/2026, 19:11:20 UTC)
Source: GCVE Database
Product: pyasn1

Description

pyasn1 versions prior to 0.6.4 contain a vulnerability in the univ.Real type where converting decoded REAL values to Python floats can cause uncontrolled resource consumption. This occurs because very large exponents in BER/CER/DER-encoded REAL values trigger expensive big-integer exponentiation, leading to excessive CPU and memory use. The issue affects float conversions including prettyPrint(), str(), comparisons, arithmetic, and explicit float() calls on decoded REAL values. Applications decoding untrusted ASN.1 data that then convert or print these REAL values are vulnerable to denial of service. The vulnerability is fixed in pyasn1 version 0.6.4. Avoid converting or printing REAL objects from untrusted sources as a workaround.

CVSS v3.1

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

PyPIghsa
pyasn1
Affected versions
<0.6.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/22/2026, 00:57:08 UTC

Technical Analysis

The pyasn1 library's univ.Real type converts (mantissa, base, exponent) tuples from decoded ASN.1 REAL values into Python floats using exact big-integer exponentiation. When the exponent is very large, this conversion attempts to create an astronomically large integer, causing excessive CPU and memory consumption. This resource exhaustion can hang the process during any float conversion operation such as prettyPrint(), str(), comparisons, arithmetic, or explicit float() calls. The vulnerability affects pyasn1.type.univ.Real objects produced by BER, CER, and DER decoders from untrusted input. The issue does not occur during decoding alone but only when float conversion is triggered. The vulnerability is fixed in pyasn1 version 0.6.4, which uses math.ldexp() for binary values and raises OverflowError for decimal values with out-of-range exponents, preventing large intermediate integer construction.

Potential Impact

This vulnerability allows an attacker to cause denial of service by supplying ASN.1 data with REAL values that have very large exponents. When the application converts these decoded REAL values to floats (via printing, logging, comparison, or arithmetic), it consumes excessive CPU and memory, potentially hanging or crashing the process. There is no impact on confidentiality or integrity, only availability is affected.

Mitigation Recommendations

A fix is available in pyasn1 version 0.6.4. Users should upgrade to this version to prevent the vulnerability. Until upgraded, avoid converting, printing, or comparing decoded Real objects from untrusted sources. Instead, inspect the raw (mantissa, base, exponent) tuple to avoid triggering float conversion.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-hm4w-wwcw-mr6r
Osv Schema Version
1.4.0
Aliases
["CVE-2026-59886"]
Ecosystems
["PyPI"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a600ac89c2644c7f8fe3c03

Added to database: 07/22/2026, 00:11:52 UTC

Last enriched: 07/22/2026, 00:57:08 UTC

Last updated: 07/22/2026, 02:02:28 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses