CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-WCJX-V2WJ-XG87

GHSA-WCJX-V2WJ-XG87: Denial of Service via Uncontrolled Recursion in pyasn1

Alon Barad
Alon Barad
Software Engineer

Mar 26, 2026·6 min read·36 visits

Executive Summary (TL;DR)

A denial-of-service vulnerability exists in pyasn1 < 0.6.3 (used by c2cciutils) due to uncontrolled recursion during the parsing of nested ASN.1 structures. Attackers can trigger stack exhaustion or memory exhaustion using crafted payloads. Mitigation requires updating pyasn1 to version 0.6.3 or higher.

The c2cciutils package relies on the pyasn1 library for processing Abstract Syntax Notation One (ASN.1) data structures. Prior to version 0.6.3, the pyasn1 library contained a critical uncontrolled recursion flaw in its Basic Encoding Rules (BER) decoder, allowing remote attackers to cause a Denial of Service (DoS) via crafted, deeply nested payloads.

Vulnerability Overview

The c2cciutils package relies heavily on the pyasn1 library for processing Abstract Syntax Notation One (ASN.1) data structures. The pyasn1 library implements decoders for several encoding standards, including Basic Encoding Rules (BER), Canonical Encoding Rules (CER), and Distinguished Encoding Rules (DER). Prior to version 0.6.3, the BER decoder contained a structural flaw in its handling of nested ASN.1 constructed types.

This flaw manifests as an uncontrolled recursion vulnerability, formally categorized under CWE-674. When the decoder encounters a constructed type, such as a SEQUENCE or SET, it invokes itself to process the inner elements of the data structure. The pre-patch implementation failed to limit the depth of these recursive function calls.

An attacker exploits this behavior by supplying a specially crafted ASN.1 payload containing an excessive number of nested tags. Processing this payload forces the Python interpreter to exceed its maximum allowed recursion depth or exhausts available system memory. Both outcomes result in an immediate Denial of Service (DoS) condition, terminating the application abruptly.

Root Cause Analysis

The vulnerability originates in the parsing logic defined within pyasn1/codec/ber/decoder.py. The Decoder.__call__ method acts as the primary entry point for parsing incoming ASN.1 tags and extracting their associated data values. The ASN.1 standard permits constructed types to contain other elements, creating complex hierarchical data structures.

To parse these nested structures, the decoder implementation utilized direct recursion. Upon detecting a tag indicating a constructed type within the byte stream, the Decoder.__call__ method initiated a new decoding cycle specifically for the nested content. This recursive descent parsing strategy is common, but it requires strict boundary enforcement to maintain stability.

The critical failure in the pyasn1 design was the complete absence of state tracking across these recursive boundaries. The method did not maintain a counter of the current nesting level, nor did it enforce any upper bound on the recursion depth. Consequently, the depth of the call stack was limited solely by the execution limits of the Python runtime environment or the physical memory of the host system.

Code Analysis

The pre-patch implementation of the BER decoder processed elements blindly, without any awareness of the overall structure depth. The parsing loop continuously invoked the decoding function for each nested element discovered in the payload, adding a new frame to the call stack for every layer.

The patch introduced in pyasn1 version 0.6.3 mitigates this design flaw by implementing explicit depth tracking. A constant, MAX_NESTING_DEPTH, is established with a strict default value of 100. The options dictionary, which is securely passed through the recursive calls, now serves as the state carrier for the current structure depth.

# Patch implementation in pyasn1/codec/ber/decoder.py
_nestingLevel = options.get('_nestingLevel', 0)
if _nestingLevel > MAX_NESTING_DEPTH:
    raise error.PyAsn1Error(
        'ASN.1 structure nesting depth exceeds limit (%d)' % MAX_NESTING_DEPTH
    )
options['_nestingLevel'] = _nestingLevel + 1

