CVE-2025-4820
Executive Summary
CVE-2025-4820 is a vulnerability in Cloudflare's QUIC implementation, quiche, that allows an unauthenticated remote attacker to manipulate the victim's congestion control state. By sending crafted ACK frames, an attacker can cause the victim to grow its congestion window beyond the path's actual capacity, leading to potential data over-sending and network congestion. The vulnerability has a CVSS score of 5.3 (Medium) and is patched in quiche version 0.24.4. The EPSS score is 0.0%, indicating low exploitation likelihood at this time.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the quiche library, which is a Rust-based implementation of the QUIC protocol. Organizations using quiche in their applications should update to version 0.24.4 or later. The library is distributed via crates.io and GitHub. Users should verify their dependency versions and ensure they are not using vulnerable versions.
CVSS Breakdown & Threat Level
- CVSS Score: 5.3 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: Low (I:L)
- Availability Impact: None (A:N)
- Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
The vulnerability allows an attacker to manipulate the congestion window, potentially causing the victim to send data at a rate faster than the path supports. This could lead to network congestion and performance degradation, but does not directly compromise data confidentiality or availability.
Deep Dive & Mechanics
The vulnerability lies in how quiche handles ACK frames during congestion control. According to RFC 9000 Section 21.4, an opportunistic ACK attack occurs when an attacker sends ACK frames that acknowledge data that was not actually received, causing the sender to incorrectly grow its congestion window. In quiche, the congestion window growth logic did not properly validate ACK frames against this attack vector.
When an attacker completes a QUIC handshake and initiates a congestion-controlled data transfer, they can send crafted ACK frames that appear to acknowledge more data than was actually received. The victim's quiche implementation then incorrectly increases the congestion window, allowing more bytes in flight than the path can support. This can lead to packet loss, retransmissions, and overall network performance degradation.
The fix in quiche 0.24.4 adds validation of ACK frames to ensure they comply with RFC 9000 Section 21.4, preventing the opportunistic ACK attack from manipulating the congestion window.
Vulnerable vs. Patched Code
The vulnerable code likely resides in the congestion control module, specifically in the logic that processes ACK frames and updates the congestion window. The patched version adds checks to validate that ACK frames do not acknowledge data beyond what was actually sent or received.
Vulnerable Code (Conceptual):
// Vulnerable: No validation of ACK frames
fn on_ack_received(&mut self, ack: &AckFrame) {
let bytes_acked = ack.largest_acked - ack.first_acked + 1;
self.congestion_window += bytes_acked * MSS;
}
Patched Code (Conceptual):
// Patched: Validate ACK frames against RFC 9000 Section 21.4
fn on_ack_received(&mut self, ack: &AckFrame, sent_packets: &SentPacketMap) {
// Validate that the ACK acknowledges only packets that were actually sent
for packet_num in ack.first_acked..=ack.largest_acked {
if !sent_packets.contains(packet_num) {
// Ignore ACK as it acknowledges unsent data
return;
}
}
let bytes_acked = ack.largest_acked - ack.first_acked + 1;
self.congestion_window += bytes_acked * MSS;
}
Exploitation & Lab Setup
Red Team
To exploit this vulnerability, an attacker would need to:
- Complete a QUIC handshake with the victim.
- Initiate a congestion-controlled data transfer.
- Send crafted ACK frames that acknowledge more data than was actually received.
Proof of Concept (Conceptual):
import socket
import struct
# Assume QUIC connection established
def send_opportunistic_ack(sock, victim_addr, largest_acked, first_acked):
# Craft ACK frame with inflated acknowledgment
ack_frame = struct.pack('!BBHH', 0x02, 0x00, largest_acked, first_acked)
sock.sendto(ack_frame, victim_addr)
# Example usage
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
send_opportunistic_ack(sock, ('victim_ip', 443), 1000, 1)
Blue Team
To detect exploitation attempts:
- Monitor for unusual ACK patterns, such as ACKs acknowledging packets that were never sent.
- Implement rate limiting on ACK processing.
- Use network monitoring tools to detect abnormal congestion window growth.
Detection Script (Python):
import pyshark
def detect_opportunistic_ack(pcap_file):
cap = pyshark.FileCapture(pcap_file, display_filter='quic')
for packet in cap:
if hasattr(packet, 'quic'):
ack_ranges = packet.quic.ack_ranges
# Check for suspicious ACK ranges
for ack_range in ack_ranges:
if ack_range.largest_acked - ack_range.first_acked > 1000:
print(f"Suspicious ACK: {ack_range}")
Indicators of Compromise (IOCs)
Network IOCs:
- Unusual ACK frames with large acknowledgment ranges.
- Rapid congestion window growth in QUIC connections.
- Increased packet loss and retransmissions.
Host IOCs:
- Quiche version < 0.24.4.
- Logs showing unexpected congestion window increases.
File IOCs:
- Hash of vulnerable quiche library: (SHA256 of quiche 0.24.3 or earlier)
Detection Engineering
YARA Rule
rule CVE_2025_4820_quiche_opportunistic_ack {
meta:
description = "Detects quiche versions vulnerable to CVE-2025-4820"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-4820"
strings:
$vuln_version = "quiche 0.24." ascii wide nocase
$patch_version = "quiche 0.24.4" ascii wide nocase
condition:
$vuln_version and not $patch_version
}
Sigma Rule
title: CVE-2025-4820 - Opportunistic ACK Attack Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential exploitation of CVE-2025-4820 via abnormal ACK patterns
author: Valters IT
date: 2025-04-10
logsource:
category: network
product: quic
detection:
selection:
quic.ack_ranges.largest_acked - quic.ack_ranges.first_acked > 1000
condition: selection
falsepositives:
- Legitimate high-throughput transfers
level: medium
Suricata Rule
alert udp any any -> any 443 (msg:"CVE-2025-4820 - Opportunistic ACK Attack"; content:"|02 00|"; offset:0; depth:2; byte_test:2,>,1000,2,relative; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Update quiche to version 0.24.4 or later.
- Network Mitigation: Implement rate limiting on ACK processing and monitor for abnormal congestion window growth.
- Configuration: Ensure QUIC implementations validate ACK frames against RFC 9000 Section 21.4.
- Monitoring: Deploy detection rules (YARA, Sigma, Suricata) to identify exploitation attempts.
- Long-term: Review and test all QUIC implementations for similar vulnerabilities.
Valters IT
Securing Digital Frontiers