Cloudanix VulnDB

CVE-2022-38231

High · 7.8

CVSS

7.8

EPSS

0.3%

Published

Aug 16, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in a common PDF reading tool can let attackers take control of a computer simply by getting someone to open a specially crafted document file.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Heap-buffer overflow in DCTStream::getChar at Stream.cc allowing memory corruption when processing malformed DCT streams in PDF files.

Why it matters to the business

Attackers can potentially execute arbitrary code or crash systems using vulnerable XPDF when users open malicious PDFs. The issue has been public for over four years with exploit code available but low exploitation probability.

How an attack unfolds

An attacker crafts a PDF containing a malformed DCT stream that overflows the heap buffer in DCTStream::getChar when the file is opened in XPDF, leading to memory corruption and possible code execution. Public exploit code exists and can be repurposed for targeted attacks.

How to fix it

Upgrade XPDF to a version containing the fix for commit ffaf11c or later if released by the project; otherwise migrate to a maintained alternative PDF viewer. Apply operating-system level PDF sandboxing or content-disarmament tools as an interim control.

How to confirm the fix worked

Confirm XPDF binary version and source commit history to ensure the vulnerable DCTStream::getChar implementation has been replaced. Test with publicly available proof-of-concept PDFs that target the DCT stream path.

Typical attack path

  1. Craft a malicious PDF embedding a malformed DCT stream designed to trigger the overflow
  2. Deliver the PDF to the target via email, web download, or shared storage
  3. Victim opens the PDF using a vulnerable XPDF binary
  4. DCTStream::getChar processes the stream and triggers the heap overflow
  5. Attacker achieves memory corruption potentially leading to code execution or denial of service

How to detect it

Search process execution logs and crash reports for XPDF binaries terminating with segmentation faults or heap-related errors while handling PDF files. Review file-access logs for suspicious PDFs opened shortly before anomalous process behavior.

What your security team should do

  • Replace or isolate XPDF installations on endpoints that handle untrusted PDFs
  • Block or sandbox XPDF execution via application allow-listing where feasible
  • Deploy PDF scanning gateways that detect malformed DCT streams before user delivery
  • Monitor EPSS and exploit availability updates given the four-year public disclosure window

The record

XPDF commit ffaf11c was discovered to contain a heap-buffer overflow via DCTStream::getChar() at /xpdf/Stream.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