CVE-2022-43295
Medium · 5.5CVSS
5.5
EPSS
0.3%
Published
Nov 14, 2022
CISA due date
—
Cloudanix analysis
A flaw in an older PDF viewer can make the program crash when someone opens a specially made document file.
- 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
Stack-based buffer overflow in FileStream::copy() during PDF stream processing allows memory corruption on the stack, resulting in application crash or potential local code execution.
Why it matters to the business
Users opening crafted PDF files experience application crashes that interrupt document viewing workflows and may require restarts or alternative readers.
How an attack unfolds
An attacker creates a malicious PDF containing a specially crafted stream that triggers the overflow in FileStream::copy when parsed; the victim opens the file locally with the vulnerable XPDF binary, causing the crash or memory corruption.
How to fix it
Upgrade to a patched version of XPDF once available; in the interim, avoid opening untrusted PDF files with XPDF and use alternative PDF readers with sandboxing.
How to confirm the fix worked
Confirm the installed XPDF binary is newer than 4.04 and test that opening known-malformed test PDFs no longer triggers crashes or segmentation faults in FileStream::copy.
Typical attack path
- Attacker generates PDF with oversized or malformed stream data targeting Stream.cc:795
- Victim receives and opens the PDF file using XPDF on their local system
- FileStream::copy() is invoked during parsing, overflowing the stack buffer
- Process crashes or memory state is corrupted, achieving denial of service or limited code execution
How to detect it
Review endpoint logs or crash dumps for XPDF segmentation faults or stack overflow signals when PDF files are opened; correlate file open events with process termination.
What your security team should do
- Block or sandbox XPDF usage on endpoints until a fixed build is deployed
- Add PDF file-type restrictions or warnings in email and web gateways
- Monitor for XPDF process crashes in endpoint telemetry
The record
XPDF v4.04 was discovered to contain a stack overflow via the function FileStream::copy() at xpdf/Stream.cc:795.
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