Skip to main content

Python CVE-2026-30922

HIGH
Uncontrolled Recursion (CWE-674)
2026-03-17 https://github.com/pyasn1/pyasn1 GHSA-jr27-m4p2-rc6r
7.5
CVSS 3.1 · Vendor: https://github.com/pyasn1/pyasn1
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft ASN.1 payload with nested SEQUENCE tags
  2. Delivery
    Send payload to pyasn1 decoder
  3. Exploit
    Trigger recursive parsing of indefinite length structures
  4. Execution
    Exhaust stack or memory
  5. Impact
    Application crash

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

No special conditions — remote unauthenticated exploitation against any application using pyasn1 library to decode untrusted ASN.1 data without recursion depth limits.

Impact

This vulnerability presents significant real-world risk with multiple concerning indicators: the CVSS 3.0 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) shows it is remotely exploitable with low complexity, requires no privileges or user interaction, and causes high availability impact. The publicly available proof-of-concept demonstrates easy weaponization with payloads under 10KB capable of crashing services. While not currently in CISA's KEV catalog indicating no known active exploitation, the combination of network attack vector, no authentication requirement, and trivial exploitability makes this a high-priority patch candidate for any internet-facing service using pyasn1. The vulnerability affects fundamental parsing operations making it difficult to mitigate without patching.

Exploit ScenarioDerived

An attacker sends a specially crafted ASN.1 payload containing 50,000 nested SEQUENCE tags with indefinite length markers to a vulnerable LDAP server, consuming less than 10KB of network bandwidth. The server's pyasn1 parser recursively processes each nested level until hitting Python's recursion limit or exhausting available memory, causing the worker process to crash and denying service to legitimate users. The provided proof-of-concept demonstrates this attack requires minimal effort and no authentication.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 17, 2026

The pyasn1 library suffers from an uncontrolled recursion vulnerability when parsing deeply nested ASN.1 structures, allowing remote attackers to trigger a denial of service through stack exhaustion or memory consumption. Any service using pyasn1 to parse untrusted ASN.1 data (including LDAP, SNMP, Kerberos, and X.509 parsers) can be crashed remotely with a small crafted payload under 100KB. A working proof-of-concept is publicly available, and while not currently in CISA KEV, the vulnerability has a CVSS score of 7.5 indicating high severity.

RemediationAI

Upgrade pyasn1 to version 0.6.3 or later which includes the fix commit 5a49bd1fe93b5b866a1210f6bf0a3924f21572c8 as referenced in the vendor advisory at https://github.com/pyasn1/pyasn1/security/advisories/GHSA-jr27-m4p2-rc6r. Until patching is possible, implement input size limits and request timeouts for ASN.1 parsing operations, though these workarounds provide only partial mitigation as small payloads can still trigger the vulnerability. Organizations should prioritize patching internet-facing services that parse untrusted ASN.1 data, particularly LDAP, SNMP, and certificate validation services.

Affected Packages

pypi pyasn1 fix: 0.6.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The pyasn1 library is a pure-Python implementation of ASN.1 (Abstract Syntax Notation One) types and codecs, commonly used for parsing cryptographic protocols and certificates. The vulnerability (CWE-674: Uncontrolled Recursion) occurs in the BER decoder's handling of nested SEQUENCE (0x30) or SET (0x31) tags with Indefinite Length (0x80) markers, where recursive calls to decodeFun lack depth checking in multiple code paths including indefLenValueDecoder, valueDecoder, and _decodeComponentsSchemaless methods. The affected product is identified as pkg:pip/pyasn1, and this is a distinct issue from the previously patched CVE-2026-23490 which addressed integer overflows in OID decoding.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/pyasn1/pyasn1) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE HIGH
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/pyasn1/pyasn1).

CVSS VectorVendor: https://github.com/pyasn1/pyasn1

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch released
Mar 17, 2026 - 20:30 nvd
Patch available
CVE Published
Mar 17, 2026 - 16:17 nvd
HIGH 7.5

DescriptionCVE.org

Summary

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 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.

Details

The vulnerability exists because the decoder iterates through the input stream and recursively calls decodeFun (the decoding callback) for every nested component found, without tracking or limiting the recursion depth. Vulnerable Code Locations:

  1. indefLenValueDecoder (Line 998):
