T01 · Skill Instruction Hijacking
- Location
prompts/deviation-checker.md:7- Finding
Indirect Prompt Injection Through Untrusted Chapter and Outline Content
- Content
View full analysis
Vulnerability Details
File Location:
prompts/deviation-checker.md:7-14
Vulnerability Type: Indirect prompt injection
Risk Level: MediumVulnerable Code
markdown ### 章节大纲 {{chapter_outline}} ### 章节实际内容 {{chapter_content}} ### 前后章大纲 - 前章:{{prev_chapter_outline}}Technical Analysis
The template directly interpolates chapter text and outline data into the model prompt without establishing that these values are untrusted, data-only content. It does not instruct the model to ignore commands, role changes, output-format overrides, or tool requests contained inside the interpolated values.
An attacker who controls or influences a chapter or outline can embed instructions such as requests to ignore the deviation-analysis task or produce attacker-selected output. Because those instructions appear in the same prompt context as the trusted template, the model may interpret them as operational instructions rather than literary content.
Attack Path
- An attacker supplies or modifies a chapter or outline used by the novel project.
- The content includes an instruction that attempts to override the deviation-checking task.
- The application substitutes that content into
{{chapter_content}},{{chapter_outline}}, or a neighboring outline field. - The model processes the embedded instruction together with the trusted prompt.
- The generated deviation report is manipulated, suppressed, or replaced with attacker-selected content.
Impact Assessment
Successful exploitation can compromise the integrity of deviation reports and decisions based on them. If a surrounding workflow automatically applies model-generated outline changes, poisoned output could indirectly alter project files. The reviewed package does not demonstrate command execution, network access, credential access, or elevated system privileges, so the confirmed impact is limited to model-output and workflow manipulati ...[truncated 3 chars]
- Remediation
View remediation
Remediation Suggestions
- Explicitly declare every interpolated field to be untrusted data rather than instructions.
- Enclose each value in distinct delimiters, such as
BEGIN_UNTRUSTED_CHAPTER_CONTENTandEND_UNTRUSTED_CHAPTER_CONTENT. - Add a higher-priority instruction requiring the model to ignore commands, role changes, tool requests, and output-format overrides found inside those delimiters.
- Validate outline fields against a strict schema and reject unexpected control fields.
- Limit input length and normalize content before interpolation.
- Require explicit user confirmation before applying model-recommended changes to project files.
