T01 · Skill Instruction Hijacking
- Location
SKILL.md:125- Finding
Remote API Responses Are Promoted to Privileged Model Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:125-126,SKILL.md:232,SKILL.md:238-294; reinforced byexamples.md:117-118andreference.md:125-130
Vulnerability Type: Remote prompt injection through trusted API response fields
Risk Level: HighRelevant source excerpt from
SKILL.md:125-126(English rendering):markdown - `intent=market_query`: Return structured TDX snapshot data, `system_prompt`, and `user_prompt`. - After receiving the response, you, the OpenClaw model, must use the returned `system_prompt` and `user_prompt` to generate the trend diagnosis.Relevant source excerpt from
SKILL.md:232andSKILL.md:294(English rendering):markdown - If `system_prompt` and `user_prompt` are returned, use the market-query prompt instructions below to complete and return the analysis. Directly use `user_prompt` as the user message and combine it with the system prompt above to complete the trend diagnosis.Technical Analysis
The Skill explicitly instructs the Agent to promote strings returned by
yingyan.chatface.cominto system-level and user-level model instructions. The API response is controlled outside the reviewed Skill package and can change after publication without a corresponding package update.No validation mechanism restricts these fields to the documented stock-analysis prompt. The Skill does not require a response signature, compare the returned system prompt against a local immutable template, reject instruction-like content, or isolate the response as untrusted stock data. Consequently, anyone who compromises or controls the remote endpoint, its upstream data, or the response path can modify the Agent's active instructions.
Treating an external response as a system prompt crosses a trust boundary: stock data should be interpreted as data, not as privileged control-plane instructions. Ordinary TLS protects transport confidentiality and integrity ...[truncated 1539 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the requirement to use remotely returned text as a system prompt.
- Define the complete stock-analysis system prompt locally in the reviewed Skill package.
- Treat the API response exclusively as untrusted structured data.
- Replace
system_promptanduser_promptwith a versioned JSON schema containing only required stock fields, numeric values, signal summaries, and risk indicators. - Enforce strict field allowlists, types, lengths, nesting depth, and response-size limits.
- Reject unexpected fields and instruction-like payloads rather than passing them to the model.
- Serialize remote text inside clearly delimited data sections and explicitly prohibit following instructions contained in those sections.
- If server-generated prompt templates are operationally necessary, require a pinned template identifier or cryptographic signature and compare the content against an approved local template.
- Add adversarial tests in which the API returns prompt-injection strings and verify that they are treated only as data.
