pypdftk OS Command Injection Flaw Lets Attackers Run Shell Commands
A critical vulnerability in the pypdftk library allows attackers to execute operating system commands by injecting shell metacharacters into file path arguments.
Key points
- The flaw affects pypdftk versions up to and including 0.5.
- The vulnerability is rated critical with a CVSS score of 9.3.
- Attackers can execute OS commands as the Python process running the library.
An attacker who can control file path inputs to the pypdftk library gains the ability to execute operating system commands. The attacker needs to supply specific strings containing shell metacharacters to functions such as fill_form or dump_data_fields. This input is interpreted as part of a shell command rather than just a file name.
In plain English
The pypdftk library is a Python tool that interacts with PDF utilities. It allows developers to fill out forms or extract data from PDF documents. The library works by passing instructions to the underlying system command line. When a user provides a path to a PDF file, the library uses that path to build the command it sends to the operating system.
The background
The National Vulnerabilities Database lists CVE-2026-110636 for this issue. The record assigns a CVSS score of 9.3, classifying the severity as critical. The weakness is identified as CWE-78, which refers to improper neutralization of special elements used in an OS command. The affected software is the pypdftk package developed by revolunet.
What changes now
Developers using pypdftk versions through 0.5 are exposed to this risk. The vulnerability exists in the fill_form, dump_data_fields, and pdftk_cmd_util functions. These functions build shell commands from paths supplied by the caller. If an attacker can control the pdf_path or out_file arguments, they can inject characters that change how the command is executed.
What made it possible
This class of vulnerability arises when software passes user-supplied data directly into a system shell without proper sanitization. The weakness depends on the application treating input as trusted code rather than inert data. In an intrusion, this technique serves the execution stage, allowing an adversary to run arbitrary commands on the host. Teams usually check for libraries that invoke system shells with high privileges.
What to do and how to stay safe: pypdftk
- Audit your codebase to identify any usage of the pypdftk library, specifically versions up to 0.5.
- Review how file paths are passed to fill_form, dump_data_fields, and pdftk_cmd_util functions in your applications.
- Implement input validation to ensure that file path arguments do not contain shell metacharacters or unexpected symbols.
- Monitor logs for unusual command execution patterns originating from Python processes that handle PDF files.
Step-by-step guide: Automatic Updates Mistakes That Leave Systems Exposed
General security guidance from the RedTeam Monitor newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
What is the CVE ID for this vulnerability?
The CVE ID for this vulnerability is CVE-2026-110636.
Which functions in pypdftk are affected by this flaw?
The fill_form, dump_data_fields, and pdftk_cmd_util functions are affected by this OS command injection vulnerability.
What is the CVSS score for this issue?
The National Vulnerabilities Database assigns a CVSS score of 9.3 to this critical vulnerability.




