CVE-2022-27135
Medium · 5.5CVSS
5.5
EPSS
1.0%
Published
Apr 25, 2022
CISA due date
—
Cloudanix analysis
A flaw in an older PDF tool can let a specially made document file crash the program when opened, so organizations should stop using the old version and switch to a safer one.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap buffer overflow in readXRefTable within XRef.cc triggered by malformed cross-reference tables in PDF files, resulting in memory corruption that can lead to segmentation faults or undefined behavior during parsing.
Why it matters to the business
Disrupts PDF processing workflows in document viewers and converters, potentially halting automated pipelines or user productivity when handling untrusted files; low prevalence reduces widespread operational risk but still requires attention in environments using legacy PDF tools.
How an attack unfolds
An attacker crafts a PDF containing a specially malformed XRef table, delivers the file to a victim system, and triggers processing via the pdftoppm utility or similar xpdf components, causing the overflow during table parsing.
How to fix it
Upgrade xpdf to a version newer than 4.03 that resolves the XRef.cc parsing issue; if no official fixed release is available, replace with an alternative PDF processing library or restrict processing of untrusted PDFs.
How to confirm the fix worked
Confirm installed xpdf version exceeds 4.03, attempt parsing of known trigger PDFs in a controlled environment, and monitor for absence of segmentation faults or crashes during XRef table handling.
Typical attack path
- Create malicious PDF with crafted XRef table
- Deliver file to target via email, web download, or shared storage
- Victim or automated process opens file with vulnerable xpdf binary
- readXRefTable function overflows heap buffer during parsing
- Application crashes or exhibits unspecified memory corruption effects
How to detect it
Review system and application logs for repeated crashes of pdftoppm or xpdf processes when handling PDF files; inspect file provenance of recently processed PDFs and correlate with segmentation fault entries in system logs.
What your security team should do
- Immediately restrict xpdf/pdftoppm usage on untrusted PDFs and prefer updated or alternative tools
- Scan environments for xpdf 4.03 deployments and prioritize removal or isolation
- Implement file-type validation and sandboxing for any remaining PDF processing
- Monitor EPSS trend and exploit availability for changes in risk posture
The record
xpdf 4.03 has heap buffer overflow in the function readXRefTable located in XRef.cc. An attacker can exploit this bug to cause a Denial of Service (Segmentation fault) or other unspecified effects by sending a crafted PDF file to the pdftoppm binary.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| 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-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-7866 In Xpdf 4.05 (and earlier), a PDF object loop in a pattern resource leads to infinite… 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