CVE-2025-4444
Executive Summary
CVE-2025-4444 is a resource consumption vulnerability in the Tor network's Onion Service Descriptor Handler, affecting versions up to 0.4.7.16 and 0.4.8.17. The flaw allows a remote attacker to cause excessive resource consumption through manipulation of the descriptor handling process, potentially leading to denial of service (DoS) conditions. The attack is considered difficult to exploit due to high complexity and low exploitability. The vendor recommends upgrading to versions 0.4.8.18 or 0.4.9.3-alpha to mitigate the issue. No public proof-of-concept or exploit code is currently available.
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
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, indicating that a full vector has not been assigned by NVD. However, based on the description, a plausible vector would be:
- Attack Vector (AV): Network (N) – The attack can be initiated remotely.
- Attack Complexity (AC): High (H) – The attack requires significant skill or specific conditions.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerable component is affected.
- Confidentiality (C): None (N) – No data exposure.
- Integrity (I): None (N) – No data modification.
- Availability (A): High (H) – Resource consumption leads to denial of service.
Estimated CVSS Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Threat Level: Medium (estimated base score ~5.9). The high complexity and low exploitability reduce the immediate risk, but the potential for DoS against Tor relays or onion services is significant.
Deep Dive & Mechanics
The vulnerability resides in the Onion Service Descriptor Handler, a component responsible for processing and distributing descriptors for .onion services. Descriptors contain information about hidden service introduction points and public keys.
Root Cause: The handler fails to properly validate or limit the resources consumed when processing malformed or specially crafted descriptor requests. An attacker can send a series of requests that cause the handler to allocate excessive memory, CPU cycles, or network bandwidth, leading to resource exhaustion.
Attack Flow:
- The attacker identifies a Tor relay or onion service that processes descriptors.
- The attacker sends a crafted descriptor request (e.g., with oversized fields, recursive references, or high-frequency queries).
- The handler processes the request without proper bounds checking, consuming disproportionate resources.
- The target system becomes unresponsive or crashes, denying service to legitimate users.
Impact: Degradation or complete denial of service for the affected Tor node, potentially disrupting the anonymity network.
Vulnerable vs. Patched Code
The exact code changes are not publicly available, but the patch likely involves adding input validation and resource limits in the descriptor handler.
Vulnerable Code (Conceptual):
// Vulnerable: No size limit on descriptor data
void handle_descriptor(char *data) {
// Process data without checking length
process_descriptor(data);
}
Patched Code (Conceptual):
// Patched: Enforce maximum descriptor size
#define MAX_DESC_SIZE 65536
void handle_descriptor(char *data, size_t len) {
if (len > MAX_DESC_SIZE) {
log_warn("Descriptor too large");
return;
}
process_descriptor(data);
}
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A Tor test network (e.g., using
chutneyor Docker-based Tor nodes). - Python with
stemlibrary for Tor control.
Exploit Script (Conceptual):
import socket
import time
def send_malformed_descriptor(target_ip, target_port):
# Craft a descriptor with excessive data
payload = b"\x00" * 1000000 # 1 MB of null bytes
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((target_ip, target_port))
sock.send(payload)
sock.close()
# Launch multiple connections
for i in range(100):
send_malformed_descriptor("192.168.1.100", 9001)
time.sleep(0.1)
Expected Outcome: The target Tor node becomes unresponsive or crashes due to memory exhaustion.
Blue Team (Defense & Detection)
Mitigation Steps:
- Upgrade Tor to version 0.4.8.18 or 0.4.9.3-alpha.
- Implement rate limiting on descriptor requests using firewall rules or Tor configuration.
- Monitor resource usage (CPU, memory, network) on Tor relays.
Detection Rules:
- Alert on high memory usage by the Tor process.
- Monitor for unusually large descriptor payloads.
Indicators of Compromise (IOCs)
- Network: Unusually large packets ( > 1 MB) to Tor ports (9001, 9050, etc.).
- System: Tor process consuming > 90% CPU or memory.
- Logs: Repeated "Descriptor too large" or "Out of memory" errors in Tor logs.
- File: Temporary files in
/tmp/with excessive size (if descriptors are written to disk).
Detection Engineering
YARA Rule
rule CVE_2025_4444_Tor_Descriptor_DoS {
meta:
description = "Detects malformed Tor descriptor payloads"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-4444"
strings:
$descriptor_header = "HS_DESC" ascii wide nocase
$large_payload = {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00}
condition:
$descriptor_header and #large_payload > 1000
}
Sigma Rule
title: CVE-2025-4444 Tor Descriptor DoS
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects excessive resource consumption in Tor descriptor handling
author: Valters IT
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/tor'
CommandLine|contains: '--descriptor'
condition: selection
falsepositives:
- Legitimate high-load scenarios
level: high
Suricata Rule
alert tcp any any -> any 9001 (msg:"CVE-2025-4444 Tor Descriptor DoS Attempt"; flow:to_server; content:"|00 00 00 00|"; depth:4; byte_test:4,>,65536,0; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade Tor to version 0.4.8.18 or 0.4.9.3-alpha.
- Workaround: If upgrade is not possible, restrict access to Tor ports using firewall rules (e.g., allow only known peers).
- Monitoring: Enable detailed logging for descriptor handling and set up alerts for abnormal resource usage.
- Long-term: Implement resource quotas in Tor configuration (e.g.,
MaxMemInQueues,MaxCircuitDirtiness).
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert