analyzing-malicious-pdf-with-peepdf
Warn
Audited by Gen Agent Trust Hub on Jul 16, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/agent.pyusessubprocess.runto call external PDF analysis tools such aspeepdf,pdfid, andpdf-parser.py. The input file path for these commands is provided by the user via command-line arguments. - [EXTERNAL_DOWNLOADS]: The documentation in
SKILL.mdandreferences/api-reference.mdprovides instructions for the user to install dependencies, including thepeepdf-3package via pip and thepeepdfrepository from GitHub. - [PROMPT_INJECTION]: The skill processes untrusted content from PDF files which may contain malicious instructions designed to exploit the analysis tools or influence the agent's interpretation of results.
- Ingestion points: PDF content is read and analyzed in
scripts/agent.pyto extract objects and metadata. - Boundary markers: There are no explicit markers or instructions to the agent to ignore potentially malicious embedded text.
- Capability inventory: The skill has the ability to execute shell commands via subprocess and write files to the local system.
- Sanitization: Content extraction is performed via regular expressions, but the results are not sanitized or escaped before being included in the final analysis report.
Audit Metadata