CVE-2022-30775
Medium · 5.5CVSS
5.5
EPSS
0.8%
Published
May 16, 2022
CISA due date
—
Cloudanix analysis
A bug in an older PDF tool lets specially made documents use up so much memory that the program stops working, which can interrupt any work that depends on reading or converting PDFs.
- 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
The flaw causes xpdf 4.04 to allocate excessive memory when processing specially crafted PDF input, leading to resource exhaustion and denial of service.
Why it matters to the business
PDF processing tools become unresponsive or crash under load from malicious documents, disrupting document workflows, scanning pipelines, and any automated systems that rely on xpdf for rendering or conversion.
How an attack unfolds
An attacker prepares a malicious PDF that triggers uncontrolled memory allocation inside xpdf. The document is delivered to a target system or service that invokes binaries such as pdftoppm. Upon opening or converting the file, the process consumes large amounts of memory until the system or application becomes unavailable. Publicly available exploit code can be used to generate such PDFs.
How to fix it
Replace xpdf 4.04 with a later maintained version of xpdf or switch to an alternative PDF rendering library that does not exhibit the same memory behavior. Apply operating-system resource limits to PDF-processing processes, run them inside containers with memory caps, and restrict execution of xpdf binaries to trusted input sources only.
How to confirm the fix worked
Confirm the installed xpdf version is newer than 4.04 or replaced entirely. Test the environment by feeding known memory-exhaustion PDFs in an isolated sandbox and verify that memory usage remains bounded and no crash occurs.
Typical attack path
- Generate a crafted PDF using publicly available techniques that force excessive memory allocation in xpdf.
- Deliver the PDF via email, web download, or shared storage to a system running xpdf or dependent tools.
- Trigger processing by invoking pdftoppm or another xpdf binary on the file, either manually or through automated workflows.
- Observe memory exhaustion causing the process or host to become unresponsive or crash.
How to detect it
Search process and system logs for xpdf or pdftoppm instances that terminate abnormally or consume unusually high memory. Review security and application logs for repeated invocations of xpdf binaries on files originating from external sources.
What your security team should do
- Inventory all systems and pipelines that invoke xpdf or pdftoppm and prioritize removal or replacement where possible.
- Implement strict input validation and sandboxing around any remaining xpdf usage.
- Monitor for high-memory processes associated with PDF handling and set alerts for anomalous resource consumption.
- Block or quarantine PDF files from untrusted sources until safer tooling is deployed.
The record
xpdf 4.04 allocates excessive memory when presented with crafted input. This can be triggered by (for example) sending a crafted PDF document to the pdftoppm binary. It is most easily reproduced with the DCMAKE_CXX_COMPILER=afl-clang-fast++ option.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Mageia:9 | xpdf | 0 | 4.05-1.mga9 |
| Ubuntu:16.04:LTS | ipe | 0 | No fix |
| Ubuntu:18.04:LTS | ipe | 0 | No fix |
| Ubuntu:20.04:LTS | ipe | 0 | No fix |
| Ubuntu:22.04:LTS | ipe | 0 | No fix |
| Ubuntu:24.04:LTS | ipe | 0 | No fix |
| Ubuntu:24.10 | ipe | 0 | No fix |
| Ubuntu:25.04 | ipe | 0 | No fix |
| Ubuntu:25.10 | ipe | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | ipe | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | ipe | 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-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