The method extracts _nestingLevel from the options dictionary, defaulting to 0 for the initial call. It validates this integer against MAX_NESTING_DEPTH. If the limit is exceeded, the decoder immediately halts processing and explicitly raises a controlled PyAsn1Error. Otherwise, it increments the counter and proceeds with the recursive execution.

Exploitation Mechanics

Exploitation requires the attacker to submit a malformed ASN.1 payload to an endpoint that processes the data using a vulnerable version of pyasn1. The attack leverages the Indefinite-Length SEQUENCE tag, which is represented in BER encoding by the specific byte sequence 0x30 0x80.

The 0x30 byte identifies a SEQUENCE type, while the 0x80 byte indicates that the sequence possesses an indefinite length. An indefinite-length sequence must eventually be terminated by a specific End-of-Contents (EOC) marker. By repeating the 0x30 0x80 bytes continuously, the attacker generates a payload consisting entirely of unclosed, infinitely nested sequences.

from pyasn1.codec.ber import decoder
from pyasn1 import error
 
# Generates 500 nested Indefinite-Length SEQUENCE tags
poc_payload = b'\x30\x80' * 500
 
try:
    decoder.decode(poc_payload)
except RecursionError:
    print("Vulnerability confirmed: RecursionError triggered.")

When this payload is passed to decoder.decode(), the library blindly attempts to resolve the deep structure. The Python interpreter detects the excessive call stack depth and raises a RecursionError, abruptly terminating the application's execution flow. No authentication or complex setup is required to achieve this state.

Impact Assessment

The primary impact of this vulnerability is a denial of service against the specific application or microservice processing the ASN.1 data. The CVSS v3.1 base score of 7.5 accurately reflects the high availability impact. The attack executes remotely over the network without requiring authentication or user interaction.

The denial of service manifests in two primary ways depending on the execution environment. The most common and immediate outcome is stack exhaustion. The standard Python interpreter enforces a default recursion limit, typically set to 1000 frames. The malicious payload forces the interpreter to hit this limit, triggering an unhandled RecursionError that crashes the active process.

In environments where developers have artificially raised the Python recursion limit using sys.setrecursionlimit(), the vulnerability degrades into memory exhaustion. Each recursive call allocates a new stack frame and instantiates temporary parsing objects. The excessive nesting consumes all available system memory, ultimately leading to an Out-Of-Memory (OOM) kill by the host operating system.

Remediation and Detection

The fundamental remediation strategy is to update the pyasn1 dependency to version 0.6.3 or later. For dependent projects like c2cciutils, administrators must update the project's dependency lock files to ensure the patched version is explicitly pulled during the build process.

Organizations must verify the deployment of the update across all environments using Software Composition Analysis (SCA) tools. The update guarantees that the decoder safely rejects excessively nested payloads. Instead of crashing the application, the parser raises a controlled PyAsn1Error which can be caught and handled gracefully by the application logic.

In network architectures where immediate patching is strictly impossible, ingress mitigations can be applied. Implement rigid payload size limits at the Web Application Firewall (WAF) or API gateway layer. While this does not resolve the underlying parsing flaw, it physically restricts the attacker's ability to deliver the large byte structures required to trigger the deep recursion paths.

Official Patches

GitHub Advisory DatabaseGHSA Advisory for c2cciutils
pyasn1GHSA Advisory for pyasn1

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.05%
Top 85% most exploited

Affected Systems

pyasn1 libraryc2cciutils (via transitive dependency)

Affected Versions Detail

Product
Affected Versions
Fixed Version
c2cciutils
Camptocamp
< 0.6.3 (pyasn1 dependency)pyasn1 0.6.3
pyasn1
pyasn1
< 0.6.30.6.3
AttributeDetail
Vulnerability ClassCWE-674: Uncontrolled Recursion
Attack VectorNetwork
CVSS v3.1 Score7.5 (High)
EPSS Score0.00049 (15.38th Percentile)
ImpactDenial of Service (Stack Exhaustion / OOM)
Exploit StatusProof of Concept Available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-674
Uncontrolled Recursion

