Cloudanix VulnDB

CVE-2022-38238

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 viewing program can let attackers take control of a computer simply by tricking someone into opening a specially made PDF file.

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

What it actually does

Heap buffer overflow in DCTStream::lookChar() at Stream.cc allows out-of-bounds memory access during processing of malformed DCT streams inside PDF files.

Why it matters to the business

Attackers can gain code execution on systems that open malicious PDFs with the affected viewer, enabling data theft, ransomware deployment, or persistence on user workstations.

How an attack unfolds

An attacker crafts a PDF containing a specially malformed DCT stream. When the victim opens the file in the vulnerable XPDF binary, DCTStream::lookChar triggers the heap overflow, allowing control of execution flow.

How to fix it

Upgrade XPDF to the first patched release that resolves the overflow in Stream.cc; if no official fixed build is yet published, replace the binary with a maintained alternative PDF viewer until an update is available.

How to confirm the fix worked

Confirm the installed XPDF binary is newer than commit ffaf11c, run regression tests with known trigger PDFs, and verify absence of crashes or sanitizer violations during DCT decoding.

Typical attack path

  1. Craft malicious PDF embedding malformed DCT data
  2. Deliver file via email attachment, web download, or shared storage
  3. Victim opens the PDF using the vulnerable XPDF binary
  4. DCTStream::lookChar performs out-of-bounds write on the heap
  5. Attacker payload gains code execution or causes denial of service

How to detect it

Hunt for XPDF process crashes or segmentation faults correlated with PDF file opens in system logs; inspect for heap-related sanitizer reports or unusual memory allocation patterns during DCT stream handling.

What your security team should do

  • Immediately replace XPDF on all endpoints with a patched or alternative viewer
  • Block or sandbox XPDF execution for high-risk user populations until fixed
  • Add PDF file-type restrictions in email gateways and browser download policies
  • Monitor vulnerability feeds for official XPDF patch release and expedite deployment

The record

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