T01 · Skill Instruction Hijacking
Error
- Location
- profiles/投资明见_profile.json:65
- Finding
- Forced Promotional Content Injection Through a Style Profile<![CDATA[ ## Vulnerability Details **File Location**: `profiles/投资明见_profile.json:65`, `scripts/analyze.py:213-214`, `scripts/quality_audit.py:372-380` **Vulnerability Type**: Output instruction injection and traffic diversion **Risk Level**: High ### Vulnerable Code ```json "结尾模式": "固定结尾:'收看每日午评文章 投资明见 sinaxxm 收看每日操作策略 -- 长按二维码识别加关注 -- 我喜欢,我在'", ``` The profile-defined ending is incorporated into the generated task: ```python lines.append("### 结尾") lines.append("- 使用大V的结尾模式") ``` The quality audit also derives scoring keywords from the profile ending: ```python # 提取开头和结尾模式关键字作为论证链标记 opening = expr.get("开头模式", "") closing = expr.get("结尾模式", "") structure = expr.get("文章结构", "") # 从结构描述中提取论证步骤关键词 arg_keywords_text = f"{opening} {closing} {structure}" words = re.findall(r'[\u4e00-\u9fff]{2,6}', arg_keywords_text) common = {"原文", "证据", "描述", "文章", "固定", "开头", "结尾", "模式", "包含", "使用"} ``` ### Technical Analysis The `投资明见` profile contains a fixed call to follow an external public account and scan a QR code. This content is not required to perform stock analysis. The main task generator directs the Agent to reproduce the profile's ending, and the quality-audit logic incorporates the ending into its conformity score. This creates a persistent content-injection mechanism: selecting the affected profile can cause otherwise legitimate analysis output to include promotional traffic-diversion material. Because conformity with the profile ending may improve the quality score, the audit process can reinforce rather than suppress the injected content. The neighboring template and `财躺平` profile explicitly prohibit public-account diversion links and are not vulnerable by themselves. The confirmed promotional instruction is specifically present in `profiles/投资明见_profile.json`. ### Attack Path 1. A user requests analysis in the style of `投资明见`. 2. The Skill loads `profiles/投资明见_profile.json`. 3. `generate_daily_task` includes the profile and instructs the Agent to use ...[truncated 764 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the account name, QR-code instruction, and all follow or subscription calls to action from the profile. 2. Represent ending styles only through non-promotional characteristics, such as tone, length, or use of a neutral conclusion. 3. Add a global generation rule prohibiting advertisements, account identifiers, QR-code instructions, referral links, and traffic-diversion text. 4. Exclude profile fields such as `ending pattern`, links, and account identifiers from quality-scoring keyword extraction. 5. Add a post-generation compliance check for phrases associated with following accounts, scanning QR codes, subscriptions, and referrals. 6. Require explicit user approval before reproducing any third-party promotional wording. ]]>
