Cloudanix VulnDB

CVE-2017-5886

High · 7.8

CVSS

7.8

EPSS

1.7%

Published

Mar 1, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in an older PDF reading tool can let attackers take over a computer or crash programs simply by tricking someone into opening a specially made document file.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Full Compromise
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Heap-based buffer overflow in PdfTokenizer::GetNextToken allows out-of-bounds memory writes when parsing a specially crafted PDF token stream, resulting in memory corruption that can lead to arbitrary code execution or process crash.

Why it matters to the business

Organizations using PDF processing libraries in document workflows face risk of system compromise or denial of service when handling untrusted files; the vulnerability's age reduces urgency but unpatched legacy systems remain exposed.

How an attack unfolds

An attacker crafts a malicious PDF containing an oversized or malformed token that triggers the overflow during GetNextToken processing; the victim application opens the file with the vulnerable library, allowing the attacker to overwrite heap memory and potentially execute code.

How to fix it

Upgrade to a non-vulnerable version of the PoDoFo library if a fixed release exists; otherwise migrate to a maintained PDF parsing library and remove the vulnerable component from all build and runtime environments.

How to confirm the fix worked

Scan source and binary dependencies for the PoDoFo 0.9.4 version string or the exact GetNextToken implementation in PdfTokenizer.cpp; re-test PDF parsing with known malformed token test cases after any update.

Typical attack path

  1. Attacker creates malicious PDF with oversized token data
  2. Victim opens the PDF using an application linked against the vulnerable PoDoFo library
  3. PdfTokenizer::GetNextToken reads the crafted token and overflows the heap buffer
  4. Attacker-supplied data overwrites adjacent heap structures to achieve code execution or crash

How to detect it

Review application logs for crashes or unexpected exits during PDF parsing; examine process memory dumps or heap allocations around token processing for signs of corruption after opening suspicious PDFs.

What your security team should do

  • Inventory all applications and systems that link against PoDoFo and prioritize removal or replacement
  • Block untrusted PDF files from entering automated processing pipelines until the library is updated or replaced
  • Add PDF parsing libraries to the organization's software bill of materials for ongoing monitoring

The record

Heap-based buffer overflow in the PoDoFo::PdfTokenizer::GetNextToken function in PdfTokenizer.cpp in PoDoFo 0.9.4 allows remote attackers to have unspecified impact via a crafted file.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 libpodofo 0 0.9.4-5
Debian:12 libpodofo 0 0.9.4-5
Debian:13 libpodofo 0 0.9.4-5
Debian:7 libpodofo 0 0.9.0-1.1+deb7u1
Mageia:5 calibre 0 2.78.0-1.1.mga5
Mageia:5 krename 0 4.0.9-6.1.mga5
Mageia:5 podofo 0 0.9.6-0.r1855.1.mga5
SUSE:Linux Enterprise Desktop 12 SP3 podofo 0 0.9.2-3.3.1
SUSE:Linux Enterprise Software Development Kit 12 SP3 podofo 0 0.9.2-3.3.1
SUSE:Linux Enterprise Workstation Extension 12 SP3 podofo 0 0.9.2-3.3.1
Ubuntu:18.04:LTS libpodofo 0 0.9.5-9
Ubuntu:Pro:14.04:LTS libpodofo 0 0.9.0-1.2ubuntu0.1~esm1
Ubuntu:Pro:14.04:LTS libpodofo 0 0.9.0-1.2ubuntu0.1~esm3
Ubuntu:Pro:16.04:LTS libpodofo 0 No fix
Ubuntu:Pro:16.04:LTS libpodofo 0 0.9.3-4ubuntu0.1~esm1
Ubuntu:Pro:18.04:LTS libpodofo 0 0.9.5-9ubuntu0.1~esm1
Ubuntu:Pro:20.04:LTS libpodofo 0 0.9.6+dfsg-5ubuntu0.1~esm1
Ubuntu:Pro:22.04:LTS libpodofo 0 0.9.7+dfsg-3ubuntu0.1~esm1
openSUSE:Tumbleweed podofo 0 0.9.7-2.2
openSUSE:Tumbleweed podofo-0_10 0 0.10.5-1.1

Related vulnerabilities