CVE-2025-59933
📋 TL;DR
CVE-2025-59933 is a buffer read overflow vulnerability in libvips when compiled with PDF support via poppler. It allows attackers to cause denial of service or potentially execute arbitrary code by providing a crafted PDF with a page that defines width but not height. Only users with libvips compiled with poppler-based PDF support are affected.
💻 Affected Systems
- libvips
📦 What is this software?
Libvips by Libvips
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise if the buffer overflow can be weaponized for arbitrary code execution.
Likely Case
Application crash or denial of service due to memory corruption when processing malicious PDF files.
If Mitigated
No impact if workarounds are applied or PDF support is disabled.
🎯 Exploit Status
Exploitation requires crafting a specific PDF file, but no authentication is needed to trigger the vulnerability.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 8.17.2
Vendor Advisory: https://github.com/libvips/libvips/security/advisories/GHSA-q8px-4w5q-c2r4
Restart Required: Yes
Instructions:
1. Update libvips to version 8.17.2 or later. 2. Recompile any applications using libvips. 3. Restart services using libvips.
🔧 Temporary Workarounds
Block PDF loading via VipsForeignLoadPdf
allPrevent PDF loading operations using vips_operation_block_set in application code.
vips_operation_block_set("VipsForeignLoadPdf", TRUE);
Set VIPS_BLOCK_UNTRUSTED environment variable
linuxBlock all untrusted loaders including PDF input via poppler at runtime.
export VIPS_BLOCK_UNTRUSTED=1
🧯 If You Can't Patch
- Disable PDF support in libvips by recompiling without poppler support.
- Implement strict input validation to reject PDF files from untrusted sources.
🔍 How to Verify
Check if Vulnerable:
Check if libvips version is 8.17.1 or below and compiled with PDF support via poppler.
Check Version:
vips --version
Verify Fix Applied:
Verify libvips version is 8.17.2 or later, or confirm PDF loading is blocked via workarounds.
📡 Detection & Monitoring
Log Indicators:
- Application crashes or segmentation faults when processing PDF files
- Memory corruption errors in application logs
Network Indicators:
- Unexpected PDF file uploads to applications using libvips
SIEM Query:
source="application.log" AND ("segmentation fault" OR "buffer overflow" OR "memory corruption") AND "pdf"
🔗 References
- https://github.com/libvips/libvips/commit/a58bfae9223a5466cc81ba9fe6dfb08233cf17d1
- https://github.com/libvips/libvips/releases/tag/v8.17.2
- https://github.com/libvips/libvips/security/advisories/GHSA-q8px-4w5q-c2r4
- https://www.vicarius.io/vsociety/posts/cve-2025-59933-detect-libvips-vulnerability
- https://www.vicarius.io/vsociety/posts/cve-2025-59933-mitigate-libvips-vulnerability