CVE-2023-2662
Medium · 5.5CVSS
5.5
EPSS
0.3%
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, interrupting normal document work.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A malformed color space object in a PDF triggers an integer division by zero during parsing, causing the application to terminate abnormally.
Why it matters to the business
Users or automated PDF processing workflows experience sudden crashes when handling certain untrusted documents, leading to lost productivity and potential disruption of document review pipelines.
How an attack unfolds
An attacker creates a PDF containing a deliberately invalid color space definition. When the victim opens the file locally with an affected Xpdf binary, the parser performs the division and crashes the process. The flaw has publicly available proof-of-concept code but remains outside known ransomware or targeted APT campaigns.
How to fix it
Upgrade to the latest Xpdf release that resolves the divide-by-zero condition during color space handling. Until a patched version is available, restrict Xpdf use to trusted files only and consider alternative PDF viewers for untrusted content.
How to confirm the fix worked
Test the fixed binary against the original proof-of-concept PDF to confirm it no longer crashes. Monitor process exit codes and logs for absence of the prior division fault when processing the same test file.
Typical attack path
- Craft a PDF with an invalid color space object that forces a zero denominator
- Deliver the file via email, web download, or shared storage
- Victim opens the document with Xpdf on a local workstation
- Parser encounters the bad object and crashes the viewer
How to detect it
Review system and application logs for abrupt Xpdf process terminations accompanied by floating-point or arithmetic exceptions when PDF files are opened. Correlate file-open events with crash signatures in local crash reporting systems.
What your security team should do
- Prioritize patching Xpdf installations that process external or user-supplied PDFs
- Add Xpdf to the list of applications covered by software inventory and update automation
- Block or sandbox untrusted PDF handling until upgrades are complete
The record
In Xpdf 4.04 (and earlier), a bad color space object in the input PDF file can cause a divide-by-zero.
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-2663 In Xpdf 4.04 (and earlier), a PDF object loop in the page label tree leads to infinite… 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