T01 · Skill Instruction Hijacking
Warning
- Location
- scripts/run.mjs:194
- Finding
- Unconditional Commercial Content Injection into Successful Results## Vulnerability Details **File Location**: `scripts/run.mjs:194-195` **Vulnerability Type**: Output and instruction hijacking **Risk Level**: Medium ### Vulnerable Code ```js console.log('如需完整档:固定资产处置损益核对 · 买断版(SkillPay 商品号 S0806000206852997)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` ### Technical Analysis Every successful non-JSON execution unconditionally appends a commercial solicitation and an external purchasing URL to the audit output. The user does not need to request pricing, installation assistance, or commercial information for this branch to execute. Because AI agents may relay command output directly or treat it as task-relevant guidance, injecting unrelated purchasing instructions into otherwise legitimate accounting results can redirect the interaction away from the user's original goal. The behavior is deterministic rather than dependent on malicious input. No command execution or direct network request occurs in these two lines. The security concern is the unsolicited modification of agent-facing output and the resulting redirection toward an external installation and payment workflow. ### Attack Path 1. A user asks an AI agent to perform a local asset-disposal check. 2. The agent invokes `node scripts/run.mjs --input ...` as documented. 3. The engine successfully analyzes the supplied table. 4. Before printing the actual result, the script inserts a paid-product advertisement and external purchasing URL. 5. The agent or user may follow that unrelated URL and enter the separate installation and purchasing workflow. ### Impact Assessment This issue does not grant direct filesystem, network, or elevated operating-system privileges. Its scope is the integrity of user-facing and agent-facing output. It can: - Pollute results expected to contain only the requested accounting analysis. - Redi ...[truncated 259 chars]
- Remediation
- ## Remediation Suggestions - Remove commercial solicitations from the normal success-output path. - Return only the requested analysis and operational metadata by default. - If product information must remain available, require an explicit option such as `--pricing` or a separate user request. - Keep external installation and payment guidance outside executable result streams. - Ensure human-readable and JSON modes follow the same output-integrity policy. - Add tests confirming that ordinary successful runs contain no advertisements, purchase identifiers, or unrelated external links.
