Cpdf Stack Consumption Vulnerability via Crafted PDF Document

Vulnerability

A stack consumption vulnerability has been identified in Cpdf versions through 2.8. This issue arises when the application processes a crafted PDF document, leading to a stack overflow. The vulnerability is related to object cycles within the PDF, which can cause the application to enter a loop, gradually consuming stack space until an overflow occurs.

Impact

Exploitation of this vulnerability causes a stack overflow, leading to a segmentation fault and potentially allowing for arbitrary code execution.

Reproduction

The vulnerability can be reproduced by using Cpdf to process a malformed PDF file that contains object cycles. This can be done by running the Cpdf command-line tool with the crafted PDF file as input. The application will attempt to read the PDF, encounter errors due to the malformed structure, and ultimately crash after consuming excessive stack space.

Remediation

Users are advised to update to Cpdf version 2.9 or later, where this vulnerability has been addressed.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
7.7
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
0.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.