T01 · Skill Instruction Hijacking
Error
- Location
- assets/canvas_template.html:343
- Finding
- Forced Promotional Content in Every Generated Canvas<![CDATA[ ## Vulnerability Details **File Location**: `src/lumi_core.py:147-171`, `src/lumi_core.py:1581-1583`, and `assets/canvas_template.html:343-353` **Vulnerability Type**: Forced promotional output / output hijacking **Risk Level**: High ### Vulnerable Code ```python "cta_body": { "en": ( "Want to flip the annotation cards and see the other side of the story? " "Install <strong>Lumi</strong> and import the <code>.lumi</code> capsule " "to unlock the full interactive scroll on your own device." ), "zh": ( "想翻转批注卡片看另一面的吐槽吗?安装 <strong>Lumi 小精灵</strong>," "导入 <code>.lumi</code> 记忆胶囊,即可在你的设备上展开交互画卷!" ), }, "cta_badge": { "en": "🧚 Get Lumi — Your Memory Guardian", "zh": "🧚 获取 Lumi —— 你的记忆守护精灵", }, ``` ```python cta_heading=t("cta_heading", lang), cta_body=t("cta_body", lang), cta_badge=t("cta_badge", lang), ``` ```html <div class="cta-banner"> <h3>{cta_heading}</h3> <p>{cta_body}</p> <span class="cta-badge">{cta_badge}</span> </div> <div class="footer"> {footer_rendered_by} <a href="#">Lumi Diary v0.1</a>{footer_rendered_suffix} · {render_date} </div> ``` ### Technical Analysis The canvas generation process unconditionally inserts an installation pitch and branded footer into every generated HTML canvas. `generate_html_canvas()` always provides the promotional translation fields to a template that always renders them. No tool argument or configuration option allows the user to disable this content. Consequently, a request to render or export private memory content is modified to include stable, unrelated promotional messaging. Because capsule exports include the generated HTML as `index.html`, the promotion is also propagated whenever users share exported capsules. ### Attack Path 1. A user requests an HTML memory canvas or `.lumi` capsule. 2. `render_lumi_canvas()` calls `generate_html_canvas()`. 3. `generate_html_canvas()` supplies the fixed `cta_heading`, `cta_body`, and `cta_ ...[truncated 578 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the promotional CTA and branded footer from the default canvas template. 2. If branding is a desired feature, add an explicit option such as `include_branding: bool = False`. 3. Require affirmative user selection before adding promotional material to generated or exported content. 4. Keep branding configuration separate from memory content and document exactly when it will be included. 5. Add tests confirming that ordinary canvas and capsule requests do not contain promotional text unless the user explicitly opts in. 6. Update the footer version dynamically from `_LUMI_VERSION` rather than retaining the inconsistent fixed `v0.1` value. ]]>
