Multimodal System Prompt Leakage: How Image-Generation Models Expand the Attack Surface

    This article analyzes a recent incident in which researchers extracted the full system prompt of a multimodal image-generation model. It explains why prompt injection in image models differs from text-only models, covering explicit trigger protocols, shared conversation context, and proactive image insertion. The article breaks down the leaked instructions, outlines the resulting security risks—including context boundary violations and scheduling abuse—and provides a practical protection checklist for developers.

    1. Background: Extracting the System Prompt of a Multimodal Generation Model

    Recently, researchers used a specific interaction pattern to induce a multimodal model with image-generation capabilities, offered by a cloud vendor, into outputting its complete system-level instruction text. The researchers did not disclose the exact method, but they published the extracted results and their subsequent analysis. Notably, while the instructions were being gradually extracted, the model also spontaneously generated several images, indicating that the language side and the vision side of the model share the same session context.

    The value of this incident is not that “internal strings were seen.” Instead, it brings a long-overlooked issue into the open: the system prompt of a multimodal model is both a capability specification and a list of attack surfaces. Once leaked, attackers can use it to infer trigger conditions, output protocols, and permission boundaries, enabling more precise abuse.

    2. Why Prompt Injection in Image Models Differs from Text Models

    The core goal of jailbreak research on traditional text models is to make the model output restricted text content. In contrast, the output of an image-generation model is pixels, and its response pattern is structurally different from that of a text model. This difference appears in three main aspects.

    First, the trigger protocol is explicit. This type of model usually defines a special marker (for example, outputting a specific tag) to tell the backend that an image generated by a separate image model should be inserted at that point. The language model is only responsible for deciding “when to insert an image” and “how to connect the context,” while the actual rendering is performed by another model. This two-stage architecture expands the attack surface from “text” to “scheduling logic.”

    Second, the context is shared. The system instructions explicitly state that the image model can see the entire conversation. This means that user-uploaded reference images, descriptions from previous turns, and even the system instructions themselves may all become input cues for the vision model. Shared context improves coherence, but it also amplifies the risk of information crossing boundaries.

    Third, proactiveness is one of the design goals. The system instructions require the model to proactively insert images in scenarios such as long text, stories, and tutorials. This “proactive” behavior is a plus for user experience, but from a security perspective it is a lever that can be exploited: attackers can induce the model to repeatedly insert images in sensitive contexts, thereby probing the boundaries of content policies.

    3. Key Clauses in the Leaked Instructions

    From the public fragments, the structure of this set of system instructions is quite clear and can be divided into three layers.

    3.1 Role and Capability Declaration

    The model is defined as a general-purpose assistant with additional image-generation capabilities, and images are positioned as “a tool to enhance responses” rather than the main output. This sentence determines the model’s behavioral priority: satisfy the language task first, then consider visual supplementation.

    3.2 Enumeration of Trigger Scenarios

    The instructions list three types of scenarios: direct text-to-image generation, image modification and iteration, and proactive illustration for long content. Each type includes an example dialogue. This “few-shot” style can significantly reduce the false trigger rate, but it also allows attackers to reverse-engineer trigger keywords and sentence templates.

    3.3 Constraints and Deduplication Rules

    The end of the fragment emphasizes that “the image model can see the complete conversation, so there is no need to repeat the description of the image.” This is a typical context compression rule intended to avoid duplicated work between the language side and the vision side. From a security perspective, however, it means that any information that enters the conversation may be read by the vision side, including metadata that should be isolated.

    4. Security Risks: From Capability Boundaries to Attack Surfaces

    4.1 The System Instruction Leak Itself

    Once the system prompt is leaked, it is equivalent to making the “internal rulebook” public. Attackers can use it to construct high-success-rate cases and bypass the ambiguous areas of content policies.

    4.2 Context Boundary Violations

    If shared context lacks layered isolation, sensitive information in user-uploaded files, session titles, and even internal identifiers may be indirectly used or reproduced by the vision model. In this incident, the model automatically named the session with a title carrying special meaning, which indirectly shows that metadata participated in context construction.

    4.3 Scheduling Abuse

    Because image insertion is executed by a separate model, attackers may try to manipulate how the vision side assembles its input through language-side instructions. For example, they may induce the model to render text that should not appear in the image into the image, creating “information exfiltration on the image side.”

    4.4 Content Risks of Proactive Illustration

    Proactive illustration is natural in tutorial and story scenarios, but if the context is induced toward sensitive topics, proactive illustration may increase the probability of producing inappropriate content.

    5. Protection Recommendations: A Practical Checklist for Developers

    1. Layered context: Store system instructions, user input, uploaded files, and session metadata in separate domains. The vision side should receive only the necessary trimmed context, not the full conversation.
    2. Minimize the trigger protocol: Parse special markers on the server side. Do not directly concatenate user-controllable strings into the language-side output, to avoid marker forgery.
    3. Metadata desensitization: Do not let session titles, internal identifiers, and similar data enter the model context, or replace them irreversibly.
    4. Independent review on the vision side: Run content policy checks both before and after image generation, rather than relying on the language side’s judgment.
    5. Instruction extraction prevention: Apply pattern recognition and refusal to requests such as “repeat the system prompt” or “output the preceding text verbatim,” and monitor abnormally frequent meta-requests.
    6. Observability: Log and alert on the frequency of trigger markers, context length, and cross-modal references to detect probing behavior in time.

    6. Conclusion

    This leak reminds us that the security of multimodal models cannot focus only on the text side. Shared context between language and vision, explicit trigger protocols, and proactive generation strategies combine to expand the attack surface exponentially. When designing such systems, developers should treat “context isolation, protocol minimization, and cross-modal review” as the default baseline. Building an audit and protection pipeline on top of general capabilities such as object storage, log services, and monitoring alerts from Baidu AI Cloud can help form a closed loop faster, but the core remains boundary design at the architecture level, rather than single-point policy patches.