The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

Vulnerability Timeline

Security researchers report resource exhaustion issues in pyasn1.
2026-03-13
pyasn1 releases version 0.6.3 to address CVE-2026-30922.
2026-03-17
c2cciutils patches its dependency via Renovate bot.
2026-03-17
GitHub and NVD publish advisories for CVE-2026-30922.
2026-03-18

References & Sources

  • [1]NVD - CVE-2026-30922
  • [2]GHSA-WCJX-V2WJ-XG87
  • [3]pyasn1 GHSA-jr27-m4p2-rc6r
Related Vulnerabilities
CVE-2026-30922

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•41 minutes ago•CVE-2026-79767
5.5

CVE-2026-79767: Authorization Bypass in Gardener API Server admission plugin

An incorrect authorization vulnerability (CWE-863) in Gardener's customverbauthorizer admission plugin allows project administrators lacking the manage-members permission to inject arbitrary Group or ServiceAccount subjects, granting unauthorized access to project resources.

Alon Barad
Alon Barad
3 views•7 min read
•about 2 hours ago•CVE-2026-79913
6.5

CVE-2026-79913: Server-Side Request Forgery Bypass via IPv6 Transition Addresses in Cloudreve

Cloudreve versions prior to 4.18.0 contain a Server-Side Request Forgery (SSRF) vulnerability. The application's validation logic fails to canonicalize various IPv4-in-IPv6 transition formats, such as NAT64, 6to4, and Teredo addresses. Consequently, an authenticated user with remote-download permissions can issue requests that bypass SSRF network boundaries, enabling connection routing to loopback, private, or cloud metadata endpoints.

Amit Schendel
Amit Schendel
8 views•7 min read
•about 3 hours ago•CVE-2026-84298
3.1

CVE-2026-84298: Cross-Tenant Authorization Bypass and Information Disclosure in Hatchet V1 Dispatcher

Hatchet V1 Dispatcher before version 0.95.3 fails to enforce proper tenant boundaries when managing active stream connections for durable task completions. Because the global lookup map is keyed solely by task external identifiers, authenticated attackers who obtain a victim's task UUID can register a stream subscription and receive task results belonging to another tenant.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 4 hours ago•CVE-2026-88978
4.3

CVE-2026-88978: Multi-Tenant Isolation Failure in Hatchet Durable Workflow Engine

CVE-2026-88978 is a critical cross-tenant data exposure vulnerability in Hatchet, a platform for orchestrating background tasks and durable workflows. The flaw exists in the durable-task event retrieval system where client-supplied task, node, and branch UUIDs are resolved via the ListSatisfiedEntries database query without verifying the tenant ownership of the requesting worker context.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 5 hours ago•CVE-2026-88010
6.3

CVE-2026-88010: Unauthenticated Username-Enumeration Timing Oracle in Traefik BasicAuth Middleware

An unauthenticated timing oracle vulnerability exists in Traefik's BasicAuth middleware from version 3.6.11 up to (but not including) 3.7.13. By utilizing a request coalescing mechanism (singleflight.Group) that relies on server-side stored secret hashes for key generation, the software introduces a timing discrepancy. Concurrent requests targeting non-existent usernames generate identical singleflight keys and coalesce, resulting in accelerated response times. Conversely, requests targeting valid usernames produce distinct keys and execute independently, allowing remote attackers to systematically enumerate valid usernames.

Amit Schendel
Amit Schendel
6 views•7 min read
•about 6 hours ago•CVE-2026-91129
5.4

CVE-2026-91129: Server-Side Request Forgery in Home Assistant Core IPP Integration

Home Assistant Core prior to version 2026.2.3 is vulnerable to Server-Side Request Forgery (SSRF) via the IPP integration's auto-discovery mechanism. Unauthenticated mDNS advertisements can trigger HTTP requests that follow malicious redirects to loopback interfaces.

Alon Barad
Alon Barad
9 views•7 min read