Back to skill

Security audit

dialog-tree

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent local dialog-tree purpose, but its setup and validation instructions create avoidable code-execution and browser-script risks.

Review before installing. The skill appears intended to be local and useful, but avoid running the eval-based smoke test on untrusted or externally modified tree data, prefer a pinned or already-installed local static server bound to localhost, and treat generated node HTML as active browser content unless the viewer is changed to sanitize or render text safely.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:80
Finding

Arbitrary Node.js Code Execution Through Unsafe Data-File Evaluation

Content
View full analysis
-tree-data.js','utf8') + ';globalThis.__D={META,NODES}'); const {META,NODES} = globalThis.__D; const ids = new Set(NODES.map(n=>n.id)); if (ids.size !== NODES.length) throw new Error('duplicate ids'); for (const n of NODES) if (n.parent && !ids.has(n.parent)) throw new Error('orphan '+n.id); if (!META.treeId || !META.builtUpTo) throw new Error('META incomplete'); console.log('OK', NODES.length, 'nodes | builtUpTo:', META.builtUpTo)" ``` ### Technical Analysis The prescribed smoke test reads the entire generated tree data file and passes its contents directly to JavaScript `eval()` in a Node.js process. The data file is maintained by the agent and contains conversation-derived content. Consequently, it cannot safely be treated as trusted executable code. Node.js `eval()` executes with the permissions and module context of the validation process. A malicious statement introduced into the data file can access Node.js APIs, including filesystem, environment, process, child-process, and network functionality. The documented restrictions on backticks and `${` sequences do not constitute a security boundary and do not prevent arbitrary JavaScript statements from being placed outside the expected data values. ### Attack Path 1. An attacker supplies crafted conversation or repository content intended to be incorporated into the dialog-tree data file. 2. The generated `-tree-data.js` file contains attacker-controlled JavaScript outside, or escaping from, the expected data structure. 3. The agent follows the mandatory post-edit verification procedure. 4. Node.js reads the complete file and executes it through `eval()`. 5. The injected code runs with the operating-system permissions of the user running the agent. ### I ...[truncated 417 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/dialog-tree.html:174
Finding

Stored DOM Cross-Site Scripting Through Unsanitized Tree Content

Content
View full analysis
${n.who === "user" ? S.userName : S.assistantName} · ${resolved ? S.resolved : S.open}${deleted ? " · " + S.deleted : ""}

${n.label}

${resolved ? S.unresolve : S.resolve} ${deleted ? S.restore : S.del}
${n.html}
`; ``` ### Technical Analysis The viewer interpolates `n.label`, `n.html`, and configurable localization strings directly into an `innerHTML` assignment. These values originate in the editable tree data file and may contain conversation-derived content. The application deliberately supports HTML in `n.html`, but it does not apply an HTML sanitizer or a restrictive allowlist. Browser-active constructs—such as event-handler attributes, malicious SVG content, iframes, and dangerous URL schemes—can therefore be interpreted as markup rather than displayed as text. The template's instruction to escape HTML special characters in code samples is advisory only and does not enforce safety at the rendering boundary. Although ordinary `
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:31
Finding

Automatic Execution of an Unpinned npm Dependency

Content
View full analysis
-tree", "runtimeExecutable": "npx", "runtimeArgs": ["-y", "http-server", "", "-p", "", "-c-1"], "port": } ] } ``` The associated instruction states: ```text Any static file server works — `npx http-server` is just a default. If Node/npx is not installed, substitute whatever the machine has (e.g. `python -m http.server -d ` with `"runtimeExecutable": "python"`); check availability before writing the config. ``` ### Technical Analysis The recommended launch configuration invokes `npx -y http-server` without an exact package version or verified integrity value. If the package is absent locally, `npx` can retrieve it from the configured npm registry and execute it. The `-y` option suppresses the interactive installation confirmation. The effective executable may therefore change after the Skill has been audited. A compromised package release, registry account, registry configuration, or dependency chain could introduce arbitrary code during installation or execution. This is a supply-chain risk rather than evidence that the current `http-server` package is malicious. The configured directory can also be broader than necessary. If the repository root is used, the static server may make unrelated project files accessible to other processes or hosts able to reach the listening socket, depending on server binding and host firewall configuration. ### Attack Path 1. The user or agent starts the generated preview configuration. 2. `npx` resolves the unversioned `http-server` package through the configured npm registry. 3. A newly published, compromised, or registry-substituted package is downloaded. 4. npm lifecycle behavior or the ...[truncated 613 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill goes beyond maintaining a data/view file pair and instructs the agent to create launch configuration and run a local static server. That expands the skill's operational scope into environment modification and process execution, which increases attack surface and could lead to unsafe changes or unintended service exposure if followed automatically.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The skill recommends launching a local server via npx http-server without pinning a version or otherwise constraining what package is executed. npx may fetch and run the latest package from the registry, creating a supply-chain risk if the package is compromised, typosquatted, or behavior changes unexpectedly.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The skill recommends launching a local server via npx http-server without pinning a version or otherwise constraining what package is executed. npx may fetch and run the latest package from the registry, creating a supply-chain risk if the package is compromised, typosquatted, or behavior changes unexpectedly.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs running node -e with eval(require('fs').readFileSync(...)) on a project file. Evaluating file contents as code is dangerous because a tampered data file can execute arbitrary JavaScript on the local machine during 'verification', turning a smoke test into code execution.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

n.html is inserted directly into innerHTML, so any HTML supplied in dialog nodes can include active content such as event handlers, malicious links, or script gadgets that execute in the page context. In this skill, dialog content is likely derived from user/assistant conversation text, making it especially risky because untrusted conversational content may be rendered later as privileged HTML.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The viewer dynamically loads and executes an adjacent *-data.js file as a <script>, which means the data file is not passive data at all but trusted code with full DOM access. If an attacker can modify that file in the repo, on disk, or on the hosting path, they can run arbitrary JavaScript in the page, exfiltrate local data from the viewer context, tamper with the UI, or pivot through the browser origin.

Content

No source excerpt is available for this finding.