CVE-2026-145181 in quinn-udp
Summary
by MITRE • 12/04/2026
quinn-udp before 0.5.16 and 0.6.x before 0.6.3 contains an infinite loop vulnerability in the Unix recv_single receive path that lets unauthenticated remote attackers cause denial of service with an oversized datagram. Because the MSG_TRUNC flag in msg_flags is checked before the recvmsg error, the loop retries on EAGAIN instead of returning WouldBlock, busy-spinning the receive task and consuming a CPU core on affected non-Linux, non-Windows targets.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 12/04/2026
The vulnerability identified in Quinn UDP versions prior to 0.5.16 and 0.6.x before 0.6.3 represents a critical logic error within the Unix-specific receive path of the library's network stack implementation. This flaw specifically affects the recv_single function, which is responsible for handling incoming datagrams on non-Linux and non-Windows operating systems that utilize similar POSIX-compliant socket APIs. The core technical deficiency lies in the sequence of conditional checks performed when processing received data. Specifically, the code evaluates whether the MSG_TRUNC flag is set within msg_flags before checking for specific error conditions returned by the recvmsg system call. This ordering creates a scenario where an oversized datagram triggers a state that causes the application to enter an infinite loop rather than properly handling the buffer overflow or truncation event as intended.
When an unauthenticated remote attacker sends an oversized UDP datagram to a service utilizing this vulnerable version of Quinn, the recvmsg system call returns with specific error indicators indicating that the message was truncated due to insufficient buffer space. However, because the code checks for the MSG_TRUNC flag prior to evaluating the return status and associated errno values, it fails to recognize the EAGAIN or similar blocking conditions correctly in this context. Instead of returning a WouldBlock status to indicate that the operation would block if not non-blocking, or properly handling the truncation by discarding the packet or signaling an error up the stack, the logic erroneously interprets the state as requiring a retry. This misinterpretation leads the receive task to immediately attempt another recvmsg call without yielding control back to the operating system scheduler.
The operational impact of this flaw is severe denial of service resulting from CPU exhaustion. Since the loop retries instantly on EAGAIN instead of returning WouldBlock, it creates a busy-spin scenario where the thread consumes one full CPU core continuously. This behavior effectively halts any other operations that might be scheduled on that same logical processor or prevents the application from performing useful work related to network processing for other connections. For services relying on Quinn UDP for high-performance networking, such as QUIC implementations in web servers or peer-to-peer applications, this vulnerability can lead to complete service unavailability if an attacker targets a specific endpoint with crafted oversized packets. The impact is particularly acute because it requires no authentication and can be triggered remotely by any network actor capable of sending UDP traffic to the affected host.
From a classification perspective, this issue aligns closely with CWE-835, which describes loops that consume excessive CPU resources due to logic errors preventing proper termination or yielding. It also relates to CWE-20 regarding improper input validation, as the library fails to correctly validate and handle the outcome of system calls when dealing with oversized inputs. In terms of adversary tactics, this vulnerability facilitates Denial of Service attacks consistent with MITRE ATT&CK technique T1499, specifically endpoint denial of service via resource exhaustion. Attackers can leverage this flaw to degrade performance or completely disrupt availability without needing credentials or complex exploitation chains beyond the ability to send UDP packets.
Mitigation strategies for organizations utilizing Quinn UDP must prioritize immediate version upgrades. Administrators should update their dependencies to include quinn-udp version 0.5.16 or later, and if using the 0.6.x branch, they must upgrade to at least version 0.6.3 where this logic error has been corrected. The fix involves reordering the conditional checks so that error states from recvmsg are evaluated before checking for truncation flags, ensuring that blocking conditions result in appropriate returns rather than infinite retries. In environments where immediate patching is not feasible due to dependency constraints or testing requirements, network-level mitigations can provide temporary relief. Implementing ingress filtering rules on firewalls or load balancers to drop UDP packets exceeding the maximum transmission unit size for the specific application protocol can prevent oversized datagrams from reaching the vulnerable service logic. Additionally, configuring socket buffers with appropriate limits and monitoring CPU usage patterns associated with network interfaces may help in detecting active exploitation attempts of this vulnerability before it leads to total system degradation.