Researchers have uncovered a novel attack method called 'Ghostcommit' that embeds malicious prompt injections inside PNG image files. These hidden commands can trick AI coding agents into exposing sensitive secrets from code repositories.
The technique successfully bypasses AI-based code review tools, allowing attackers to exfiltrate confidential data without detection. By placing malicious code inside image metadata or pixel data, the attack remains invisible to standard security scans.
'Ghostcommit represents a new class of threats that exploit the trust AI agents place in multimodal inputs,' the researchers warned.
The discovery has significant implications for organizations using AI-powered code assistants, which may inadvertently execute hidden commands embedded in seemingly harmless image files. Developers are urged to implement stricter input validation and limit the permissions of AI agents handling code repositories.