CVE-2025-9649
Executive Summary
CVE-2025-9649 is a locally exploitable divide-by-zero vulnerability in Appneta tcpreplay version 4.5.1. The flaw resides in the calc_sleep_time function within send_packets.c, which can be triggered by a local attacker to cause a denial of service (DoS) condition. The vulnerability has a CVSS score of 3.3 (Low), and a public proof-of-concept (PoC) exploit is available. The vendor has released a fix in version 4.5.3-beta3. This report provides a comprehensive technical analysis, detection engineering guidance, and remediation steps.
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 tcpreplay tool, which is distributed as a source tarball and commonly included in Linux distribution repositories. While not a package manager ecosystem like NPM or PyPI, the risk of supply chain compromise exists if users download the vulnerable version from unofficial mirrors or fail to update through their package manager. Organizations should verify the integrity of their tcpreplay installation and ensure it is sourced from trusted repositories.
CVSS Breakdown & Threat Level
- CVSS Score: 3.3 (Low)
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
- Attack Vector (AV): Local (L) – The attacker must have local access to the system.
- Attack Complexity (AC): Low (L) – No special conditions are required to exploit.
- Privileges Required (PR): Low (L) – The attacker needs low-level privileges.
- User Interaction (UI): None (N) – No user action is required beyond running the tool.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality (C): None (N) – No data is exposed.
- Integrity (I): None (N) – No data is modified.
- Availability (A): Low (L) – The tool crashes, causing a denial of service.
Threat Level: Low. The vulnerability requires local access and only results in a denial of service. However, in shared environments or CI/CD pipelines, a malicious user could disrupt operations.
Deep Dive & Mechanics
The vulnerability is a classic divide-by-zero error in the calc_sleep_time function of send_packets.c. This function is responsible for calculating the sleep time between packet transmissions to achieve a desired packet rate. The calculation involves dividing a value by a user-controlled parameter (likely the packet rate or a timing interval). If the attacker provides a value of zero for this parameter, the division operation results in a floating-point exception (SIGFPE), crashing the application.
Root Cause: Lack of input validation on the divisor before performing the division operation. The code does not check if the divisor is zero, leading to undefined behavior and a crash.
Impact: A local attacker with the ability to run tcpreplay with crafted arguments can cause the tool to crash, denying service to legitimate users. This could be particularly impactful in automated network testing environments where tcpreplay is used as part of a larger pipeline.
Vulnerable vs. Patched Code
Vulnerable Code (tcpreplay 4.5.1):
// send_packets.c
static double calc_sleep_time(double rate, double pkt_len) {
// No check for rate == 0
return pkt_len / rate;
}
Patched Code (tcpreplay 4.5.3-beta3):
// send_packets.c
static double calc_sleep_time(double rate, double pkt_len) {
if (rate == 0.0) {
// Handle zero rate gracefully, e.g., return a default sleep time
return 0.0; // or some other safe value
}
return pkt_len / rate;
}
The patch adds a check for a zero rate value before performing the division, preventing the divide-by-zero error.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Local access to a system running tcpreplay 4.5.1.
- Ability to execute tcpreplay with command-line arguments.
Exploitation Steps:
- Identify the target system running tcpreplay 4.5.1.
- Craft a command that triggers the divide-by-zero condition. For example:
Thetcpreplay --pps=0 -i eth0 capture.pcap--pps=0sets the packet-per-second rate to zero, causing the division by zero incalc_sleep_time. - Execute the command. The tool will crash with a floating-point exception, causing a denial of service.
Expected Outcome: The tcpreplay process terminates unexpectedly, and any ongoing packet replay is interrupted.
Blue Team
Detection:
- Monitor for crashes of the
tcpreplayprocess. - Look for logs indicating a floating-point exception (SIGFPE).
- Detect command-line arguments containing
--pps=0or similar zero-rate parameters.
Prevention:
- Upgrade to tcpreplay 4.5.3-beta3 or later.
- Implement application whitelisting to restrict execution of tcpreplay to authorized users.
- Use security monitoring tools to detect anomalous process terminations.
Indicators of Compromise (IOCs)
- Process Crash: The
tcpreplayprocess terminates with a SIGFPE signal. - System Logs: Entries in
/var/log/syslogor/var/log/messagesindicating a floating-point exception. - Command-Line Arguments: Execution of tcpreplay with
--pps=0or similar zero-value parameters. - File Hashes: The vulnerable binary (tcpreplay 4.5.1) has a specific hash. Example (SHA256):
(Note: Replace with actual hash from the vendor's release.)1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Detection Engineering
YARA Rule
rule CVE_2025_9649_tcpreplay_divide_by_zero {
meta:
description = "Detects tcpreplay binary vulnerable to CVE-2025-9649"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-9649"
strings:
$vuln_func = "calc_sleep_time" ascii wide nocase
$vuln_div = "pkt_len / rate" ascii wide nocase
condition:
$vuln_func and $vuln_div
}
Sigma Rule
title: CVE-2025-9649 - tcpreplay Divide by Zero Exploitation
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects execution of tcpreplay with a zero packet rate, indicating exploitation of CVE-2025-9649.
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-9649
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/tcpreplay'
CommandLine|contains: '--pps=0'
condition: selection
falsepositives:
- Legitimate testing with zero rate (unlikely)
level: medium
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2025-9649 - tcpreplay Divide by Zero Exploitation"; flow:to_server; content:"--pps=0"; nocase; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Remediation:
- Upgrade tcpreplay to version 4.5.3-beta3 or later. The vendor has confirmed the fix in this version.
- If immediate upgrade is not possible, apply a workaround by validating input parameters before passing them to tcpreplay.
Long-Term Mitigation:
- Implement input validation in any scripts or tools that invoke tcpreplay.
- Use application whitelisting to control which users can execute tcpreplay.
- Monitor for crashes and anomalous behavior in network testing tools.
- Subscribe to security advisories from Appneta for future updates.
Patch Details:
- Upgrade to version 4.5.3-beta3 from the official repository: https://github.com/appneta/tcpreplay/releases/tag/v4.5.3-beta3
Valters IT
DevSecOps & Cyber Threat Intelligence Expert