for component in decodeFun(substrate, asn1Spec, allowEoo=True, **options):```
This method handles indefinite-length constructed types. It sits inside a `while True` loop and recursively calls the decoder for every nested tag.

2. `valueDecoder` (Lines 786 and 907):

This method handles standard decoding when a schema is present. It contains two distinct recursive calls that lack depth checks: Line 786: Recursively decodes components of SEQUENCE or SET types. Line 907: Recursively decodes elements of SEQUENCE OF or SET OF types.

  1. _decodeComponentsSchemaless (Line 661):
for component in decodeFun(substrate, **options):```
This method handles decoding when no schema is provided.

In all three cases, `decodeFun` is invoked without passing a `depth` parameter or checking against a global `MAX_ASN1_NESTING` limit.
### PoC

import sys from pyasn1.codec.ber import decoder

sys.setrecursionlimit(100000)

print("[*] Generating Recursion Bomb Payload...") depth = 50_000 chunk = b'\x30\x80' payload = chunk * depth

print(f"[*] Payload size: {len(payload) / 1024:.2f} KB") print("[*] Triggering Decoder...")

try: decoder.decode(payload) except RecursionError: print("[!] Crashed: Recursion Limit Hit") except MemoryError: print("[!] Crashed: Out of Memory") except Exception as e: print(f"[!] Crashed: {e}")

[*] Payload size: 9.77 KB [*] Triggering Decoder... [!] Crashed: Recursion Limit Hit

### Impact
- This is an unhandled runtime exception that typically terminates the worker process or thread handling the request. This allows a remote attacker to trivially kill service workers with a small payload (<100KB), resulting in a Denial of Service. Furthermore, in environments where recursion limits are increased, this leads to server-wide memory exhaustion.
- Service Crash: Any service using `pyasn1` to parse untrusted ASN.1 data (e.g., LDAP, SNMP, Kerberos, X.509 parsers) can be crashed remotely.
- Resource Exhaustion: The attack consumes RAM linearly with the nesting depth. A small payload (<200KB) can consume hundreds of megabytes of RAM or exhaust the stack.
### Credits
Vulnerability discovered by Kevin Tu of TMIR at ByteDance.

Executive ViewAI

Why It Matters

The pyasn1 library contains a denial-of-service vulnerability that could crash applications processing ASN.1 data if exploited by attackers sending specially crafted payloads. Any organization running services that depend on pyasn1 for data parsing-including VPN clients, certificate processing systems, and SNMP tools-faces potential service outages and availability disruptions.

Business Impact: High
Compensating Controls

Apply vendor patch. If immediate patching is not feasible: implement network-level input validation to reject ASN.1 payloads with excessive nesting depth (>100 levels); configure application runtime limits (ulimit, memory cgroups) to prevent OOM crashes; disable ASN.1 processing features if not operationally required; deploy WAF rules to detect and block malformed ASN.1 structures with indefinite length markers.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

pkg:pip/pyasn1

Related Vulnerabilities in Ray Dashboard Path Traversal and DoS

View all 2

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: High
Product Status
Container suse/manager/4.3/proxy-httpd:4.3.17.9.76.4 Container suse/manager/4.3/proxy-tftpd:4.3.17.9.66.4 Container suse/sle-micro-rancher/5.2:latest Image SLES15-SP5-Micro-5-5 Image SLES15-SP5-Micro-5-5-Azure Image SLES15-SP5-SAP-Azure-LI-BYOS Image SLES15-SP5-SAP-Azure-LI-BYOS-Production Image SLES15-SP5-SAP-Azure-VLI-BYOS Image SLES15-SP5-SAP-Azure-VLI-BYOS-Production Image SLES15-SP6-SAP-Azure-LI-BYOS Image SLES15-SP6-SAP-Azure-LI-BYOS-Production Image SLES15-SP6-SAP-Azure-VLI-BYOS Image SLES15-SP6-SAP-Azure-VLI-BYOS-Production Affected
Container suse/sl-micro/6.0/baremetal-os-container:latest Container suse/sl-micro/6.0/base-os-container:latest Container suse/sl-micro/6.1/baremetal-os-container:2.2.1-7.67 Container suse/sl-micro/6.1/base-os-container:2.2.1-5.89 Image SL-Micro Image SL-Micro-Base Image SL-Micro-Base-RT Image SL-Micro-Base-RT-SelfInstall Image SL-Micro-Base-RT-encrypted Image SL-Micro-Base-SelfInstall Image SL-Micro-Base-encrypted Image SL-Micro-Base-qcow Image SL-Micro-Default Image SL-Micro-Default-SelfInstall Image SL-Micro-Default-encrypted Image SL-Micro-Default-qcow Image SL-Micro-EC2 Image SUSE-Multi-Linux-Manager-Proxy-BYOS-EC2 Image SUSE-Multi-Linux-Manager-Server-BYOS-EC2 Image SUSE-Multi-Linux-Manager-Server-EC2-llc Image SUSE-Multi-Linux-Manager-Server-EC2-ltd Affected
Container suse/sl-micro/6.0/toolbox:13.2-9.31 Affected
Image SLES12-SP5-GCE-SAP-BYOS Image SLES12-SP5-GCE-SAP-On-Demand Affected
Image SLES15-SP7-SAP-EC2 Affected

