CVE-2024-22097

9.8 CRITICAL

📋 TL;DR

A double-free vulnerability in libbiosig's BrainVision header parsing allows arbitrary code execution when processing malicious .vdhr files. This affects systems using libbiosig for biomedical signal processing. Attackers can achieve remote code execution by tricking users or automated systems into opening crafted files.

💻 Affected Systems

Products:
  • The Biosig Project libbiosig
Versions: Master Branch (ab0ee111) and version 2.5.0
Operating Systems: Linux, Windows, macOS, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using libbiosig to parse BrainVision .vdhr files is vulnerable. This includes biomedical research software, healthcare systems, and data analysis tools.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining the same privileges as the libbiosig process, potentially leading to data theft, ransomware deployment, or lateral movement.

🟠

Likely Case

Remote code execution on systems processing untrusted .vdhr files, particularly in healthcare/research environments using libbiosig for EEG/ECG data analysis.

🟢

If Mitigated

Denial of service or application crash if exploit fails, but memory corruption could still cause instability.

🌐 Internet-Facing: MEDIUM - Risk exists if web applications process uploaded .vdhr files, but requires specific biomedical data processing workflows.
🏢 Internal Only: HIGH - Research labs, hospitals, and biomedical systems using libbiosig internally are primary targets through file sharing or automated processing.

🎯 Exploit Status

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

Exploit requires victim to process a malicious .vdhr file. No authentication needed. Public PoC available in Talos advisory.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit fixing CVE-2024-22097 (check upstream repository)

Vendor Advisory: https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OIRLGNQM33KAWVWP5RPMAPHWNP3IY5YW/

Restart Required: Yes

Instructions:

1. Update libbiosig to patched version from official repository. 2. Recompile any applications using libbiosig. 3. Restart services using the library.

🔧 Temporary Workarounds

File type restriction

all

Block processing of .vdhr files at application or system level

# Example: Use file extension filtering in web apps
# Configure MIME type restrictions for uploads

Sandbox execution

linux

Run libbiosig processes in isolated containers or sandboxes

docker run --read-only --security-opt no-new-privileges -v /safe/data:/data image
# Use bubblewrap or similar sandboxing tools

🧯 If You Can't Patch

  • Implement strict input validation - reject malformed .vdhr files before parsing
  • Deploy application allowlisting to prevent unauthorized code execution

🔍 How to Verify

Check if Vulnerable:

Check libbiosig version: biosig-tools --version or examine library files. If version is 2.5.0 or master branch around ab0ee111, vulnerable.

Check Version:

biosig-tools --version 2>/dev/null || strings /usr/lib*/libbiosig* 2>/dev/null | grep -i version

Verify Fix Applied:

Verify updated version doesn't match vulnerable versions. Test with known safe .vdhr files to ensure functionality.

📡 Detection & Monitoring

Log Indicators:

  • Multiple free() calls on same memory address in application logs
  • Application crashes when processing .vdhr files
  • Unexpected child processes spawned from libbiosig applications

Network Indicators:

  • Unexpected outbound connections from biomedical data processing systems
  • File uploads of .vdhr files to web applications

SIEM Query:

process_name:"biosig" AND (event_type:crash OR process_spawned:unusual)

🔗 References

📤 Share & Export