CVE-2023-31979
📋 TL;DR
CVE-2023-31979 is a buffer overflow vulnerability in Catdoc v0.95's process_file function that allows attackers to execute arbitrary code or cause denial of service. This affects systems running the vulnerable Catdoc version, particularly when processing malicious document files. Users and administrators who utilize Catdoc for document conversion are at risk.
💻 Affected Systems
- Catdoc
📦 What is this software?
Catdoc by Fossies
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with the privileges of the Catdoc process, potentially leading to full system compromise.
Likely Case
Application crash (denial of service) when processing specially crafted document files.
If Mitigated
Limited impact if Catdoc runs in sandboxed environments with minimal privileges.
🎯 Exploit Status
Exploitation requires the attacker to provide a malicious document file that Catdoc processes. The GitHub issue contains technical details that could facilitate exploitation.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v0.96 or later
Vendor Advisory: https://github.com/petewarden/catdoc/issues/9
Restart Required: No
Instructions:
1. Download latest Catdoc version from official repository. 2. Compile and install following standard build procedures. 3. Replace existing Catdoc binary with patched version.
🔧 Temporary Workarounds
Disable Catdoc usage
linuxTemporarily disable or remove Catdoc from systems until patched
sudo apt remove catdoc
sudo yum remove catdoc
rm /usr/local/bin/catdoc
Restrict file processing
allLimit Catdoc to trusted document sources only
🧯 If You Can't Patch
- Run Catdoc with minimal privileges using chroot or containerization
- Implement strict input validation for documents processed by Catdoc
🔍 How to Verify
Check if Vulnerable:
Check Catdoc version: catdoc -v 2>&1 | head -1
Check Version:
catdoc -v 2>&1 | head -1
Verify Fix Applied:
Verify version is v0.96 or later: catdoc -v 2>&1 | grep -q '0.9[6-9]\|1\.' && echo 'Patched'
📡 Detection & Monitoring
Log Indicators:
- Segmentation fault errors in system logs
- Catdoc process crashes
- Abnormal memory usage patterns
Network Indicators:
- Unusual document file uploads to systems using Catdoc
SIEM Query:
process_name:"catdoc" AND (event_type:"crash" OR exit_code:139)