CVE-2022-38234
Medium · 5.5CVSS
5.5
EPSS
0.3%
Published
Aug 16, 2022
CISA due date
—
Cloudanix analysis
A PDF viewing tool can suddenly stop working when someone tries to open a specially made document file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Denial of service
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Triggers a segmentation violation (crash) inside Lexer::getObj when parsing a specially malformed PDF object stream.
Why it matters to the business
Users who open attacker-supplied PDF files with the affected viewer experience an immediate application crash, halting document access and any automated PDF processing workflows.
How an attack unfolds
An attacker crafts a minimal PDF containing an object that forces Lexer::getObj into an invalid state, then delivers the file to a target who opens it locally with xpdf, resulting in an immediate segmentation fault.
How to fix it
Upgrade to a version of xpdf that post-dates commit ffaf11c or apply a source-level patch that adds bounds checks before object parsing in Lexer.cc; until fixed, avoid opening untrusted PDFs with the vulnerable binary.
How to confirm the fix worked
Rebuild with the patch and confirm the binary no longer crashes when opening the original proof-of-concept PDF; monitor process exit status and core dumps for the Lexer::getObj symbol.
Typical attack path
- Generate a PDF file containing a malformed object that reaches the vulnerable code path in Lexer.cc
- Host or transmit the file via email, web download, or shared storage
- Victim opens the file using an affected xpdf binary
- Lexer::getObj dereferences invalid memory and the process terminates
How to detect it
Search application crash logs, core-dump directories, and system event logs for abrupt terminations of the xpdf process that reference Lexer.cc or getObj; correlate with recent file-open events for PDFs received from external sources.
- segmentation violation.*Lexer::getObj
- /xpdf/Lexer.cc
- xpdf core dumped
What your security team should do
- Block untrusted PDF files from reaching user desktops until a patched xpdf binary is deployed
- Add the vulnerable Lexer.cc path to internal static-analysis rules to catch similar issues in future builds
- Update incident-response playbooks to treat unexpected xpdf crashes on PDF open as potential exploitation attempts
The record
XPDF commit ffaf11c was discovered to contain a segmentation violation via Lexer::getObj(Object*) at /xpdf/Lexer.cc.
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