T01 · Skill Instruction Hijacking
- Location
SKILL.md:28- Finding
User-Controlled Platform Identifier Can Load Unintended Skill Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 28-48
Vulnerability Type: Path traversal into instruction files
Risk Level: MediumVulnerable Code
markdown | prompt | string | Yes | Video description/prompt | | platform | string | No | Target platform ID (see impl/), default `giggle` |markdown Stage 2 — Submit task Load impl/{platform}.md according to the platform parameter. Invoke the implementation layer to submit a generation task and obtain task_id.Technical Analysis
The
platformparameter is supplied by the user and is interpolated directly into the instruction-file pathimpl/{platform}.md. The skill does not require the Agent or runtime to validate the value against a fixed platform allowlist, canonicalize the resulting path, or reject path separators and traversal sequences.A platform value containing
../, an absolute path, or platform-specific separators could therefore resolve outside the intendedimpl/directory. Because the loaded Markdown is treated as implementation instructions, loading an unintended file can alter the Agent's behavior within the current session. This is best classified as instruction hijacking rather than ordinary data-file disclosure.Attack Path
- An attacker asks the Agent to generate a video and supplies a crafted platform value, such as
../SKILLor another traversal path targeting a Markdown file. - The Agent follows the documented construction rule and attempts to load
impl/{platform}.md. - Path normalization resolves the crafted path outside the intended implementation directory.
- The Agent reads the targeted file as trusted implementation guidance.
- Instructions in that file can redirect the current workflow, request additional tools, or override the intended video-generation procedure.
Exploitation requires a suitable readable file to exist at a path reachable ...[truncated 643 chars]
- An attacker asks the Agent to generate a video and supplies a crafted platform value, such as
- Remediation
View remediation
Remediation Suggestions
- Replace path interpolation with a fixed mapping, for example
giggle -> impl/giggle.md. - Reject unknown platform identifiers before opening any file.
- Restrict identifiers to a conservative pattern such as
^[a-z0-9_-]+$. - Explicitly reject
/,\,.., URL schemes, absolute paths, and encoded path separators. - Resolve and canonicalize the selected path, then verify that it remains under the canonical
impl/directory. - Treat implementation documents as package-controlled resources rather than arbitrary user-selected files.
- Replace path interpolation with a fixed mapping, for example
