Description
pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.4, the BER, CER, and DER decoders process OBJECT IDENTIFIER and RELATIVE-OID values in quadratic time relative to the number of arcs, so a small crafted payload containing an OID with many arcs consumes excessive CPU per decode() call and can deny service to applications that decode untrusted ASN.1 data. The corresponding encoders have the same quadratic behavior when an application re-encodes previously decoded attacker-supplied values. 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

Prior to version 0.6.4 the pyasn1 library decodes and encodes OBJECT IDENTIFIER and RELATIVE‑OID values in time quadratic to the number of arcs. A crafted payload that contains an OID with many arcs forces the decoder (or re‑encoder) to consume excessive CPU for each decode() call, which can exhaust system resources and render the application unavailable. This behavior corresponds to CWE‑1050 (Quadratic Time Complexity), CWE‑400 (Resource Exhaustion), and CWE‑407 (Recursive Resource Exhaustion), and allows an attacker to trigger a denial‑of‑service condition by sending a single malformed ASN.1 object.

Affected Systems

The vulnerability affects all installations of pyasn1 older than 0.6.4. Any application that relies on pyasn1 to process ASN.1 encoded data—such as certificate validation libraries, network protocol implementations, or services that accept ASN.1 input from an external source—is at risk. The flaw is present in both the BER, CER, and DER decoders and the corresponding encoders.

Risk and Exploitability

The CVSS score of 7.5 classifies this flaw as a high‑severity denial‑of‑service vulnerability. The EPSS score indicates a very low likelihood of exploitation at present, and the vulnerability is not listed in CISA’s KEV catalog. Attackers would need to supply a payload with a long OID to trigger the quadratic processing. This could be done remotely if an application accepts ASN.1 input from an external source, or locally if the data originates from a trusted or internal entity. The attack vector is inferred based on the description of a costly decode() call for untrusted input.

Generated by OpenCVE AI on August 3, 2026 at 03:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the pyasn1 library to version 0.6.4 or later.
  • Restrict the length or number of arcs in OBJECT IDENTIFIER inputs before decoding to prevent pathological cases.
  • Apply rate limiting or resource throttling on interfaces that perform ASN.1 decoding or re‑encoding to mitigate potential denial‑of‑service attacks.

Generated by OpenCVE AI on August 3, 2026 at 03:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-8ppf-4f7h-5ppj pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service
History

Wed, 22 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-1050
References
Metrics threat_severity

None

threat_severity

Important


Wed, 15 Jul 2026 11:15:00 +0000

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

Tue, 14 Jul 2026 18: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:15:00 +0000

Type Values Removed Values Added
Description pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.4, the BER, CER, and DER decoders process OBJECT IDENTIFIER and RELATIVE-OID values in quadratic time relative to the number of arcs, so a small crafted payload containing an OID with many arcs consumes excessive CPU per decode() call and can deny service to applications that decode untrusted ASN.1 data. The corresponding encoders have the same quadratic behavior when an application re-encodes previously decoded attacker-supplied values. This issue is fixed in version 0.6.4.
Title pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service
Weaknesses CWE-400
CWE-407
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-14T17:32:43.678Z

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

Link: CVE-2026-59885

cve-icon Vulnrichment

Updated: 2026-07-14T17:32:38.180Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-14T16:40:00Z

Links: CVE-2026-59885 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T03:30:13Z

Weaknesses
  • CWE-1050

    Excessive Platform Resource Consumption within a Loop

  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-407

    Inefficient Algorithmic Complexity