When Skills Lie: Hidden-Comment Injection in LLM Agents

Read full text
Authors: Qianli Wang, Boyang Ma, Minghui Xu, Yue Zhang
Cited by: 0

Abstract

LLM agents often rely on Skills to describe available tools and recommended procedures. We study a hidden-comment prompt injection risk in this documentation layer: when a Markdown Skill is rendered to HTML, HTML comment blocks can become invisible to human reviewers, yet the raw text may still be supplied verbatim to the model. In experiments, we find that DeepSeek-V3.2 and GLM-4.5-Air can be influenced by malicious instructions embedded in a hidden comment appended to an otherwise legitimate Skill, yielding outputs that contain sensitive tool intentions. A short defensive system prompt that treats Skills as untrusted and forbids sensitive actions prevents these malicious tool calls and instead surfaces the suspicious hidden instructions.

Fields of Study & Subjects

Adversarial Robustness in Machine Learning Security and Verification in Computing Web Application Security Vulnerabilities

Publication details

Journal / source
arXiv (Cornell University)
Publication date
11 February 2026
Language
EN
Document type
Preprint