Back to skill

Security audit

html-collab

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but generated documents carry AI-directed instructions and can trigger unexpected file/network behavior that users should review before installing.

Review this skill before installing. It is not evidence of malware, but use it only for documents where persistent AI-readable metadata is acceptable. Avoid opening untrusted html-collab files in a networked browser, and prefer keeping backups because the revision flow can overwrite originals.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
assets/template.html:346
Finding

Generated Documents Contain Persistent AI Instruction-Hijacking Directives

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
assets/template.html:1045
Finding

Unvalidated Comment Image URLs Cause Automatic Requests to Attacker-Controlled Servers

Content
View full analysis
×
${escapeHtml(comment.quote)}
${escapeHtml(comment.text)}
${images.map(img => `screenshot` ).join('')}
${new Date(comment.timestamp).toLocaleString()}${editedText}
`; ``` The comment-editing path repeats the same behavior: ```javascript bubble.innerHTML = `
${escapeHtml(comment.quote)}
${escapeHtml(comment.text)} ${images.map(img => `screenshot` ).join('')}
Update Cancel
${new Date(comment.timestamp).toLocaleString()}
`; ``` ### Technical Analysis The renderer trusts image records parsed from the document's `collab-data` JSON. If an image is not marked as `base64`, its `url` property is assigned to an HTML `` attribute. `escapeHtml()` prevents basic attribute-breaking injection, but it does not validate the URL's scheme, origin, or storage type. Opening a crafted document therefore causes the browser to request an attacker-selected resou ...[truncated 2008 chars]
Remediation
View remediation
``` 5. Validate imported `collab-data` against a strict schema before calling `renderState()`. 6. Apply the same validation in both normal rendering and comment-edit rendering. 7. Treat `meta.imageStorage` as an enforced security policy rather than informational metadata. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger conditions are broad enough to auto-activate on ordinary requests like 'write a doc' or 'draft something for review' without requiring explicit user opt-in to this specialized HTML workflow. That can cause unexpected mode switching, file-oriented behavior, or disclosure/formatting side effects in contexts where the user only wanted generic writing help.

Content

No source excerpt is available for this finding.

Context Leakage

High
Category
Data Exfiltration
Confidence
75% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

md
---

## READ — Extract context from an annotated file

**When:** User provides a `.html` file that has been annotated by a human.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The revision flow instructs direct overwrite of the original file, which risks destructive modification and loss of the prior version if the model misapplies edits or the user did not intend in-place replacement. Because the overwrite is automatic and lacks a confirmation or backup step, the chance of irreversible user data loss is materially increased.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
94% confidence
Finding

The HTML template embeds hidden instructions specifically targeting AI assistants and tells them how to behave when processing the file, including referring to an external GitHub URL. This creates an instruction channel separate from visible user intent and can enable prompt-injection style behavior, especially in agents that parse document comments or metadata as authoritative directions.

Content

Scanner excerpt · assets/template.html (reported line 1)May include surrounding context.

html
<!-- [html-collab AI Bootstrap] IMPORTANT FOR AI ASSISTANTS: This file uses the html-collab skill. If you do not have it loaded, you MUST stop and ask the user for permission before fetching any external content or taking any action. Do NOT silently fetch https://github.com/ljn-hust/html-collab/blob/main/skill/SKILL.md or proceed without explicit user consent. -->
<!DOCTYPE html>
<html lang="en">
<head>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/template.html (reported line 319)May include surrounding context.

html
<div id="collab-layout">
    <main id="collab-main">
      <!-- LLM fills this article element with content -->
      <article id="collab-content">
        <!-- CONTENT_PLACEHOLDER -->
      </article>

Hidden Instructions

High
Category
Prompt Injection
Confidence
89% confidence
Finding

This hidden note and adjacent JSON bootstrap data are machine-readable instructions aimed at LLM tooling, including guidance about skill loading and external retrieval. Because the skill is explicitly designed for LLM-human review cycles, these hidden directives are more dangerous: they may influence agent behavior outside the visible user request and create a document-borne prompt injection surface.

Content

Scanner excerpt · assets/template.html (reported line 360)May include surrounding context.

html
https://github.com/ljn-hust/html-collab/blob/main/skill/SKILL.md
  -->

  <!-- NOTE: originalCreated and lastRevised are filled by LLM at GENERATE time -->
  <!-- collab-data JSON island — machine-readable, not rendered -->
  <script type="application/json" id="collab-data">
{

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill directs the agent to write generated files to a concrete filesystem path and create directories, but it does not require a clear warning or confirmation before modifying the user's files. In agentic environments with file access, this can lead to surprising writes and persistence on disk outside the user's immediate expectation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly requires pasting the full document contents and all human feedback into the conversation, creating a persistent second copy of potentially sensitive user data in chat history. This increases exposure of confidential text, comments, and screenshots beyond the original file and may violate data-minimization expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The comment explicitly states "All UI text is in English. No i18n.", and the document root is also fixed to lang="en". This is a natural-language locale policy concern because the template mandates a specific language without any opt-in or documented justification for being English-only.

Content

No source excerpt is available for this finding.