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.shcontains a vulnerability that allows arbitrary code execution. The script takes a filename as an argument and interpolates it directly into a JavaScript string executed vianode -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-clivianpx, and utilizes official Docker images fromghcr.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
.mmdfiles 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
npxanddocker), 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