Description
pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.3, the `pyasn1` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding ASN.1 data with deeply nested structures. An attacker can supply a crafted payload containing thousands of nested `SEQUENCE` (`0x30`) or `SET` (`0x31`) tags with "Indefinite Length" (`0x80`) markers. This forces the decoder to recursively call itself until the Python interpreter crashes with a `RecursionError` or consumes all available memory (OOM), crashing the host application. This is a distinct vulnerability from CVE-2026-23490 (which addressed integer overflows in OID decoding). The fix for CVE-2026-23490 (`MAX_OID_ARC_CONTINUATION_OCTETS`) does not mitigate this recursion issue. Version 0.6.3 fixes this specific issue.
Published: 2026-03-18
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Immediate Patch
AI Analysis

Impact

The vulnerability resides in the ASN.1 decoder of the pyasn1 library. When decoding data that contains thousands of nested SEQUENCE or SET tags marked with an indefinite length marker, the decoder recurses without bounds. This uncontrolled recursion can cause the Python interpreter to raise a RecursionError or exhaust all available memory, leading the host application to crash. The result is a functional denial of service. The weakness is a classic unchecked recursion, reflected by CWE-674 and CWE-835.

Affected Systems

The pyasn1 library for Python is affected. Versions earlier than 0.6.3 are vulnerable. The code base is typically used in applications that process ASN.1 data, such as network protocol implementations, certificate handling, or other security components. Any application that imports and uses pyasn1 for decoding potentially exposed input is at risk.

Risk and Exploitability

The CVSS score of 7.5 indicates a high risk, but the EPSS score is below 1%, suggesting that current exploitation activity is low. The vulnerability is not listed in CISA’s KEV catalog. The attack requires the ability to send or provide crafted ASN.1 data to the vulnerable decoder. In practice, this can be achieved through network protocols that rely on pyasn1, local files, or any interface that passes ASN.1 structures to the library. Exploitation is straightforward once such input is accepted, as no authentication or privileged state is needed. The main mitigation is to update the library.

Generated by OpenCVE AI on March 20, 2026 at 19:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade pyasn1 to version 0.6.3 or later, which contains the recursion guard.
  • If an upgrade is not possible, implement pre‑validation of ASN.1 input to limit nesting depth before passing data to the decoder.
  • Consider configuring Python’s recursion limit and monitoring memory usage during decoding to reduce service impact.

Generated by OpenCVE AI on March 20, 2026 at 19:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DSA Debian DSA DSA-6194-1 pyasn1 security update
Github GHSA Github GHSA GHSA-jr27-m4p2-rc6r Denial of Service in pyasn1 via Unbounded Recursion
Ubuntu USN Ubuntu USN USN-8129-1 pyasn1 vulnerability
Ubuntu USN Ubuntu USN USN-8134-1 pyasn1 vulnerabilities
History

Sat, 21 Mar 2026 05:30:00 +0000

Type Values Removed Values Added
References

Fri, 20 Mar 2026 18:00:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:pyasn1:pyasn1:*:*:*:*:*:python:*:*

Thu, 19 Mar 2026 00:15:00 +0000

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

None

cvssV3_0

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

threat_severity

Important


Wed, 18 Mar 2026 21:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 18 Mar 2026 12:15:00 +0000

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

Wed, 18 Mar 2026 03:30:00 +0000

Type Values Removed Values Added
Description pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.3, the `pyasn1` library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding ASN.1 data with deeply nested structures. An attacker can supply a crafted payload containing thousands of nested `SEQUENCE` (`0x30`) or `SET` (`0x31`) tags with "Indefinite Length" (`0x80`) markers. This forces the decoder to recursively call itself until the Python interpreter crashes with a `RecursionError` or consumes all available memory (OOM), crashing the host application. This is a distinct vulnerability from CVE-2026-23490 (which addressed integer overflows in OID decoding). The fix for CVE-2026-23490 (`MAX_OID_ARC_CONTINUATION_OCTETS`) does not mitigate this recursion issue. Version 0.6.3 fixes this specific issue.
Title pyasn1 Vulnerable to Denial of Service via Unbounded Recursion
Weaknesses CWE-674
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-03-21T00:16:47.028Z

Reserved: 2026-03-07T16:40:05.884Z

Link: CVE-2026-30922

cve-icon Vulnrichment

Updated: 2026-03-21T00:16:47.028Z

cve-icon NVD

Status : Modified

Published: 2026-03-18T04:17:18.397

Modified: 2026-03-21T01:17:06.360

Link: CVE-2026-30922

cve-icon Redhat

Severity : Important

Publid Date: 2026-03-18T02:29:45Z

Links: CVE-2026-30922 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-03-24T10:59:29Z

Weaknesses