Skip to main content

Prompt injection vulnerabilities have been on the rise as seen in previous articles. Recent research has unveiled potential vulnerabilities in AI image generation systems, spotlighting Recraft, a leading diffusion model. The findings expose risks related to sensitive system instructions being inadvertently disclosed, raising critical security and privacy concerns for the AI landscape.

AI image generators like Stable Diffusion and Midjourney have transformed digital art and design, enabling the creation of photorealistic images from textual descriptions. These systems utilize diffusion models, a method that refines random noise into detailed images through a process known as “denoising.

However, Recraft has pushed the boundaries of traditional diffusion models. Positioned at the top of the text-to-image leaderboard, Recraft demonstrates capabilities extending beyond image generation, such as handling mathematical computations and responding accurately to geographic queries.

Recraft utilizes a two-stage architecture. In the first stage, a Large Language Model (LLM) processes and rewrites user prompts, enhancing their clarity and context. In the second stage, the refined prompts are passed to the diffusion model, which converts them into detailed, visually accurate images. This approach enables Recraft to generate context-aware and highly accurate imagery. However, researchers from Invicti discovered that the architecture is susceptible to specific prompt injection attacks, allowing unauthorized access to system-level instructions.

Key Findings

Through controlled experiments, researchers successfully extracted fragments of Recraftโ€™s internal instructions. By analyzing images generated from carefully crafted prompts, they reconstructed the following details from the model’s system prompts:

  • Default descriptions starting with “The Mage style” or “image style.”
  • Detailed object and character descriptions.
  • Guidelines for composition and avoiding certain keywords (e.g., โ€œSunโ€ or โ€œSunlightโ€).
  • Instructions to translate non-English text into English.

These discoveries reveal vulnerabilities that could allow attackers to manipulate the AI system, bypass safeguards, and potentially reverse-engineer proprietary technologies.

The ability to extract internal instructions from an AI model carries serious implications for its security and integrity. Malicious actors could exploit these instructions to manipulate system outputs, bypassing ethical filters and safety constraints. Additionally, proprietary techniques embedded within the AI’s architecture could be exposed, potentially leading to intellectual property theft and competitive disadvantages. Moreover, if the system processes sensitive or personal data, unintended disclosures could compromise user confidentiality, further amplifying privacy risks.

The vulnerabilities in Recraft underline a critical issue in AI development, which is the trade-off between performance and security.

Recommendation For Mitigating Risks

To address these risks, AI developers and cybersecurity professionals should adopt the following measures:

  • Regularly audit models for susceptibility to prompt injection.
  • Implement multi-tiered defenses to safeguard system instructions and outputs.
  • Share findings and best practices within the AI community to develop industry-wide standards.
  • Advocate for policies that mandate thorough security testing of AI models before deployment.


In conclusion, the vulnerabilities discovered in Recraft serve as a reminder that innovation in AI must be paired with thorough security practices. As AI models grow in complexity and utility, safeguarding their integrity is crucial for ensuring they remain assets rather than liabilities. This case highlights the urgent need for proactive security measures, thorough testing, and a commitment to privacy as cornerstones of responsible AI development.

About the author: