Cloudanix VulnDB

CVE-2022-38228

High · 7.8

CVSS

7.8

EPSS

0.3%

Published

Aug 16, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in an older PDF viewer can let attackers take over a computer simply by tricking someone into opening a specially made document file.

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

What it actually does

Heap buffer overflow in DCTStream::transformDataUnit during JPEG DCT coefficient processing allows out-of-bounds memory writes when parsing specially crafted image data inside PDF files.

Why it matters to the business

Attackers can achieve arbitrary code execution or cause denial of service on any workstation or server that opens malicious PDFs with this PDF viewer, risking data theft, ransomware deployment, or loss of system availability.

How an attack unfolds

An attacker creates a PDF containing a JPEG stream with malformed DCT data that triggers the overflow in transformDataUnit. The victim opens the file locally using the vulnerable XPDF binary, causing the overflow to corrupt heap memory and allowing the attacker to redirect execution to attacker-controlled code.

How to fix it

Replace XPDF with a maintained PDF reader such as poppler-utils, MuPDF, or a modern browser PDF engine. If XPDF must remain in use, rebuild from source after applying upstream patches that address the Stream.cc buffer handling or switch to a fork with active maintenance.

How to confirm the fix worked

Confirm the installed xpdf binary is newer than commit ffaf11c and test against known trigger PDFs; monitor process crashes or memory sanitizer reports when opening untrusted documents.

Typical attack path

  1. Craft malicious PDF embedding JPEG with oversized or invalid DCT coefficients
  2. Deliver PDF via email, web download, or shared storage
  3. Victim opens file with vulnerable XPDF binary
  4. DCTStream::transformDataUnit performs out-of-bounds write on heap
  5. Attacker payload gains control of instruction pointer or achieves RCE

How to detect it

Review system logs and EDR telemetry for XPDF processes that terminate unexpectedly or exhibit heap corruption signals when opening PDF files; correlate with file creation timestamps of suspicious documents.

What your security team should do

  • Immediately remove or sandbox XPDF installations on all endpoints
  • Block opening of untrusted PDFs with legacy viewers via application allow-listing
  • Deploy EDR rules that alert on XPDF processes writing to unexpected memory regions
  • Scan historical email and file shares for PDFs that may trigger DCT parsing paths

The record

XPDF commit ffaf11c was discovered to contain a heap-buffer overflow via DCTStream::transformDataUnit 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