Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-64512 — Exploit for CVE-2025-64512 to get a reverse shell. | Kitploit
Tools/GitHubGitHub/stoic-crawler/cve-2025-64512
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationPayload Development
GitHubstoic-crawler/cve-2025-64512

CVE-2025-64512

Exploit for CVE-2025-64512 to get a reverse shell.

View Repository
11 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-64512 – pdfminer.six Deserialization PoC

Overview

This proof-of-concept demonstrates a vulnerability in pdfminer.six (CVE-2025-64512) that can lead to arbitrary command execution when a malicious PDF is processed. The exploit uses a crafted PDF that references a malicious, gzip-compressed Python pickle. When the vulnerable application parses the PDF, it loads the pickle and executes the embedded payload.

The included PoC is configured to execute a Python reverse shell, but the payload can be replaced with any command.


Requirements

  • Python 3
  • requests

Install the required dependency:

root@kitploit:~
pip install requests

Configuration

Before running the exploit, edit the configuration section of exploit.py:

root@kitploit:~
BASE_URL = ""
UPLOAD_DIR = ""
LHOST = ""
LPORT = 4444

BASE_URL

Download Tool

The URL of the vulnerable upload endpoint.

Example:

root@kitploit:~
BASE_URL = "http://target/upload.php"

The exploit uploads both the malicious PDF and the compressed pickle to this endpoint.


UPLOAD_DIR

The absolute directory on the target where uploaded files are stored.

Example:

root@kitploit:~
UPLOAD_DIR = "/var/www/html/uploads"

This path is embedded inside the generated PDF and must match the location from which the vulnerable application will later read the uploaded pickle.

If the upload directory is unknown, determine it during enumeration. Depending on the application, useful techniques include:

  • Reviewing application source code (if available)
  • Inspecting error messages or stack traces
  • Looking for configuration files
  • Identifying where uploaded files are served from
  • Enumerating predictable upload locations
  • Fuzzing likely upload paths when appropriate

Typical locations include:

root@kitploit:~
/var/www/html/uploads
/var/www/uploads
/srv/www/uploads
/opt/application/uploads

The correct directory depends entirely on the target application.


LHOST

Your listener IP address.

Example:

root@kitploit:~
LHOST = "10.10.14.5"

LPORT

Listening port for the reverse shell.

Example:

root@kitploit:~
LPORT = 4444

Start a listener before running the exploit:

root@kitploit:~
nc -lvnp 4444

Usage

Execute the exploit:

root@kitploit:~
python3 exploit.py

The script will:

  1. Generate a malicious pickle.
  2. Compress it into evil.pickle.gz.
  3. Generate a malicious PDF referencing that pickle.
  4. Upload both files.
  5. Trigger PDF processing.
  6. Execute the payload if the target is vulnerable.

Custom Payloads

Instead of a reverse shell, any operating system command can be executed by modifying the command passed to:

root@kitploit:~
create_pickle_with_cmd(command)

Examples include:

root@kitploit:~
id
whoami
uname -a
cat /etc/passwd

Notes

  • The vulnerable application must process the uploaded PDF using a vulnerable version of pdfminer.six.
  • The uploaded pickle must remain accessible at the path referenced in the crafted PDF.
  • Successful exploitation depends on the target's processing workflow and file storage layout.

Disclaimer

This proof-of-concept is provided solely for educational purposes, security research, and authorized penetration testing. Use it only against systems for which you have explicit permission to perform security testing.