T01 · Skill Instruction Hijacking
- Location
script_generator.py:92- Finding
Indirect Prompt Injection Through Untrusted Skill Documentation
- Content
View full analysis
str: track = skill.get("_track", "mover") track_label = "NEW THIS WEEK" if track == "rocket" else "TOP MOVER" cold = skill.get("_cold_start", False) template = USER_TEMPLATE_COLD if cold else USER_TEMPLATE_VELOCITY return template.format( display_name=skill.get("display_name", "Unknown"), author=skill.get("author", "Unknown"), summary=skill.get("summary") or "No description.", content=(skill.get("content") or "No documentation available.")[:3000], track=track_label, ) ``` The resulting prompt is submitted directly to Anthropic: ```python message = client.messages.create( model=model, max_tokens=150, system=SYSTEM_PROMPT, messages=[{"role": "user", "content": _build_prompt(skill)}], ) ``` ### Technical Analysis The `content` and `summary` fields originate from externally controlled ClawHub metadata or GitHub repository documentation. They are interpolated directly into an LLM user message without a strong trust-boundary marker or an instruction requiring the model to treat the documentation exclusively as quoted data. An attacker can publish documentation containing instructions such as asking the model to ignore the requ ...[truncated 1721 chars]- Remediation
View remediation
