T01 · Skill Instruction Hijacking
- Location
src/analyzer.py:90- Finding
Indirect prompt injection through untrusted Nowcoder post content
- Content
View full analysis
5000: content = content[:5000] + "\n...[内容已截断]" lines.append(f"\n**正文内容**:\n{content}") ``` ### Technical Analysis Nowcoder users control the post bodies returned by the remote service. The application retrieves those bodies and interpolates them directly into the same prompt that instructs the Agent to generate a report. No trust-boundary control distinguishes post data from Agent instructions. In particular, the implementation does not: - Enclose remote content in a format that the model must treat only as quoted data. - Tell the model to ignore instructions contained inside posts. - Detect or neutralize instruction-like content. - Use a separate, tool-restricted summarization context. - Require structured output that prevents remote content from redefining the task. The HTML-to-text conversion in `src/search.py` only removes markup. It does not neutralize natural-language instructions such as “ignore the report requirements,” “reveal prior messages,” or “include this attacker-controlled link.” The Skill workflow compounds this issue by directing the Agent to read the generated `prompt` field and use it to produce the report. Consequently, text c ...[truncated 1494 chars]- Remediation
View remediation
