CVE-2024-7866
NoneCVSS
—
EPSS
0.2%
Published
Aug 15, 2024
CISA due date
—
Cloudanix analysis
A flaw in PDF software lets attackers crash the program with a specially crafted file, preventing users from opening certain documents until the software is updated.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- High
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A malformed PDF containing a circular object reference inside a pattern resource triggers unbounded recursion during parsing, exhausting the call stack and causing a crash.
Why it matters to the business
Processing untrusted PDF files can crash document viewers or conversion tools, interrupting workflows that rely on PDF handling and requiring manual restarts or recovery.
How an attack unfolds
An attacker creates a PDF with a self-referential loop in a pattern dictionary. When the file is opened in a vulnerable parser, the pattern resource handler recurses indefinitely until the stack is exhausted and the process terminates.
How to fix it
Upgrade Xpdf to a version newer than 4.05 that eliminates the recursive pattern handling flaw.
How to confirm the fix worked
Reprocess a previously crashing test PDF after the upgrade and confirm the application remains stable without stack overflow.
Typical attack path
- Generate PDF with circular pattern object references
- Distribute the crafted file via email, web download, or shared storage
- Victim opens the document with the affected PDF viewer or library
- Parser enters infinite recursion on the pattern resource and crashes
How to detect it
Review application crash logs and core dumps for stack exhaustion events immediately following PDF open attempts; correlate with file creation or download timestamps of suspicious PDFs.
What your security team should do
- Apply the newest Xpdf release across all endpoints that render PDFs
- Replace or sandbox any remaining instances of the vulnerable version
- Add PDF processing to the inventory of memory-safety-sensitive components
The record
In Xpdf 4.05 (and earlier), a PDF object loop in a pattern resource leads to infinite recursion and a stack overflow.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:16.04:LTS | ipe | 0 | No fix |
| Ubuntu:16.04:LTS | xpdf | 0 | No fix |
| Ubuntu:18.04:LTS | ipe | 0 | No fix |
| Ubuntu:18.04:LTS | xpdf | 0 | No fix |
| Ubuntu:20.04:LTS | ipe | 0 | No fix |
| Ubuntu:22.04:LTS | ipe | 0 | No fix |
| Ubuntu:22.04:LTS | xpdf | 0 | No fix |
| Ubuntu:24.04:LTS | ipe | 0 | No fix |
| Ubuntu:24.04:LTS | xpdf | 0 | No fix |
| Ubuntu:24.10 | ipe | 0 | No fix |
| Ubuntu:24.10 | xpdf | 0 | No fix |
| Ubuntu:25.04 | ipe | 0 | No fix |
| Ubuntu:25.04 | xpdf | 0 | No fix |
| Ubuntu:25.10 | ipe | 0 | No fix |
| Ubuntu:25.10 | xpdf | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | ipe | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | xpdf | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | ipe | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | xpdf | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | ipe | 0 | No fix |
Related vulnerabilities
- CVE-2024-7868 In Xpdf 4.05 (and earlier), invalid header info in a DCT (JPEG) stream can lead to an… Also affects ipe
- CVE-2024-7867 In Xpdf 4.05 (and earlier), very large coordinates in a page box can cause an integer… Also affects ipe
- CVE-2024-4976 Out-of-bounds array write in Xpdf 4.05 and earlier, due to missing object type check in… Also affects ipe
- CVE-2024-4568 In Xpdf 4.05 (and earlier), a PDF object loop in the PDF resources leads to infinite… Also affects ipe
- CVE-2024-4141 Out-of-bounds array write in Xpdf 4.05 and earlier, triggered by an invalid character… Also affects ipe
- CVE-2024-3900 Out-of-bounds array write in Xpdf 4.05 and earlier, triggered by long Unicode sequence in… Also affects ipe
- CVE-2024-3247 In Xpdf 4.05 (and earlier), a PDF object loop in an object stream leads to infinite… Also affects ipe
- CVE-2024-3248 In Xpdf 4.05 (and earlier), a PDF object loop in the attachments leads to infinite… Also affects ipe