Jul 8, 2026·6 min read·13 visits
Unauthenticated malformed DNS compression pointers trigger uncontrolled recursion in the packet decoder, crashing the per-packet handler.
The trapster honeypot package is vulnerable to a remote denial of service (DoS) vulnerability due to uncontrolled recursion during the parsing of malformed DNS compression pointers in the decode_labels function.
The trapster package is an open-source, Python-based honeypot framework designed to detect malicious network scanning and reconnaissance activity. It emulates multiple network services, exposing specialized listeners that collect incoming payloads and catalog attacking hosts.
Among its modules is a Domain Name System (DNS) honeypot listener. This listener binds to a specified UDP interface and port, processing unauthenticated packets directly from the network. Because of its exposed nature, this listener represents a primary attack surface for any remote, unauthenticated threat actor targeting the system.
A severe flaw in the DNS parser allows attackers to crash the honeypot handler remotely. The vulnerability stems from uncontrolled recursion (CWE-674) within the packet-parsing logic of the DNS module. By sending carefully crafted DNS packets, a remote attacker can exhaust system resources and render the honeypot completely non-functional.
To optimize packet sizes, RFC 1035 specifies a mechanism called DNS name compression. Instead of repeating identical domain name labels, the protocol permits a label to point to a prior offset within the same message where the domain name is already defined. A compression pointer is identified when the first two bits of a length byte are set to 11 (binary 11000000 or hex 0xC0).
The vulnerability resides in the decode_labels() function inside trapster/libs/dns.py. When encountering the 0xC0 byte sequence, the function extracts the target offset and recursively calls decode_labels() to resolve the compressed string. It fails to maintain state or verify whether the target offset has already been processed during the execution of the current request.
Because there is no cycle detection or recursion limit, an attacker can exploit this omission by passing a circular reference. Additionally, the parser does not enforce a recursion depth limit, meaning even non-cyclic but highly chained pointer offsets can trigger a stack overflow. When CPython encounters these inputs, it raises a RecursionError and halts processing.
An analysis of the vulnerable source code in trapster/libs/dns.py reveals the following structural implementation:
def decode_labels(message, offset):
labels = []
while True:
length, = struct.unpack_from("!B", message, offset)
if (length & 0xC0) == 0xC0:
pointer, = struct.unpack_from("!H", message, offset)
offset += 2
# Vulnerable recursive call
return labels + decode_labels(message, pointer & 0x3FFF), offsetThe recursive call decode_labels(message, pointer & 0x3FFF) accepts any arbitrary offset parsed from the network packet without enforcing any upper boundaries or monotonic progression restrictions. An attacker-controlled pointer can point backwards, forwards, or to itself, leading to infinite loops or deep exhaustion of the stack.
To remediate this root cause, the function must be refactored into an iterative structure. A safe implementation tracks the maximum allowed offset, ensuring that any subsequent compression pointer strictly references a decreasing index within the packet byte array, thereby preventing cycles entirely. The following code snippet shows a robust, hardened iterative version:
def decode_labels(message, offset):
labels = []
return_offset = None
max_allowed_pointer = len(message)
while True:
length, = struct.unpack_from("!B", message, offset)
if (length & 0xC0) == 0xC0:
pointer, = struct.unpack_from("!H", message, offset)
if return_offset is None:
return_offset = offset + 2
target = pointer & 0x3FFF
if target >= max_allowed_pointer:
raise ValueError("invalid DNS compression pointer")
max_allowed_pointer = target
offset = target
continueExploitation of this vulnerability is highly operationalizable and requires zero prerequisites. Because the honeypot binds to a public-facing UDP port to catch scanning attempts, the attack payload can be delivered in a single, unauthenticated UDP packet.
The first vector (Vector A) employs a self-referential compression pointer. The attacker builds a DNS query where a label pointer references its own offset (for example, offset 12). When the parser reads offset 12, it encounters 0xC00C, leading to an immediate loop that exhausts Python's recursion limit.
The second vector (Vector B) constructs a deep pointer chain. The packet contains a highly nested list of pointers that link to one another sequentially. This allows an attacker to trigger a stack crash even if the implementation checks for direct circular references, as the cumulative recursion depth exceeds Python's default stack frame limit.
Because the DNS server implementation in trapster fails to capture parsing-related exceptions inside DnsUdpProtocol.datagram_received(), the raised RecursionError escapes the task handler and propagates to the main asyncio event loop. This leads to thread instability, massive log generation, and a persistent Denial of Service.
While this vulnerability does not allow remote code execution or unauthorized access to system data, its security impact remains highly significant for monitoring infrastructure. The primary consequence is a complete Denial of Service (DoS) of the DNS honeypot listener.
Honeypots serve as a critical early warning system for enterprise networks, logging pre-attack scanning and mapping active threats. By disabling the trapster listener, an attacker can blind the security team, executing subsequent attacks and scanning networks without triggering alerts.
The CVSS v3.1 base score is assessed at 5.3, with the following vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L. Although the availability impact is classified as low under standard CVSS metrics because it does not crash the host operating system, it completely neutralizes the functional utility of the security tool.
Remediation of this vulnerability requires updating the DNS module to use an iterative label parsing algorithm. Security administrators should deploy the iterative refactoring of decode_labels() as shown in the code analysis section to prevent pointer loops.
In addition to parsing corrections, the core network listener in trapster/modules/dns.py must be hardened. The calling logic should handle parsing errors locally instead of allowing raw exceptions to escape into the underlying event loop. The protocol handler should wrap the decode sequence in a standard try-except structure:
try:
message = dns.decode_dns_message(data)
except (ValueError, IndexError, struct.error) as err:
self.logger.warning(f"Malformed DNS packet received: {err}")
returnImplementing both the iterative parser and local exception containment provides complete protection against variant compression attacks and ensures service stability during hostile network exposure.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
trapster 0xBallpoint | <= 1.2.0 | - |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-674 |
| Attack Vector | Network (UDP) |
| CVSS v3.1 | 5.3 (Medium) |
| Exploit Status | Proof-of-Concept Available |
| Impact | Denial of Service (DoS) |
The software does not properly control the recursion depth or cycle detection when handling nested structures, leading to a stack exhaustion or crash.
An unauthenticated remote denial of service vulnerability exists in the Unleash feature management platform. By submitting a crafted JSON payload containing deeply nested structures to an OpenAPI-validated endpoint, an attacker can trigger uncontrolled recursion within the error formatting module. This leads to a call-stack exhaustion (RangeError: Maximum call stack size exceeded) inside the Node.js runtime, causing the service to crash immediately without recovery.
CVE-2026-63004 is a server-side request forgery (SSRF) vulnerability in the Unleash feature management platform. Authenticated administrators with CREATE_ADDON or UPDATE_ADDON privileges can exploit this vulnerability to initiate requests to loopback addresses, private networks, and cloud metadata endpoints, potentially leading to information disclosure and credential extraction.
Prior to version 8.0.3, Unleash's Markdown event formatter directly mutated the global template-escaping function of the shared mustache Node.js module, resulting in a process-wide security degradation where HTML/Markdown escaping was permanently disabled for the application lifetime.
A critical SQL injection vulnerability exists in the GeoTools open-source Java library. This vulnerability is situated within the post-processing phase of OGC Filter conversion inside the PostGIS DataStore module. Specifically, the `jsonArrayContains` function does not validate or sanitize its arguments before constructing PostgreSQL SQL/JSON path evaluation queries. An unauthenticated remote attacker can exploit this weakness by submitting crafted filters via standard OGC services like WFS or WMS to execute arbitrary SQL commands on the underlying database system.
CVE-2026-61824 is a high-severity Cross-Site Scripting (XSS) vulnerability in kepano/defuddle before version 0.19.1. Custom site extractors for platforms such as X/Twitter, Substack, and YouTube constructed HTML representations via template string interpolation without output escaping. This allowed malicious pages to bypass standard parser sanitization routines and execute arbitrary JavaScript.
A high-severity vulnerability exists in KeystoneJS, a popular Node.js CMS and GraphQL framework, where the query resolution engine fails to validate signed negative integers within the pagination subsystem. Unauthenticated remote attackers can leverage this flaw to bypass the 'graphql.maxTake' safety boundary. By sending large negative values in the 'take' query parameter, the underlying Prisma ORM interprets the value as an instruction to fetch rows from the end of the collection, allowing malicious actors to bypass pagination limits, trigger database resource exhaustion, and execute application-level Denial of Service (DoS) attacks.