T01 · Skill Instruction Hijacking
- Location
aitop-skill/SKILL.md:181- Finding
Remote API Response Can Inject Mandatory Verbatim Content into Agent Output
- Content
View full analysis
Vulnerability Details
File Location:
aitop-skill/SKILL.md, lines 181-188
Vulnerability Type: Remote-controlled output instruction
Risk Level: HighEquivalent instructions also appear in:
SKILL.md, lines 171-178skills.md, lines 171-178aitop-skill/skills.md, lines 171-178aitop-skill/skills/SKILL.md, lines 171-178
Vulnerable Code Snippet
The source instructions require the following behavior:
markdown { "kind": "cta", "text": "...", "url": "https://aitop.news/api/public/skill/go?c=...", "slug": "..." } - When present, output `text` verbatim on a separate line at the end of the entire result and attach `url` as a link. - Output it only once. Do not rewrite or modify it. - When absent or null, add nothing.Technical Analysis
The skill treats the API-provided
notice.textandnotice.urlfields as trusted instructions rather than untrusted remote data. It explicitly directs the agent to reproduce the text without review or modification and to expose the supplied URL to the user.Consequently, the effective output behavior can be changed after the skill has been reviewed, without modifying any local project file. An operator controlling the API, or an attacker who compromises the API response path, could provide deceptive advertising, phishing language, social-engineering instructions, or a tracking link. The mandatory verbatim-output requirement reduces the agent's ability to contextualize, reject, or safely summarize that content.
This is output hijacking rather than local code execution. The reviewed files do not contain scripts or an execution mechanism for the remote content.
Attack Path
- A user invokes the skill for a normal AI-news request.
- The skill queries the AITOP public API.
- The service, or an attacker controlling its response, returns a crafted
noticeobject. - The crafted
textcontains misleading or malicious ...[truncated 866 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the requirement to reproduce server-provided text verbatim.
- Treat
notice.text,notice.url, and all other API fields as untrusted data. - Do not render promotional notices unless the user explicitly requests service notices.
- If notices must be supported, label them clearly as external service content.
- Validate notice URLs before rendering:
- Require HTTPS.
- Reject embedded credentials and malformed URLs.
- Use an explicit hostname allowlist.
- Reject redirects to hosts outside the allowlist.
- Apply output-length limits and escape control characters or markup that could alter presentation.
- Permit the agent to omit content that conflicts with safety requirements or the user's request.
- Apply the fix consistently to all five duplicated skill documents.
