CVE-2026-137937 in PDFioinfo

Summary

by MITRE • 11/27/2026

PDFio before 1.6.5 contains an integer underflow in _pdfioCryptoAESDecrypt() in pdfio-aes.c, which strips PKCS#7 padding before any AES block has been decrypted when an AES-encrypted string or binary value holds only its 16-byte IV. Attackers can supply a crafted AES-encrypted PDF that, when opened with pdfioFileOpen(), makes the decrypted length underflow so that _pdfioValueDecrypt() reads and writes out of bounds, crashing the application or corrupting heap memory.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 11/27/2026

The vulnerability identified in PDFio versions prior to 1.6.5 represents a critical integer arithmetic flaw located within the cryptographic decryption routine for AES-encrypted content. Specifically, the function _pdfioCryptoAESDecrypt() exhibits an integer underflow condition when processing certain malformed inputs. This issue arises during the handling of AES-encrypted strings or binary values contained within PDF documents. The core technical failure occurs because the software attempts to strip PKCS#7 padding from the decrypted data before any actual AES block decryption has taken place. In a standard AES-CBC mode operation, which is commonly used in such contexts, the first 16 bytes of an encrypted payload typically constitute the Initialization Vector (IV) rather than ciphertext that requires immediate decryption for padding removal purposes. When the input consists solely of this 16-byte IV without subsequent encrypted blocks, the logic responsible for calculating the length of valid decrypted data fails to account for the fact that no plaintext has been generated yet. Consequently, the subtraction operation intended to remove padding bytes results in a negative value or an extremely large unsigned integer due to underflow, leading to severe memory safety violations.

This arithmetic error directly facilitates out-of-bounds read and write operations within the _pdfioValueDecrypt() function. Because the calculated length is corrupted by the underflow, subsequent buffer access routines attempt to read from or write to memory locations outside the allocated bounds of the decryption buffer. This behavior constitutes a classic heap-based buffer overflow vulnerability, which can be exploited by an attacker crafting a malicious PDF file that triggers this specific code path upon opening via pdfioFileOpen(). The immediate operational impact is typically a denial of service manifested as application crashes due to segmentation faults or memory access violations. However, the severity extends far beyond simple instability; heap corruption allows for potential arbitrary code execution if an attacker can carefully control the data written out-of-bounds and manipulate adjacent heap metadata. Such exploitation techniques are well-documented in cybersecurity literature and align with common attack patterns observed in document processing software vulnerabilities.

From a classification perspective, this vulnerability maps directly to CWE-190 Integer Overflow or Wraparound, as the root cause is the improper handling of numeric values leading to an underflow condition. Furthermore, it falls under CWE-787 Out-of-bounds Write and CWE-788 Out-of-bounds Read, reflecting the memory safety violations resulting from the corrupted length calculation. In terms of adversary tactics, this vulnerability supports techniques associated with ATT&CK ID T1203 Exploitation for Client Execution, where a malicious document is used to trigger code execution or system compromise on the victim's machine. The exploitation vector primarily involves social engineering or drive-by delivery mechanisms that prompt users to open specially crafted PDF files using vulnerable versions of pdfio-based applications.

Mitigation strategies must prioritize immediate software updates and defensive coding practices. Users should upgrade to version 1.6.5 or later, where this integer underflow has been corrected by ensuring proper validation of input lengths before attempting padding removal and decryption operations. Developers integrating similar cryptographic libraries should implement strict bounds checking on all buffer sizes derived from external inputs. It is essential to validate that the length of decrypted data does not exceed allocated memory limits and to ensure that arithmetic operations involving user-controlled or file-derived values are performed using safe integer types that detect overflow conditions. Additionally, enabling compiler-based security features such as stack canaries and Address Sanitizer during development can help identify similar logic errors before deployment. For organizations relying on PDF processing capabilities, implementing input validation at the application boundary to reject malformed cryptographic payloads is a critical defense-in-depth measure against exploitation of this class of vulnerabilities.

Responsible

AISLE

Reservation

11/27/2026

Disclosure

11/27/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!