mermaid-diagrams

Warn

Audited by Gen Agent Trust Hub on Jul 15, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/validate-mermaid.sh contains a code injection vulnerability. It interpolates a shell variable ($FILE) directly into a Node.js node -e command string within single quotes. If an attacker provides a filename containing a single quote and arbitrary JavaScript (e.g., test.mmd', 'utf-8'); require('child_process').execSync('whoami'); //), it could result in arbitrary code execution on the host system.
  • [EXTERNAL_DOWNLOADS]: The skill instructions frequently reference npx @mermaid-js/mermaid-cli and https://cdn.jsdelivr.net/npm/mermaid, which involve downloading and executing code from the NPM registry and JSDelivr CDN. While these are well-known services, they constitute external code dependencies.
  • [DYNAMIC_EXECUTION]: The skill provides snippets of JavaScript (for PDF generation using Puppeteer) and Python (for image processing) in the references/ directory. These are intended for runtime execution to fulfill the skill's diagramming and rendering purposes.
  • [PRIVILEGE_ESCALATION]: The Puppeteer configuration example in references/pdf-rendering-pipeline.md suggests using the --no-sandbox and --disable-setuid-sandbox flags. While common in containerized environments, these flags disable core browser security boundaries and increase the risk when rendering untrusted HTML content.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Jul 15, 2026, 03:07 AM
Security Audit — agent-trust-hub — mermaid-diagrams