CVE-2026-119194

pyasn1: Quadratic CPU use in schemaless BER/CER/DER container decoding

Published Oct 29, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
pyasn1 is a generic ASN.1 library for Python. From 0.3.3 until 0.6.5, schemaless container decoding stores every decoded component's TagSet in a growing set even though only one-versus-multiple tag types must be distinguished. Attacker-controlled BER, CER, or DER input contains many distinct long tag IDs whose TagSet hashes collide. Each later set insertion compares against an increasing number of earlier colliding tags in ConstructedPayloadDecoderBase._decodeComponentsSchemaless, producing quadratic CPU work while decoded values and order remain valid. Repeated inputs can exhaust decoder CPU and reduce service availability. This issue is fixed in version 0.6.5.

Analysis

AI-generated

Technical impact

The vulnerability arises when pyasn1’s schemaless decoder stores every decoded component’s TagSet in an ever‑growing collection. An attacker can craft BER, CER, or DER data that contains many distinct long tag identifiers that hash to the same value. Because each new tag is compared against all previously stored tags, the time taken to decode grows quadratically, draining CPU resources. The decoded values themselves remain valid, so the application may appear to function while exhausting CPU and potentially becoming unavailable. This problem aligns with CWE-407 and CWE-770, indicating an improper constraint on all input variables leading to resource exhaustion.

Affected Systems

The flaw affects the pyasn1 library distributed by the pyasn1:pyasn1 project for Python. Any application that imports pyasn1 and parses attacker‑controlled BER/CER/DER messages using the schemaless decoding routines is potentially vulnerable. The bug exists in versions 0.3.3 through 0.6.4 inclusive; version 0.6.5 contains a fix and is considered safe.

Risk and Exploitability

The CVSS score of 7.5 signals high severity. The EPSS score is <1%, indicating a very low but non‑zero exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. Attackers can trigger the quadratic CPU load by sending crafted ASN.1 data to any process that utilizes the vulnerable decoder, whether over a network or via local input. Repeated exploitation can saturate CPU resources and cause a denial of service. While no known public exploits exist and KEV does not list this issue, the wide usage of pyasn1 and the high CPU impact mean that the risk is non‑negligible and mitigation is recommended.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the pyasn1 library to version 0.6.5 or later, which fixes the decoder logic and removes the quadratic complexity.
  • If an upgrade is delayed, restrict the size of ASN.1 payloads accepted by applications or perform input length validation before decoding to reduce the potential for resource exhaustion.
  • Deploy monitoring to detect abnormal CPU usage in processes that use pyasn1; if a spike is observed, consider restarting or quarantining the affected process.

Generated by OpenCVE AI on October 30, 2026 at 14:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-fm9c-5rcf-2q5p pyasn1 has quadratic CPU use in schemaless BER/CER/DER container decoding
Ubuntu USN Ubuntu USN USN-9011-1 pyasn1 vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Pyasn1
Pyasn1 pyasn1
Vendors & Products Pyasn1
Pyasn1 pyasn1
Type Values Removed Values Added
Description pyasn1 is a generic ASN.1 library for Python. From 0.3.3 until 0.6.5, schemaless container decoding stores every decoded component's TagSet in a growing set even though only one-versus-multiple tag types must be distinguished. Attacker-controlled BER, CER, or DER input contains many distinct long tag IDs whose TagSet hashes collide. Each later set insertion compares against an increasing number of earlier colliding tags in ConstructedPayloadDecoderBase._decodeComponentsSchemaless, producing quadratic CPU work while decoded values and order remain valid. Repeated inputs can exhaust decoder CPU and reduce service availability. This issue is fixed in version 0.6.5.
Title pyasn1: Quadratic CPU use in schemaless BER/CER/DER container decoding
Weaknesses 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'}

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity

  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2026, 4:23 PM
Reserved
Oct 29, 2026, 4:04 PM
Status
Awaiting Analysis
Published
Oct 29, 2026, 8:17 PM
Modified
Nov 3, 2026, 5:18 PM
Severity
Important
Public date
Oct 29, 2026, 7:38 PM