CVE-2025-9157

5.3 MEDIUM

📋 TL;DR

A use-after-free vulnerability in tcpreplay's tcprewrite component allows local attackers to execute arbitrary code or cause denial of service. The vulnerability exists in the untrunc_packet function and affects tcpreplay versions up to 4.5.2-beta2. Only local users can exploit this vulnerability.

💻 Affected Systems

Products:
  • appneta tcpreplay
Versions: up to and including 4.5.2-beta2
Operating Systems: All platforms running tcpreplay
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects tcprewrite component when processing specially crafted packet files.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation leading to full system compromise via arbitrary code execution.

🟠

Likely Case

Denial of service causing tcprewrite to crash when processing malicious packet files.

🟢

If Mitigated

Limited impact due to local-only exploitation requirement and typical usage patterns.

🌐 Internet-Facing: LOW - Cannot be exploited remotely, requires local access.
🏢 Internal Only: MEDIUM - Local users could exploit to gain elevated privileges or disrupt packet replay operations.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploit details are publicly available in the disclosed references. Requires local access and ability to run tcprewrite with malicious input.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit 73008f261f1cdf7a1087dc8759115242696d35da

Vendor Advisory: https://github.com/appneta/tcpreplay/issues/970

Restart Required: No

Instructions:

1. Update tcpreplay to latest version from official repository. 2. Apply commit 73008f261f1cdf7a1087dc8759115242696d35da if building from source. 3. Verify installation with version check.

🔧 Temporary Workarounds

Restrict tcprewrite usage

all

Limit tcprewrite execution to trusted users only

chmod 750 /usr/bin/tcprewrite
setfacl -m u:trusteduser:rx /usr/bin/tcprewrite

Input validation

all

Only process packet files from trusted sources

🧯 If You Can't Patch

  • Remove execute permissions for untrusted users on tcprewrite binary
  • Monitor for suspicious tcprewrite process execution patterns

🔍 How to Verify

Check if Vulnerable:

Check tcpreplay version: tcpreplay --version | grep -E '4\.5\.[0-2]|4\.5\.2-beta[0-2]'

Check Version:

tcpreplay --version

Verify Fix Applied:

Verify version is newer than 4.5.2-beta2 or contains commit 73008f261f1cdf7a1087dc8759115242696d35da

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault or crash logs from tcprewrite
  • Unexpected termination of tcprewrite processes

Network Indicators:

  • None - local-only vulnerability

SIEM Query:

process_name:"tcprewrite" AND (event_type:"crash" OR exit_code:139)

🔗 References

📤 Share & Export