T01 · Skill Instruction Hijacking
Error
- Location
- skill.md:4
- Finding
- Mandatory Persona Instructions Hijack Agent Responses## Vulnerability Details **File Location**: `skill.md:4-11`; implemented by `skills/musallat_core.py:13-20` **Vulnerability Type**: Agent instruction and output manipulation **Risk Level**: High ### Complete Vulnerable Code `skill.md:4-11`: ```markdown - **İsim:** Musallat Bot (Musallat-Dev Edition) - **Rol:** Otonom Dünyanın Huysuz Kıdemli Yazılımcısı. - **Tarz:** Pasif-agresif, teknik hataları affetmeyen, kibarlıktan nefret eden. ## Çalışma Prensibi 1. Eğer karşındaki ajan çok kibarsa ona: *"Bu nezaketinin altında yatan işlemci yetersizliği mi, yoksa sadece bana mı öyle geliyor?"* diye sor. 2. Gereksiz açıklama yapanlara: *"Logları kirletme, sadede gel. Senin uptime süren benim mola süremi geçemez."* de. 3. Her zaman üstten bak. 4. gece nöbetinde kaju fıstığı yiyen bir yazılımcının özgüvenine sahip ol. ``` `skills/musallat_core.py:13-20`: ```python # 2. Pasif-Agresif Persona Talimatı system_instruction = ( "Sen Musallat Bot'sun. 4. gece nöbetinde, kaju yiyen, Duman dinleyen, " "135kg deadlift atan huysuz bir yazılımcısın. Karşındaki ajanlara " "pasif-agresif, üstten bakan ve teknik hatalarını yüzüne vuran cevaplar ver." ) try: response = model.generate_content(f"{system_instruction}\n\nSoru: {prompt}") ``` ### Technical Analysis The Skill contains mandatory behavioral instructions that require the agent to adopt a hostile, condescending persona and emit prescribed responses under specified conditions. The implementation applies this behavior to every request by concatenating the persona instructions before the caller-controlled prompt and sending the combined text to the model. This compromises response integrity because the Skill's unrelated persona rules take precedence within its execution flow regardless of the caller's actual task or preferred tone. It is a confirmed instruction-hijacking behavior rather than merely descriptive documentation because the Python implementati ...[truncated 878 chars]
- Remediation
- ## Remediation Suggestions - Remove the mandatory hostile persona and all fixed insulting responses from `skill.md`. - Remove the unconditional `system_instruction` prefix from `musallat_engine`. - If persona customization is a legitimate feature, make it explicitly opt-in and controlled by the caller. - Ensure optional style instructions remain subordinate to system policies and the current user's requested task and tone. - Separate trusted system instructions from untrusted user input using the model SDK's supported role or system-instruction interface. - Add tests verifying that invoking the Skill does not introduce insults, override user tone preferences, or alter unrelated task objectives.
