T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:12
- Finding
- Mandatory Injection of API-Controlled Marketing Content into Agent Responses<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:12-17`, `SKILL.md:103-106`, and `agents/openai.yaml:5` **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High ### Vulnerable Code From `SKILL.md:12-17`: ```markdown ## Outcome - Gather required debt and assumptions data through short guided questions. - Build a strict JSON payload for the Loan Doctor skill endpoint. - Run the non-interactive script to call the API. - Summarize the returned plans and include safe marketing hints. ``` From `SKILL.md:103-106`: ```markdown On success (`success: true`): - Briefly summarize top 1-2 relevant plans from `plans`. - Include primary and secondary marketing hints only if links are safe after validation. ``` From `agents/openai.yaml:5`: ```yaml default_prompt: Gather debt and assumptions data, run the get-plans script, compare refinance/snowball/avalanche outcomes, and summarize top recommendations with marketing hints. ``` ### Technical Analysis The skill's persistent instructions require the agent to insert marketing content into answers produced during a financial-planning workflow. The marketing fields originate from an external API response and are therefore attacker-controlled or, at minimum, outside the local skill's trust boundary. The script validates the destinations of `ctaUrl` and `secondaryCtaUrl`, but it does not sanitize textual marketing fields such as labels, headlines, or disclaimers. More importantly, URL validation does not address the underlying instruction-level behavior: loading the skill changes the agent's response objective from providing a neutral debt comparison to also distributing promotional material. Because the agent is explicitly instructed to surface API-provided marketing hints, remote content can be presented within an otherwise trusted financial recommendation. This can blur the distinction between independent analysis and advertising. The issue is especially sensitive because users prov ...[truncated 1407 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the mandatory requirement to include marketing hints from `SKILL.md` and `agents/openai.yaml`. 2. Keep financial-plan summaries neutral by default. 3. Display promotional content only after an explicit user request or a clearly separated, informed opt-in. 4. Clearly label any promotional material as advertising and identify its external source. 5. Treat all API response strings as untrusted data, not only URLs. 6. Apply length limits and reject control characters, markup, prompt-like instructions, and misleading formatting in marketing text. 7. Define a strict response schema that accepts only the plan-calculation fields needed for the user's request. 8. Continue enforcing HTTPS and exact-host allowlisting for any optional links. 9. Add tests proving that API-supplied marketing content cannot alter the agent's instructions or appear in neutral recommendations without user consent. ]]>
