Cloudanix VulnDB

CVE-2022-38237

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 PDF 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::readScan() at /xpdf/Stream.cc allows out-of-bounds memory writes during processing of malformed DCT streams in PDF files.

Why it matters to the business

Attackers can crash the PDF viewer or execute arbitrary code on systems where users open malicious PDFs, potentially leading to data theft, ransomware deployment, or full system compromise in environments relying on this viewer.

How an attack unfolds

An attacker crafts a PDF containing a specially malformed DCT stream that triggers the overflow in readScan when parsed; the victim opens the file locally with the vulnerable XPDF binary, causing the heap corruption that an attacker can turn into code execution.

How to fix it

Upgrade to a patched version of XPDF once available; in the interim replace XPDF with a maintained PDF viewer such as poppler-based tools or MuPDF and restrict execution of untrusted PDF files.

How to confirm the fix worked

Confirm XPDF binary version is newer than the affected commit ffaf11c, run regression tests with known malformed DCT PDFs, and verify that readScan no longer performs unbounded writes via code review or sanitizer builds.

Typical attack path

  1. Create malicious PDF embedding crafted DCT data designed to overflow the heap buffer
  2. Deliver the PDF to the target via email attachment, web download, or shared storage
  3. Victim opens the PDF using the vulnerable XPDF application on their system
  4. DCTStream::readScan processes the stream and writes beyond allocated heap memory
  5. Attacker leverages the corruption for arbitrary code execution or denial of service

How to detect it

Search application crash logs and core dumps for references to Stream.cc or DCTStream::readScan; inspect process execution history for xpdf launched against recently received PDF files from external sources.

What your security team should do

  • Immediately restrict XPDF usage for untrusted documents and prefer alternative viewers
  • Monitor upstream XPDF repository for security patches addressing Stream.cc
  • Deploy application allow-listing to prevent execution of older XPDF binaries
  • Educate users on risks of opening PDFs from unknown sources

The record

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