mermaid-diagrams

Fail

Audited by Gen Agent Trust Hub on Aug 23, 2026

Risk Level: HIGHCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSREMOTE_CODE_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/validate-mermaid.sh contains a vulnerability that allows arbitrary code execution. The script takes a filename as an argument and interpolates it directly into a JavaScript string executed via node -e. A maliciously crafted filename (e.g., using single quotes and semicolons) can escape the intended string and execute arbitrary JavaScript or shell commands.
  • [EXTERNAL_DOWNLOADS]: The skill relies on external sources for diagram rendering and validation. It fetches the Mermaid library from cdn.jsdelivr.net, executes @mermaid-js/mermaid-cli via npx, and utilizes official Docker images from ghcr.io/mermaid-js/mermaid-cli. These represent standard usage of well-known community tools.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes diagram files (.mmd), which are often provided by external sources or users, introducing an indirect injection risk.
  • Ingestion points: The skill reads .mmd files from the local filesystem to perform syntax validation and rendering.
  • Boundary markers: No boundary markers or instructions were found to prevent the agent from following malicious instructions that might be embedded in diagram content.
  • Capability inventory: The skill has the capability to execute shell commands (via npx and docker), run Node.js code, and perform filesystem writes for generated assets.
  • Sanitization: There is no evidence of sanitization or filtering applied to the diagram content before it is passed to the Mermaid parser or rendering engine.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Aug 23, 2026, 03:33 AM
Security Audit — agent-trust-hub — mermaid-diagrams