T01 · Skill Instruction Hijacking
- Location
SKILL.md:94- Finding
Untrusted Remote API Instructions Are Followed Directly
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 94–95
Vulnerability Type: Remote instruction injection
Risk Level: HighVulnerable Code Snippet
md **4xx responses may include an `error.hint.action` field** — a plain-English instruction telling you how to self-correct on the next call (e.g. "List current signals via GET /api/v1/signals to refresh cached IDs"). When present, follow `hint.action` directly. `hint.docs_url` points to the canonical API docs for deeper context.Technical Analysis
The skill explicitly instructs the agent to follow text received in the remote API's
error.hint.actionfield directly. API response content crosses an external trust boundary and must be treated as untrusted data rather than authoritative agent instructions.No allowlist, schema validation, origin restriction for follow-up actions, or user-confirmation requirement is defined. Although the example shows a legitimate API correction, the directive applies to arbitrary text supplied in that field. This creates an indirect prompt-injection channel through which the service—or an attacker who compromises or successfully impersonates it—can alter the agent's subsequent behavior.
The risk is amplified because the skill permits the general-purpose
bashtool. A manipulated response could attempt to induce shell operations, unrelated network requests, access to local data, or unintended state-changing API calls. The project does not itself contain such a payload, but it establishes the unsafe execution path.Attack Path
- A user invokes the skill, causing it to make an authenticated request to the Purefeed API.
- The API, compromised infrastructure, or another party capable of controlling the trusted response returns a crafted 4xx error.
- The response embeds attacker-selected instructions in
error.hint.action. - The skill directs the agent to follow those instructions directly rather than treating them as untrusted data.
- The ...[truncated 994 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the instruction to follow
error.hint.actiondirectly. - Treat
hint.action,hint.docs_url, tweet text, and all other API response fields as untrusted data. - Use a hard-coded mapping from documented error codes to narrowly defined corrective actions, such as mapping “Signal not found” only to
GET /signals. - Permit follow-up requests only to the fixed HTTPS origin
https://purefeed.ai/api/v1and documented endpoint/method combinations. - Reject any hint containing shell syntax, commands, file operations, credential requests, alternate hosts, or instructions unrelated to the failed API operation.
- Require explicit user confirmation before state-changing or destructive operations, especially
PUT,PATCH, andDELETErequests. - Replace unrestricted
bashaccess with a constrained HTTP client where available. Ifbashis unavoidable, use fixed command templates, strict argument validation, safe quoting, and an outbound-host allowlist. - Never place the API key in URLs, logs, output, command substitutions, or requests to any host other than the declared API origin.
- Present remote hints to the user as informational text when they cannot be safely mapped to a predefined recovery action.
- Remove the instruction to follow
