> cat /dev/github | grep security-tools
discovered 30 Mar 2026

malicious-pdf

Python ★ 3637 via github-topic
→ View on GitHub

AI Summary: Malicious PDF is a tool designed to generate various malicious PDF files featuring phone-home capabilities for use in penetration testing and red-teaming. It supports integration with platforms like Burp Collaborator and Interact.sh, providing a diverse set of attack vectors through ten different crafted PDF examples meant for testing web applications, security products, and PDF readers. Key features include the ability to create PDFs exploiting vulnerabilities like external file access, JavaScript injection, and form data exfiltration.


README

malicious-pdf.png

made-with-python OpenSSF Best Practices

Malicious PDF Generator ☠️

Generate ten different malicious PDF files with phone-home functionality. Can be used with Burp Collaborator or Interact.sh

Used for penetration testing and/or red-teaming etc. I created this tool because I needed a tool to generate a bunch of PDF files with various links. Educational and professional purposes only.

Usage

pip install -r requirements.txt
python3 malicious-pdf.py burp-collaborator-url

Output will be written as: test1.pdf, test2.pdf, test3.pdf etc in the current directory.

Complete Test Matrix

Test FileFunctionCVE/ReferenceAttack VectorMethodImpact
test1.pdfcreate_malpdf()CVE-2018-4993External file access/GoToE action with UNC pathNetwork callback via file system
test1bis.pdfcreate_malpdf()CVE-2018-4993External file access/GoToE action with HTTPS URLNetwork callback via HTTPS
test2.pdfcreate_malpdf2()XFA form submissionForm data exfiltrationXDP form with submit eventAutomatic form submission
test3.pdfcreate_malpdf3()JavaScript injectionCode execution/OpenAction with app.openDoc()External document loading
test4.pdfcreate_malpdf4()CVE-2019-7089XSLT injectionXFA with external XSLT stylesheetUNC path callback
test5.pdfcreate_malpdf5()PDF101 researchURI action/URI action typeDNS prefetching/HTTP request
test6.pdfcreate_malpdf6()PDF101 researchLaunch action/Launch with external URLExternal resource execution
test7.pdfcreate_malpdf7()PDF101 researchRemote PDF/GoToR actionRemote PDF loading
test8.pdfcreate_malpdf8()PDF101 researchForm submission/SubmitForm with HTML flagsForm data submission
test9.pdfcreate_malpdf9()PDF101 researchData import/ImportData actionExternal data import
test10.pdfcreate_malpdf10()CVE-2017-10951JavaScript executionJavaScript to launch CalculatorApplication execution
test11.pdfcreate_malpdf11()EICAR testAV detectionEmbedded EICAR stringAnti-virus testing

Purpose

  • Test web pages/services accepting PDF files
  • Test security products
  • Test PDF readers
  • Test PDF converters

Credits

In Media

Todo

  • Adobe Acrobat PDF Reader RCE when processing TTF fonts, CVE-2023-26369
  • Adobe Acrobat and Reader Use-After-Free Vulnerability, CVE-2021-28550

Star History

Star History Chart