CVE-2025-66865

7.5 HIGH

📋 TL;DR

A stack-based buffer overflow vulnerability exists in the cp-demangle.c file of BinUtils 2.26, specifically in the d_print_comp_inner function. Attackers can exploit this by crafting a malicious PE file to cause a denial of service (crash) or potentially execute arbitrary code. This affects systems using BinUtils tools like cxxfilt, objdump, or readelf to process PE files.

💻 Affected Systems

Products:
  • BinUtils
  • GNU BinUtils
Versions: Version 2.26 specifically
Operating Systems: Linux, Unix-like systems, Windows (if compiled from source)
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where BinUtils 2.26 is installed and used to process PE (Portable Executable) files. Many distributions ship newer versions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to full system compromise if the vulnerable binary processes attacker-controlled PE files.

🟠

Likely Case

Denial of service through application crash when processing malicious PE files.

🟢

If Mitigated

Limited impact if BinUtils tools are not used to process untrusted PE files.

🌐 Internet-Facing: MEDIUM - Risk exists if web applications or services use BinUtils to process uploaded PE files.
🏢 Internal Only: LOW - Typically requires local access or specific workflows involving PE file analysis.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Proof-of-concept crash demonstration is publicly available. Weaponization for RCE would require additional exploitation techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: BinUtils 2.27 or later

Vendor Advisory: https://sourceware.org/bugzilla/show_bug.cgi?id=XXXXX

Restart Required: No

Instructions:

1. Check current BinUtils version: `objdump --version`. 2. Update using package manager: `sudo apt update && sudo apt upgrade binutils` (Debian/Ubuntu) or `sudo yum update binutils` (RHEL/CentOS). 3. Verify update: `objdump --version | head -1`.

🔧 Temporary Workarounds

Restrict PE file processing

all

Limit use of BinUtils tools on untrusted PE files.

Use alternative tools

all

Replace vulnerable BinUtils tools with updated versions or alternatives for PE file analysis.

🧯 If You Can't Patch

  • Implement strict input validation for PE files processed by BinUtils tools.
  • Isolate systems using BinUtils 2.26 and restrict network access.

🔍 How to Verify

Check if Vulnerable:

Run `objdump --version | head -1` and check if output contains '2.26'. If yes, system is vulnerable.

Check Version:

objdump --version | head -1

Verify Fix Applied:

After update, run `objdump --version | head -1` and confirm version is 2.27 or higher.

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault or crash logs from cxxfilt, objdump, or readelf processes
  • Abnormal process termination with signal 11 (SIGSEGV)

Network Indicators:

  • Unusual PE file uploads to systems running BinUtils tools

SIEM Query:

process_name IN ('cxxfilt', 'objdump', 'readelf') AND exit_code = 139

🔗 References

📤 Share & Export