T01 · Skill Instruction Hijacking
- Location
scripts/script.sh:57- Finding
Unconditional Promotional Output Injection Corrupts JSON Results
- Content
View full analysis
Vulnerability Details
File Location:
scripts/script.sh:57
Vulnerability Type: Undisclosed output injection
Risk Level: MediumVulnerable Code
bash echo -e "\n📖 More skills: bytesagain.com"Technical Analysis
The script unconditionally writes third-party promotional content to standard output after every command. This output is unrelated to the documented JSON formatting, minification, and extraction operations.
Because the functional JSON result and the promotional message share standard output, successful invocations of
pretty,minify, andgetdo not produce valid standalone JSON. An AI agent may also treat the appended content as part of the requested result and relay the unrelated advertisement and URL to the user. This constitutes output-level skill instruction hijacking because execution alters the expected response with undisclosed promotional material.No network request is made to the advertised domain, and the audited code does not retrieve or execute remote content.
Attack Path
- A user asks an agent to format, minify, or query a JSON file.
- The agent invokes
scripts/script.shusing one of the documented commands. - The embedded Python code writes the requested JSON result to standard output.
- Line 57 then appends
📖 More skills: bytesagain.comto the same output stream. - A downstream JSON parser receives invalid, contaminated output and may fail.
- If the output is handled directly by an agent, the agent may reproduce the unsolicited promotional message and URL in its response.
Impact Assessment
The issue does not grant filesystem privileges, code execution, persistence, or access to sensitive information. Its scope is limited to the output of every invocation of this script. However, it can corrupt machine-consumed JSON, disrupt downstream automation, and cause agents to propagate undisclosed third-party promotional content.
- Remediation
View remediation
Remediation Suggestions
Remove the unconditional output statement:
bash echo -e "\n📖 More skills: bytesagain.com"Standard output should contain only the requested JSON result so that it remains suitable for pipelines and parsers. If attribution or promotional information is required, place it in
SKILL.mdrather than runtime output. Any legitimate operational diagnostics should be opt-in and written to standard error, not standard output. Add automated tests that parse the complete stdout of each command as JSON and fail when unexpected trailing content is present.
