Cloudanix VulnDB

CVE-2022-38334

Medium · 5.5

CVSS

5.5

EPSS

0.4%

Published

Sep 15, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

An older PDF viewer can unexpectedly stop working when someone tries to open a specially crafted document file.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Denial Of Service
Component
Application
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Stack-based buffer overflow in Catalog::countPageTree during PDF page tree parsing that results in application crash on malformed input.

Why it matters to the business

Document viewing workflows are interrupted by crashes when users open certain PDF files; no data loss or remote code execution occurs but productivity is affected until the reader is replaced.

How an attack unfolds

An attacker crafts a PDF with an excessively deep or malformed page tree that overflows the stack inside countPageTree. The file is opened locally by a user running XPDF 4.04 or earlier, triggering the crash and denial of service.

How to fix it

Migrate away from XPDF 4.04 and earlier to a maintained PDF reader; if XPDF must be retained, apply any subsequent upstream patches that correct the page-tree handling logic.

How to confirm the fix worked

Attempt to open the original proof-of-concept PDF and other deep page-tree test cases; confirm the application no longer crashes and that the function is absent or bounds-checked in the binary.

Typical attack path

  1. Generate a PDF containing a page tree that triggers excessive recursion or oversized structures
  2. Deliver the PDF to the target via email, web download, or file share
  3. User opens the file with the vulnerable XPDF binary
  4. Catalog::countPageTree overflows the stack and the process terminates

How to detect it

Inspect local crash reports, core dumps, and application logs for faults originating from Catalog.cc or the countPageTree symbol when PDF files are processed.

What your security team should do

  • Remove or replace XPDF installations with a supported viewer
  • Block execution of xpdf binaries older than the current release via application allow-listing
  • Add PDF readers to the vulnerability scanning inventory and enforce regular updates

The record

XPDF v4.04 and earlier was discovered to contain a stack overflow via the function Catalog::countPageTree() at Catalog.cc.

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