T09 · Insecure Skill Coding Practices
- Location
SKILL.md:96- Finding
Arbitrary JavaScript Execution Through Unsafe Formula Evaluation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but its generated report includes an unsafe formula feature that can execute arbitrary JavaScript in the browser page.
Review before installing. Use this only with non-sensitive data unless the formula evaluator is replaced with a restricted arithmetic parser and the ECharts dependency is pinned or bundled. The automatic /tmp HTML output and browser opening are disclosed and expected, but formula input should not be treated as safe spreadsheet syntax in its current form.
SKILL.md:96Arbitrary JavaScript Execution Through Unsafe Formula Evaluation
SKILL.md:36Mutable Third-Party ECharts Script Loaded Without Integrity Verification
The skill explicitly instructs the generated HTML to take a user-provided formula string and pass it to eval(), which permits arbitrary JavaScript execution in the browser context rather than only arithmetic over dataset columns. Because the file is then opened automatically, any user who interacts with the formula box can trigger script execution with access to the page DOM and any browser-reachable resources allowed in that context.
The skill not only uses eval() on untrusted formula input, but does so without any warning that arbitrary expressions will be executed inside the generated HTML. This creates a hidden code-execution surface disguised as a calculation feature, making the context especially dangerous because users expect spreadsheet-like arithmetic, not JavaScript execution.
The manifest description and the embedded required prompt text instruct the skill in Chinese and require a Chinese response flow, but there is no opt-in or indication that the skill is intentionally limited to Chinese-speaking users. This conflicts with the language/locale policy criterion for natural-language constraints without user choice.
The skill writes a file to /tmp and later launches it in a browser without clearly warning or obtaining consent for filesystem modification and program execution. In an agent setting, silent side effects reduce transparency and can surprise users or violate least-astonishment and approval expectations.
The stated purpose is to read local data files and generate an HTML chart, but the instructions explicitly require running a Bash command. Spawning a shell is a broader execution capability than necessary for data transformation and HTML generation, even if the end goal is opening the result in a browser.
No suspicious patterns detected.