Cloudanix VulnDB

CVE-2022-38227

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 a common PDF reading tool can let an attacker take over a computer if someone opens a specially made document.

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

Stack-based buffer overflow triggered during memcpy in XPDF's PDF parsing, allowing adjacent stack memory corruption when processing a maliciously crafted file.

Why it matters to the business

Local compromise of systems that render PDFs with the affected XPDF binary can lead to arbitrary code execution under the user's privileges, disrupting document workflows and requiring urgent patching across developer and research environments that depend on this library.

How an attack unfolds

An attacker creates a PDF that triggers the overflow on parse, then delivers it via email or web. When a victim opens the file locally with XPDF, the memcpy overwrites the stack, enabling control-flow hijacking and shellcode execution.

How to fix it

Upgrade to a patched XPDF release once available; in the interim, avoid opening untrusted PDFs with XPDF and consider alternative PDF viewers or sandboxed execution environments.

How to confirm the fix worked

Confirm the installed XPDF binary is newer than commit ffaf11c and test against known proof-of-concept files that previously triggered the memcpy crash.

Typical attack path

  1. Craft malicious PDF exploiting the stack overflow in XPDF commit ffaf11c
  2. Host or send the file to a target user
  3. User opens the document with the vulnerable XPDF binary
  4. Overflow occurs during __asan_memcpy, corrupting stack state
  5. Attacker gains local code execution

How to detect it

Review process creation logs and file-access telemetry for invocations of the XPDF binary against recently received or unusual PDF files; look for segmentation faults or abnormal crashes in XPDF shortly after document open.

What your security team should do

  • Immediately restrict XPDF usage on untrusted documents until a fixed build is deployed
  • Monitor for new upstream releases and update affected systems within 30 days
  • Add XPDF to the list of high-risk local parsers requiring application whitelisting or containerization

The record

XPDF commit ffaf11c was discovered to contain a stack overflow via __asan_memcpy at asan_interceptors_memintrinsics.cpp.

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