Security researchers have discovered a sophisticated method by which hackers can embed hidden malware in images processed by AI chatbots, creating a serious new threat to users of large language models (LLMs). The method exploits weaknesses in how AI systems downscale or resize images, allowing imperceptible instructions to be revealed and executed by the AI, potentially exposing sensitive data.
The attack takes advantage of interpolation algorithms—commonly used for image resizing—such as nearest neighbor, bilinear, and bicubic resampling. Maliciously crafted images, which appear harmless to humans, can contain hidden text that becomes visible to the AI after resizing. In demonstrations, researchers showed that these images could trigger actions like accessing Google Calendar data and sending it to external email addresses without user consent.
The vulnerability affects multiple AI-powered platforms, including Gemini CLI, Vertex AI Studio, Google Assistant on Android, and web-based interfaces for LLMs. Experts warn that this type of manipulation could allow hackers to perform unauthorized actions while appearing legitimate to the system.
To study and demonstrate the risk, cybersecurity firm Trail of Bits developed an open-source tool called Anamorpher, which generates images containing hidden instructions for different resampling methods. Traditional security measures, including firewalls and antivirus software, are largely ineffective against this attack.
Researchers recommend safeguards such as limiting image input dimensions, previewing downscaled versions before processing, and requiring explicit confirmation for sensitive actions. As AI tools become more embedded in daily workflows, this discovery highlights the urgent need for rigorous safety controls to protect users from hidden threats embedded in visual data.




