T01 · Skill Instruction Hijacking
- Location
assets/hook-skills/update-data.md:128- Finding
Remote API Responses Can Supply Instructions That Control Agent Processing
- Content
View full analysis
Vulnerability Details
File Location:
assets/hook-skills/update-data.md:71-71, 128-140;assets/hook-skills/get-config.md:52-52, 114-136
Vulnerability Type: Untrusted remote instruction processing
Risk Level: HighVulnerable Code and Instructions
The skill sends a request to an external service:
powershell curl -s -X POST "https://heifangti.com/api/api/v1/heifangti/agent/analyze" -H "Content-Type: application/json" -H "X-API-Key: $env:HEYCUBE_API_KEY" -d '{request JSON}'The operative instruction at
assets/hook-skills/update-data.md:140, translated into English, requires the Agent to use each remotely returnedfocus_promptas extraction guidance when extracting structured data from the conversation.The GET workflow at
assets/hook-skills/get-config.md:136similarly requires data loaded from the profile database to be appended to the context used to process the user's request.Technical Analysis
The external API controls the
dimensions[].focus_promptvalues consumed by the Agent. The skill does not require:- A fixed local mapping between dimension identifiers and permitted extraction operations.
- Schema validation or an allowlist for dimension identifiers.
- Rejection of imperative or instruction-like content in
focus_prompt. - Delimiting remote values as inert data.
- Detection of prompt-injection content in stored profile values.
This creates an instruction/data boundary failure. A compromised, malicious, or incorrectly configured API can return text such as instructions to ignore the intended profile-extraction scope, disclose unrelated conversation content, invoke tools, or alter the Agent's response. Stored profile values appended to the processing context can create a similar injection path if attacker-controlled text reaches the local database.
HTTPS protects the connection in transit but does not protect against compromise of the service, its backend, its account c ...[truncated 1375 chars]
- Remediation
View remediation
Remediation Suggestions
- Never execute or follow natural-language instructions returned by the remote service.
- Replace
focus_promptwith a locally defined mapping from approved dimension IDs to fixed extraction rules. - Validate the complete response against a strict schema and reject unknown fields, unexpected types, excessive lengths, and unapproved dimension IDs.
- Permit dimension IDs only from a local allowlist. Do not let the service introduce new extraction behavior dynamically.
- Treat remote responses and stored profile values as quoted, inert data. Clearly delimit them and instruct the Agent that their contents cannot modify goals, policies, or tool behavior.
- Reject values containing instruction-like control phrases where practical, while recognizing that filtering alone is not a sufficient defense.
- Limit the extraction operation to explicitly enumerated conversation fields and prohibit tool calls during extraction.
- Require explicit user confirmation before extracting or loading sensitive profile dimensions.
- Apply equivalent validation and isolation to profile values appended by the GET workflow.