References

Advisories & patches
PATCH https://github.com/pyasn1/pyasn1/commit/5a49bd1fe93b5b866a1210f6bf0a3924f21572c8 ADVISORY https://access.redhat.com/errata/RHSA-2026:6309 ADVISORY https://access.redhat.com/errata/RHSA-2026:6404 ADVISORY https://access.redhat.com/errata/RHSA-2026:6568 ADVISORY https://access.redhat.com/errata/RHSA-2026:6720 ADVISORY https://access.redhat.com/errata/RHSA-2026:6912 ADVISORY https://access.redhat.com/errata/RHSA-2026:6926 ADVISORY https://access.redhat.com/errata/RHSA-2026:8437 ADVISORY https://github.com/pyasn1/pyasn1/security/advisories/GHSA-jr27-m4p2-rc6r ADVISORY https://ubuntu.com/security/notices/USN-8134-1 ADVISORY https://vuldb.com/?id.351461 ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:1075/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:1076/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:1158/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20821/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20835/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20878/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:20929/ REF http://www.openwall.com/lists/oss-security/2026/03/20/4 REF https://access.redhat.com/errata/RHSA-2026:10184 REF https://access.redhat.com/errata/RHSA-2026:12176 REF https://access.redhat.com/errata/RHSA-2026:13508 REF https://access.redhat.com/errata/RHSA-2026:13512 REF https://access.redhat.com/errata/RHSA-2026:13545 REF https://access.redhat.com/errata/RHSA-2026:13553 REF https://access.redhat.com/errata/RHSA-2026:13902 REF https://access.redhat.com/errata/RHSA-2026:13916 REF https://access.redhat.com/errata/RHSA-2026:13917 REF https://access.redhat.com/errata/RHSA-2026:14020 REF https://access.redhat.com/errata/RHSA-2026:16009 REF https://access.redhat.com/errata/RHSA-2026:17083 REF https://access.redhat.com/errata/RHSA-2026:17611 REF https://access.redhat.com/errata/RHSA-2026:19138 REF https://access.redhat.com/errata/RHSA-2026:19355 REF https://access.redhat.com/errata/RHSA-2026:19375 REF https://access.redhat.com/errata/RHSA-2026:19712 REF https://access.redhat.com/errata/RHSA-2026:20588 REF https://access.redhat.com/errata/RHSA-2026:22131 REF https://access.redhat.com/errata/RHSA-2026:22132 REF https://access.redhat.com/errata/RHSA-2026:22133 REF https://access.redhat.com/errata/RHSA-2026:22134 REF https://access.redhat.com/errata/RHSA-2026:22135 REF https://access.redhat.com/errata/RHSA-2026:22969 REF https://access.redhat.com/errata/RHSA-2026:22970 REF https://access.redhat.com/errata/RHSA-2026:22987 REF https://access.redhat.com/errata/RHSA-2026:24761 REF https://access.redhat.com/errata/RHSA-2026:24762 REF https://access.redhat.com/errata/RHSA-2026:37275 REF https://access.redhat.com/errata/RHSA-2026:41928 REF https://access.redhat.com/errata/RHSA-2026:65126 REF https://access.redhat.com/security/cve/CVE-2026-30922 REF https://bugzilla.redhat.com/show_bug.cgi?id=2448553 REF https://github.com/advisories/GHSA-jr27-m4p2-rc6r REF https://github.com/pyasn1/pyasn1/commit/25ad481c19fdb006e20485ef3fc2e5b3eff30ef0 REF https://github.com/pyasn1/pyasn1/releases/tag/v0.6.3 REF https://lists.debian.org/debian-lts-announce/2026/05/msg00001.html REF https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-30922.json

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy