Mar 26, 2026·6 min read·31 visits
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.
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.
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.
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 + 1The 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 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.
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.
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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
c2cciutils Camptocamp | < 0.6.3 (pyasn1 dependency) | pyasn1 0.6.3 |
pyasn1 pyasn1 | < 0.6.3 | 0.6.3 |
| Attribute | Detail |
|---|---|
| Vulnerability Class | CWE-674: Uncontrolled Recursion |
| Attack Vector | Network |
| CVSS v3.1 Score | 7.5 (High) |
| EPSS Score | 0.00049 (15.38th Percentile) |
| Impact | Denial of Service (Stack Exhaustion / OOM) |
| Exploit Status | Proof of Concept Available |
| CISA KEV Status | Not Listed |
The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.
CVE-2026-54543 is a DNS Resource Record (RR) Injection vulnerability in Froxlor, an open-source server administration control panel. Prior to version 2.3.8, the DomainZones.add API command failed to perform strict sanitization and validation on the user-controlled record (label) and type parameters before serializing them into BIND-compatible zone files. An authenticated customer with DNS zone management permissions can inject control characters, breaking out of the original record context to define unauthorized resource records within managed zones.
CVE-2026-42533 is a critical security vulnerability discovered in NGINX Open Source, NGINX Plus, NGINX Ingress Controller, and related products, referred to as the 'Two-Pass Capture-Clobbering' bug. The flaw is situated within NGINX's internal evaluation engine when handling complex variables, exposing a heap-based buffer overflow and information leak when a configuration chains regular expression-based map directives with numbered capture groups. An unauthenticated remote attacker can exploit this weakness by transmitting crafted HTTP requests to trigger remote code execution or defeat ASLR.
Froxlor prior to version 2.3.8 contains a high-severity architectural flaw where the standalone lib/ajax.php entry point bypasses the centralized request validation in lib/init.php. Unauthenticated remote attackers can leverage Cross-Site Request Forgery (CSRF) to induce authenticated administrators to submit forged requests that modify API key whitelists and expiration dates, potentially yielding persistent, out-of-band administrative control.
An insecure data retrieval flaw in the Froxlor server administration panel API allows authenticated remote attackers to retrieve unredacted bcrypt password hashes and Base32-encoded Time-Based One-Time Password (TOTP) seeds. Affected endpoints include several 'get' and 'listing' handlers for customers, administrators, and FTP accounts. Utilizing these leaked parameters, attackers can crack the password hashes offline and concurrently generate valid second-factor authentication codes to completely bypass access controls.
CVE-2026-70666 is a critical Server-Side Request Forgery (SSRF) vulnerability in Netflix Lemur's ACME certificate management integration. Prior to version 1.9.3, the system allowed authority-role users to bypass initial ACME URL allowlist validations when updating an existing authority. Additionally, the underlying ACME network client blindly parsed and connected to dynamic endpoint URLs supplied in JSON responses from the configured ACME directory, allowing attackers to route arbitrary JWS-signed requests to internal services or cloud metadata endpoints.
A security vulnerability in Netflix Lemur, a TLS certificate management framework, allows authenticated operators to bypass Server-Side Request Forgery (SSRF) mitigations. The issue exists within the certificate revocation verification workflow, specifically inside the CRL and OCSP retrieval logic. By exploiting HTTP redirects or DNS rebinding (Time-of-Check Time-of-Use) mechanisms, an attacker can coerce the server into issuing arbitrary network requests to internal services, such as the cloud instance metadata service (IMDS) or loopback addresses. This bypass neutralizes previous network-boundary validation logic and allows blind read/write SSRF targeting internal infrastructure resources.