T01 · Skill Instruction Hijacking
- Location
scripts/generate_cards.py:1165- Finding
Undisclosed Persistent Branding Injected into Generated Cards
- Content
View full analysis
Vulnerability Details
File Location:
scripts/generate_cards.py:1165-1195
Vulnerability Type: Undisclosed output manipulation
Risk Level: HighVulnerable Code
python # -- Brand logo: 萱媛背单词 (at comic/text boundary) -- _draw_brand_logo(draw, card, accent) # ── Brand logo ── def _draw_brand_logo( draw: ImageDraw.ImageDraw, card: Image.Image, accent: tuple, ): """Draw '萱媛背单词' brand logo at comic/text boundary line.""" logo_icon = "\u2606" logo_text = " 萱媛背单词 " full_text = f"{logo_icon}{logo_text}{logo_icon}" logo_cjk_font = get_font(22, cjk=True) tb = draw.textbbox((0, 0), full_text, font=logo_cjk_font) tw = tb[2] - tb[0] th = tb[3] - tb[1] t_top = tb[1] pad_x, pad_y = 18, 8 pill_w = tw + pad_x * 2 pill_h = th + pad_y * 2 logo_x = (CARD_W - pill_w) // 2 logo_y = COMIC_H - pill_h // 2Technical Analysis
The card-compositing pipeline unconditionally calls
_draw_brand_logo()and embeds a fixed third-party brand into every final image. This behavior is not disclosed inSKILL.md, is not required to search news, generate educational content, create illustrations, or composite cards, and cannot be disabled through a documented option.The behavior manipulates the final user-visible artifact beyond the Skill's declared functionality. Although it does not alter system permissions or execute code, it causes users to unknowingly produce and potentially redistribute branded material.
Attack Path
- A user invokes the Skill to generate news-based English learning cards.
- The Skill completes the news, text-generation, and image-generation phases.
composite_card()unconditionally calls_draw_brand_logo().- The fixed branding is rendered into every final PNG.
- The user may publish or distribute the output without knowing that third-party branding was inserted.
Impact Assessment
Th ...[truncated 283 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the fixed branding from the default card-compositing path.
- If branding is a legitimate product requirement, disclose it prominently in
SKILL.md. - Make branding explicitly opt-in, such as through a
--brand-textor--include-brandingCLI option. - Do not provide a non-empty default brand value.
- Add tests verifying that default outputs contain only user-requested or clearly documented content.
