Description
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.
Published: 2026-07-14
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Converting a decoded ASN.1 REAL value by the pyasn1 library can trigger an uncontrolled expansion of the exponent during big‑integer exponentiation, a flaw in line with CWE‑400 (Uncontrolled Resource Consumption) and CWE‑770 (Out‑of‑Bounds Allocation). When a short encoded REAL carries a very large exponent, operations such as prettyPrint(), str(), comparison, arithmetic, int() or an explicit float() call consume excessive CPU cycles and memory, potentially hanging the application. This results in a denial‑of‑service condition that impacts the availability of the affected process or system.

Affected Systems

The vulnerability exists in the pyasn1 library (vendor pyasn1:pyasn1) in all releases prior to version 0.6.4. The fix was incorporated in release 0.6.4 and later. Any application that imports pyasn1 and processes untrusted ASN.1 data is potentially affected if it remains on an earlier version.

Risk and Exploitability

The CVSS score of 7.5 indicates moderate‑to‑high severity, but the EPSS score of less than 1% signals a low probability of exploitation in the wild. The vulnerability is not currently listed in CISA’s KEV catalog. The likely attack vector is an application that parses untrusted ASN.1 data, which could come from remote network services, files, or inter‑process communication; this is inferred from the description. Because the issue relies on feeding a crafted REAL value that forces large‑exponent conversion, an attacker would need to supply such data during operations such as prettyPrint(), str(), comparison, arithmetic, int(), or an explicit float() call, leading to resource exhaustion and denial of service.

Generated by OpenCVE AI on July 31, 2026 at 09:54 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade pyasn1 to version 0.6.4 or later in all affected environments
  • If an upgrade is not immediately possible, modify the application logic to avoid converting or printing untrusted REAL values; keep these values opaque or remove them after validation
  • Implement input validation that limits the size of the exponent in REAL values before conversion; reject values that exceed a safe threshold
  • Monitor application performance for unusual CPU or memory spikes that could indicate exploitation

Generated by OpenCVE AI on July 31, 2026 at 09:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hm4w-wwcw-mr6r pyasn1: Uncontrolled resource consumption when converting decoded REAL values
History

Thu, 16 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Wed, 15 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 14 Jul 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Pyasn1
Pyasn1 pyasn1
Vendors & Products Pyasn1
Pyasn1 pyasn1

Tue, 14 Jul 2026 16:45:00 +0000

Type Values Removed Values Added
Description 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.
Title pyasn1: Uncontrolled resource consumption when converting decoded REAL values
Weaknesses CWE-400
CWE-770
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T15:44:02.717Z

Reserved: 2026-07-07T16:40:07.983Z

Link: CVE-2026-59886

cve-icon Vulnrichment

Updated: 2026-07-15T15:43:57.965Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-14T16:38:29Z

Links: CVE-2026-59886 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T10:00:05Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-770

    Allocation of Resources Without Limits or Throttling