CVE-2020-35376
📋 TL;DR
CVE-2020-35376 is a stack-based buffer overflow vulnerability in Xpdf 4.02's Type 1C font parser. Attackers can craft malicious PDF files to cause denial of service or potentially execute arbitrary code. Anyone using Xpdf to process untrusted PDF files is affected.
💻 Affected Systems
- Xpdf
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
Xpdf by Xpdfreader
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise if the attacker can control execution flow after overflow.
Likely Case
Denial of service through application crash when processing malicious PDF files.
If Mitigated
Application crash with no further impact if exploit attempts fail or are contained.
🎯 Exploit Status
Exploitation requires crafting a malicious PDF file that triggers the vulnerable font parsing code.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Xpdf 4.03 and later
Vendor Advisory: https://forum.xpdfreader.com/viewtopic.php?f=3&t=42066
Restart Required: No
Instructions:
1. Download Xpdf 4.03 or later from https://www.xpdfreader.com/download.html. 2. Replace existing Xpdf installation with new version. 3. Verify installation with 'pdftotext -v' command.
🔧 Temporary Workarounds
Disable Type 1C font processing
allConfigure Xpdf to disable Type 1C font parsing if not required
Not applicable - requires source code modification
🧯 If You Can't Patch
- Restrict PDF file processing to trusted sources only
- Implement sandboxing for PDF processing applications
🔍 How to Verify
Check if Vulnerable:
Run 'pdftotext -v' and check if version is 4.02 or earlier
Check Version:
pdftotext -v
Verify Fix Applied:
Run 'pdftotext -v' and confirm version is 4.03 or later
📡 Detection & Monitoring
Log Indicators:
- Application crashes when processing PDF files
- Memory access violation errors in logs
Network Indicators:
- Unusual PDF file uploads to web services
- Multiple failed PDF processing attempts
SIEM Query:
source="application.log" AND ("segmentation fault" OR "access violation") AND process="pdftotext"
🔗 References
- https://forum.xpdfreader.com/viewtopic.php?f=3&t=42066
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4ZUU5QG6SSVRTKZTR3A72LDRVZETEI63/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VLOYVJSM54IL6I5RY4QTJGRS7PIEG44X/
- https://forum.xpdfreader.com/viewtopic.php?f=3&t=42066
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4ZUU5QG6SSVRTKZTR3A72LDRVZETEI63/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VLOYVJSM54IL6I5RY4QTJGRS7PIEG44X/