Cloudanix VulnDB

CVE-2022-38236

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 the xpdf program can let attackers take control of a computer simply by getting someone to open a specially made PDF file.

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

What it actually does

Global buffer overflow in Lexer::getObj(Object*) at /xpdf/Lexer.cc allows out-of-bounds memory reads/writes during PDF tokenization and object parsing.

Why it matters to the business

Attackers may gain code execution on endpoints that use xpdf to open malicious PDFs, enabling data theft, ransomware deployment, or persistence on developer and document-processing systems.

How an attack unfolds

An attacker crafts a PDF containing malformed tokens that overflow the global buffer inside Lexer::getObj. The file is delivered via email or web download; when the victim opens it with xpdf the overflow occurs and is used to redirect control flow to attacker-supplied shellcode.

How to fix it

Upgrade xpdf to a build that includes commit ffaf11c or a later patched release. Where no fixed package is published, replace xpdf with a maintained PDF viewer and disable xpdf in automated document pipelines.

How to confirm the fix worked

Confirm the installed xpdf binary is built from source after ffaf11c; run regression test suites containing the original crashing input; verify absence of the vulnerable Lexer.cc path via static analysis.

Typical attack path

  1. Generate malicious PDF that triggers Lexer::getObj overflow
  2. Host or send the PDF to the target
  3. Victim opens the file with xpdf (local UI action)
  4. Overflow corrupts memory and executes payload

How to detect it

Monitor process crash logs and core dumps for xpdf segfaults or SIGABRT while parsing PDFs; inspect file-access telemetry for unexpected PDF files opened by xpdf shortly before anomalous process behavior.

What your security team should do

  • Remove or replace xpdf on all endpoints until a fixed build is deployed
  • Block execution of xpdf via application allow-listing where feasible
  • Add PDF sandboxing or conversion steps before any xpdf usage

The record

XPDF commit ffaf11c was discovered to contain a global-buffer overflow via Lexer::getObj(Object*) at /xpdf/Lexer.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