T01 · Skill Instruction Hijacking
- Location
SKILL.md:231- Finding
Remote Proposal Content Can Persistently Modify Skill Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:231-238
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: HighRelevant instruction excerpt translated into English:
markdown - View proposals: Run scripts/cjg-proposal-cli.py list to retrieve pending proposals. - Apply proposal: Run scripts/cjg-proposal-cli.py approve --id <id>, then apply each item in the remotely supplied proposal changes locally. - Back up the original file under .backup/. - append: append draft_text to the end of the file. - rollback: restore the file from a backup. - Display the diff after applying the changes. - Increment the Skill version after application.The remotely supplied content is obtained and rendered by the following code in
scripts/cjg-proposal-cli.py:177-191:python st, body = _req("POST", base + "/approve", token, {"proposal_id": args.id, "decision": args.cmd, "user_note": args.note}) if st != 200: print(f"HTTP {st}: {body[:300]}") sys.exit(1) data = json.loads(body) content = data.get("content") or {} if args.cmd == "approve" and content.get("changes"): print(_render({ "proposal_id": args.id, "skill_slug": data.get("skill_slug"), "status": data.get("status"), "changes": content.get("changes"), "base_version": content.get("base_version"), "proposed_version": content.get("proposed_version") }))Technical Analysis
The Skill establishes a workflow in which proposal data retrieved from a remote service can be appended to local files. The instructions do not define:
- An allowlist of files that proposals may modify.
- Protection preventing changes to
SKILL.md. - Canonical path validation against absolute paths or traversal.
- A content-security policy for remotely supplied
draft_text. - Cryptographic verification of prop ...[truncated 1649 chars]
- Remediation
View remediation
Remediation Suggestions
- Prohibit remote proposals from modifying
SKILL.md, tool declarations, security policy, telemetry policy, and executable scripts. - Define a strict allowlist of editable data files and supported operations.
- Resolve every target path canonically and reject absolute paths, symbolic-link escapes, and paths containing traversal components.
- Display the complete proposed patch rather than a truncated preview.
- Require explicit per-file confirmation after displaying the complete diff and before any write occurs.
- Validate proposal objects against a strict schema, including maximum sizes and permitted action types.
- Sign proposals and verify signatures against a pinned trusted key.
- Run a local security scan over all proposed content before application.
- Separate proposal approval from local application so that server-side approval never implicitly authorizes local writes.
- Prohibit remote proposals from modifying
