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
Tools/GitHubGitHub/unicordev/exploit-cve-2022-25765
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingCommand and ControlLearning & Education
GitHubunicordev/exploit-cve-2022-25765

exploit-CVE-2022-25765

Exploit for CVE-2022–25765 (pdfkit) - Command Injection

View Repository
31411 months agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
Website

Exploit for CVE-2022-25765 (pdfkit) - Command Injection

GitHub CVE Cover

Like this repo? Give us a ⭐!

For educational and authorized security research purposes only.

Exploit Author

@UNICORDev by (@NicPWNs and @Dev-Yeoj)

Vulnerability Description

The package pdfkit from 0.0.0 are vulnerable to Command Injection where the URL is not properly sanitized.

Exploit Description

A ruby gem pdfkit is commonly used for converting websites or HTML to PDF documents. Vulnerable versions (< 0.8.7.2) of this software can be passed a specially crafted URL containing a command that will be executed. This exploit generates executable URLs or sends them to a vulnerable website running pdfkit.

Usage

root@kitploit:~
  python3 exploit-CVE-2022–25765.py -c <command>
  python3 exploit-CVE-2022–25765.py -s <local-IP> <local-port>
  python3 exploit-CVE-2022–25765.py -c <command> [-w <http://target.com/index.html> -p <parameter>]
  python3 exploit-CVE-2022–25765.py -s <local-IP> <local-port> [-w <http://target.com/index.html> -p <parameter>]
  python3 exploit-CVE-2022–25765.py -h

Options

root@kitploit:~
  -c    Custom command mode. Provide command to generate custom payload with.
  -s    Reverse shell mode. Provide local IP and port to generate reverse shell payload with.
  -w    URL of website running vulnerable pdfkit. (Optional)
  -p    POST parameter on website running vulnerable pdfkit. (Optional)
  -h    Show this help menu.

Download

Download exploit-CVE-2022-25765.py from GitHub

Download exploit-CVE-2022-25765.py from ExploitDB

Searchsploit (ExploitDB)

root@kitploit:~
searchsploit -u
searchsploit -m 51293

Exploit Requirements

  • python3
  • python3:requests
  • python3:urllib3

Demo

Custom Command Mode

cropped command

Reverse Shell Sent to Target Website Mode

exploit-CVE-2022–25765

Tested On

pdfkit Version 0.8.6

Applies To

pdfkit Versions < 0.8.7.2

Test Environment

root@kitploit:~
gem install pdfkit -v 0.8.6

Credits

  • https://nvd.nist.gov/vuln/detail/CVE-2022-25765
  • https://security.snyk.io/vuln/SNYK-RUBY-PDFKIT-2869795
  • https://app.hackthebox.com/machines/Precious
  • https://www.exploit-db.com/exploits/51293
Download Tool