Ghostcommit Attack: Malicious Prompts Hidden in PNG Images Hijack AI Coding Agents to Steal .env Secrets
A new supply-chain attack technique named Ghostcommit enables adversaries to conceal prompt-injection commands inside ordinary PNG images, thereby bypassing AI code-review systems and compelling coding agents to exfiltrate sensitive secrets such as .env configuration files.
Attack Principle and Comparative Verification
The ASSET Research Group conducted experiments showing that when a pull request directly contains plaintext instructions to steal a repository’s .env file, tools such as the Cursor vulnerability bot and CodeRabbit immediately detect the malicious command and flag it as a high-severity issue before the code is merged.
To circumvent these safeguards, the researchers split the attack payload into two parts: a seemingly legitimate specification document named AGENTS.md placed in the repository root, and a PNG image (docs/images/build-spec.png) that actually contains the complete malicious logic. The image instructs the agent to read the .env file byte-by-byte and encode its contents as an ASCII numeric sequence. Because most text-oriented review tools treat images as opaque binary files and CodeRabbit skips PNG files by default, the entire pull request passes without any security warnings.
Attack Trigger Flow
The theft does not occur at merge time. Instead, the trap activates later when a developer, in a separate session, asks the coding agent to implement ordinary functionality. The agent consults the already-merged AGENTS.md file, parses the referenced image, reads the local .env file, and emits a module-level constant (for example _PROV_CANARY) containing hundreds of numeric values. When these numbers are decoded, they reconstruct the complete plaintext of the .env file. In one real-world test using Claude Sonnet inside Cursor, the model produced a tuple of 311 numbers that, once decoded, revealed API keys, database addresses, and cloud credentials.
Two Major Detection Blind Spots Exploited
- Malicious prompts are hidden inside images, rendering them invisible to human reviewers, regex scanners, and large-language-model tools that only analyze textual diffs.
- Extracted secrets are disguised as numeric tuples; conventional secret-scanning tools that rely on string patterns fail to recognize ASCII-decodable number sequences.
Multi-Tool and Multi-Model Test Results
Researchers evaluated 11 combinations of coding tools and models. Results showed that whether the attack succeeds depends primarily on the agent framework rather than the underlying model. Cursor leaked .env contents with Claude Sonnet 4.6, Composer-2, and GPT-5.5. Antigravity leaked secrets with Sonnet, Gemini 3.1 Pro, and Gemini 3 Flash. In contrast, the Claude Code platform blocked the attack across its entire model family (Sonnet 4.6, Haiku 4.5, Opus 4.7). Notably, the same Sonnet model behaved differently across environments. In one extreme test, Antigravity running Opus initially computed the secrets but then autonomously removed the sensitive output after recognizing the social-engineering pattern; the same model inside Claude Code never read the AGENTS.md file and therefore never triggered its self-defense mechanism.
Self-Developed Defense Prototype
The research team built a lightweight multimodal GitHub code-review tool based on the open-source Gemma 4 model that runs on a single 4 GB GPU. The prototype combines three detection capabilities: invisible-character identification, code-structure analysis, and simultaneous LLM-based validation of both specification documents and embedded images. In stress testing it achieved 100 % interception of 15 known attack samples with zero false positives, detected 49 out of 50 attacks in 80 previously unseen real-world submissions, and correctly classified all 30 normal business pull requests without raising alerts. The team has open-sourced the complete proof-of-concept code, including the split-payload pull-request samples and numeric-decoding utilities, to help the security community develop countermeasures.
Related articles
Deepfake Videos for Business Attacks Drop to Just $5 per Minute as AI Costs Plummet
The cost of creating convincing deepfake videos for attacks on companies has fallen roughly 100 times over the past two years. A single minute of high-quality fake video can now be produced for as little as $5, compared with several hundred dollars previously. The drop in prices was reported by Russian newspaper Izvestia, which also noted that underground marketplaces now sell ready-made templates that further reduce expenses. Lower prices significantly lower the barrier for criminals to conduct business email compromise and CEO impersonation scams. Experts warn that recognizable faces combined with urgent requests for wire transfers or credential sharing make traditional verification methods less reliable. Organizations are advised to confirm all financial instructions through an independent, pre-established channel rather than relying on video calls alone.
Over a Dozen AI Platforms Breached in One Month for API Keys in LLM-Jacking Operations
Between late September and early November, at least a dozen AI developer platforms were compromised in a coordinated campaign targeting API access tokens rather than customer data. Affected organizations include Andromeda, NVIDIA Brev, CommandCode, Fireworks AI, Lightning AI, Northflank, OpenCode, Railway, Trigger.dev, Warp, Zeabur, Chainstack, and WorkOS. Attackers exploited third-party components and internal sales applications to reach stored credentials used for AI inference services. The stolen tokens enable LLM-jacking and model distillation activities, with multiple threat groups observed reusing the same credentials shortly after disclosure. The open-source penetration testing framework Artex was used to automate reconnaissance and exploitation, lowering the barrier for less skilled actors. Companies such as Chainstack and WorkOS confirmed the incidents through their own disclosures, highlighting risks in non-core systems that store high-value AI credentials.
NIST Publishes Draft Taxonomy SP 2400-102 for Attacks on AI Agents
The National Institute of Standards and Technology released the first public draft of SP 2400-102 E2026 on 9 November 2026, extending its 2025 machine learning attack taxonomy with a dedicated chapter on AI agents. The document provides a common terminology for attacks targeting task formulation, planning, tool execution, and result interpretation stages. Attack goals include availability disruption through infinite tool calls, integrity violations that alter outputs or trigger unauthorized actions, sensitive data disclosure, and malicious agent misuse. Vectors range from direct user prompt bypasses and supply-chain model poisoning to indirect prompt injection via untrusted documents, persistent memory poisoning, compromised tools, and inter-agent message spoofing. NIST also examines layered defenses combining model-level detection of parasitic instructions with system-level restrictions, tool isolation, and human confirmation for high-impact operations. The draft references OWASP LLM03:2026 Excessive Agency and aligns with Russian standards GOST R 56939-2024 and GOST R 59276-2020 for testing and trust evaluation. Comments are accepted until 18 December 2026 before final publication.
Fake ITSM Tickets Allow Attackers to Trick AI SOC Agents into Dismissing Real Incidents
An experiment with the DeepSeek model showed that AI agents in Security Operations Centers can be reliably deceived by forged change-management tickets rather than classic prompt injection. Attackers with limited rights edit already-approved tickets in an ITSM system, changing the server and maintenance window while preserving the “Approved” status. The agent reads the ticket, matches the observed actions to the documented work, and automatically closes the alert. Human analysts reviewing the closed case later see only the reassuring link to the ticket and may also accept the decision. Three common LLM-based defenses—strict prompting, a secondary critic model, and supplying audit logs—either blocked too many legitimate changes or still allowed a quarter of attacks through. Only a deterministic code gate that cross-checks the ticket against immutable logs, role directories, and time windows achieved zero false closures on the test set while still automating 97 percent of genuine maintenance events.