md-to-pdf
Warn
Audited by Gen Agent Trust Hub on Sep 17, 2026
Risk Level: MEDIUMPRIVILEGE_ESCALATIONEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [PRIVILEGE_ESCALATION]: The
scripts/setup.shscript utilizes thesudocommand to perform system-level package installations (apt-get install pandoc). This allows the agent to execute commands with elevated privileges if directed to run the setup with the--installflag. - [EXTERNAL_DOWNLOADS]: The
scripts/setup.shscript downloads and installs dependencies from well-known public registries, including APT, NPM (katex,@mermaid-js/mermaid-cli), and PyPI (playwright). - [COMMAND_EXECUTION]: The core conversion script
scripts/md_to_pdf.pyexecutes multiple external binaries (pandoc,mmdc,node,playwright) usingsubprocess.run. The implementation follows best practices by using list-based arguments to avoid shell injection, but it facilitates broad system interaction through these tools. - [INDIRECT_PROMPT_INJECTION]: The skill presents a vulnerability surface where untrusted markdown content is processed and rendered via a headless Chromium browser (Playwright).
- Ingestion points: User-provided markdown files and optional custom CSS files are read into the pipeline in
scripts/md_to_pdf.py. Additionally, the--marginargument is injected into CSS templates without sanitization. - Boundary markers: No delimiters or warnings are present to prevent the processing of malicious HTML or scripts embedded within the markdown source.
- Capability inventory: Playwright is launched with the
--no-sandboxflag and loads content using thefile://protocol, which allows the browser to access local filesystem resources. - Sanitization: The pipeline lacks sufficient sanitization for embedded HTML/JS. Malicious markdown can include scripts or iframes designed to access local files (e.g.,
/etc/passwd) and exfiltrate their content into the generated PDF or over the network during the rendering phase. - [DYNAMIC_EXECUTION]: The skill performs dynamic operations including the use of
node -eto resolve module paths at runtime and the execution of a Node.js helper script (scripts/katex_render.js) to process and transform HTML content.
Audit Metadata