CVE-2023-2663
Medium · 5.5CVSS
5.5
EPSS
0.5%
Published
May 11, 2023
CISA due date
—
Cloudanix analysis
A specially made PDF file can make the Xpdf program crash when someone tries to open it, stopping people from reading the document.
- 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
A crafted PDF containing a cyclic reference in the page label tree triggers unbounded recursion during parsing, exhausting the call stack and terminating the process.
Why it matters to the business
Users opening malicious PDFs experience an immediate crash of the viewer, interrupting document access and potentially halting workflows that rely on local PDF inspection.
How an attack unfolds
An attacker embeds a self-referential loop inside the PDF page-label dictionary; when a victim opens the file with Xpdf the parser follows the cycle, recurses until stack exhaustion occurs, and the application terminates.
How to fix it
Upgrade to the first patched release of Xpdf once published; until then, restrict Xpdf to trusted PDFs only and prefer alternative viewers for untrusted documents.
How to confirm the fix worked
Confirm Xpdf version is newer than 4.04; attempt to open a test PDF containing a page-label loop and verify the viewer remains stable without crashing.
Typical attack path
- Craft PDF with cyclic page-label object references
- Deliver file via email, download link, or shared storage
- Victim opens the document with Xpdf 4.04 or earlier
- Parser enters infinite recursion on page-label tree walk
- Stack overflow aborts the process
How to detect it
Monitor process termination logs and application crash reports on endpoints running Xpdf for sudden exits while handling PDF files; correlate with file-open events for recently received documents.
What your security team should do
- Block untrusted PDFs from being opened with Xpdf until a fixed version is available
- Add Xpdf crash signatures to endpoint monitoring for rapid detection of attempted exploitation
- Communicate to users to avoid opening PDFs from unknown sources with this viewer
The record
In Xpdf 4.04 (and earlier), a PDF object loop in the page label 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-2664 In Xpdf 4.04 (and earlier), a PDF object loop in the embedded file 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