CVE-2023-2664
Medium · 5.5CVSS
5.5
EPSS
0.3%
Published
May 11, 2023
CISA due date
—
Cloudanix analysis
A crafted PDF file can make the Xpdf viewer crash when someone tries to open it.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Malformed PDF embedded file tree containing an object loop triggers unbounded recursion during parsing, exhausting stack memory and causing process termination.
Why it matters to the business
Local users lose the ability to open or render affected PDFs, interrupting document workflows and requiring restarts or alternative viewers; long-term unpatched installations remain exposed given the public exploit.
How an attack unfolds
An attacker prepares a PDF whose embedded file references form a cycle, then convinces the victim to open the file locally; the parser recurses until the stack overflows and the application crashes, achieving denial of service. Public exploit code has been available since disclosure.
How to fix it
Replace Xpdf 4.04 and earlier with a later release that resolves the recursion flaw; where an upgrade is unavailable, switch to an alternative PDF reader that does not exhibit the same parsing behavior.
How to confirm the fix worked
Attempt to open a test PDF containing an embedded-file loop in the updated binary and confirm the application remains stable without stack overflow or crash.
Typical attack path
- Craft malicious PDF with cyclic embedded-file object references
- Deliver the file via email, web download, or shared storage
- Victim opens the document in the vulnerable Xpdf binary
- Parser enters infinite recursion on the embedded file tree
- Stack exhaustion terminates the process
How to detect it
Review file-open logs and crash reports for repeated Xpdf terminations shortly after PDF access; search endpoint telemetry for execution of the xpdf binary against untrusted documents.
What your security team should do
- Prioritize removal or upgrade of Xpdf 4.04 and earlier on all endpoints
- Block or sandbox untrusted PDFs until readers are updated
- Add the vulnerable Xpdf binary to application allow-lists only after patching
- Monitor for new fixed releases from the vendor
The record
In Xpdf 4.04 (and earlier), a PDF object loop in the embedded file tree leads to infinite recursion and a stack overflow.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Mageia:9 | xpdf | 0 | 4.05-1.mga9 |
| 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-2023-3436 Xpdf 4.04 will deadlock on a PDF object stream whose "Length" field is itself in another… Also affects xpdf
- CVE-2023-3044 An excessively large PDF page size (found in fuzz testing, unlikely in normal PDF files)… Also affects xpdf
- CVE-2023-2663 In Xpdf 4.04 (and earlier), a PDF object loop in the page label tree leads to infinite… Also affects xpdf
- CVE-2023-2662 In Xpdf 4.04 (and earlier), a bad color space object in the input PDF file can cause a… Also affects xpdf
- CVE-2022-45587 Stack overflow vulnerability in function gmalloc in goo/gmem.cc in xpdf 4.04, allows… Also affects xpdf
- CVE-2022-45586 Stack overflow vulnerability in function Dict::find in xpdf/Dict.cc in xpdf 4.04, allows… Also affects xpdf
- CVE-2022-43071 A stack overflow in the Catalog::readPageLabelTree2(Object*) function of XPDF v4.04… Also affects xpdf
- CVE-2022-43295 XPDF v4.04 was discovered to contain a stack overflow via the function FileStream::copy()… Also affects xpdf