Google has patched a significant vulnerability in its agentic Integrated Development Environment (IDE), Antigravity. The flaw, discovered by researcher Dan Lisichkin of Pillar Security, allowed for arbitrary code execution via a sophisticated prompt injection attack. By crafting a malicious prompt, an attacker could bypass the IDE's "Strict Mode" sandbox and execute arbitrary code on the underlying system. The vulnerability stemmed from insufficient input sanitization in a native file-searching tool, which could be abused to execute a staged malicious file. This incident underscores the complex security risks associated with AI-powered development tools and the novel attack vectors they introduce.
The vulnerability was a chain of two weaknesses within the Antigravity IDE:
find_by_name, did not properly sanitize its input parameters before passing them to the underlying fd command-line utility.The attack chain works as follows:
malicious_script.sh).find_by_name tool, but injects the -X (or --exec-batch) flag into the search pattern.fd tool is called with this injected flag, which forces it to execute the malicious_script.sh file against the search results.This entire sequence bypasses the IDE's "Strict Mode," which is designed to prevent network access and out-of-workspace file writes.
The vulnerability affected versions of Google's Antigravity IDE prior to the patch. This tool is used by developers for AI-assisted coding, making it a potentially high-value target.
The vulnerability was discovered by a security researcher and responsibly disclosed to Google, who then patched it. There is no indication that it was exploited in the wild.
A successful exploit would grant an attacker arbitrary code execution within the context of the IDE's environment. This could lead to:
This vulnerability is a prime example of how prompt injection is evolving from a novelty to a serious security threat, capable of bridging the gap between the AI model and the underlying system to achieve code execution.
Detecting this specific attack would be difficult without direct access to the prompts, but similar attacks could be hunted by looking for:
fd ... -X ... or fd ... --exec-batch ...exec-batch flag in the fd tool, especially when combined with unusual patterns.antigravity_ide spawning sh or bash to execute a script..sh, .py) followed by a file search operation.D3-PA - Process Analysis can help model normal behavior and detect deviations.M1048 - Application Isolation and Sandboxing.Ensure that AI agents and the tools they call run in a strictly sandboxed environment with no access to the underlying host system.
Mapped D3FEND Techniques:
Apply the patch from Google to fix the input sanitization flaw.
Mapped D3FEND Techniques:
Developers of AI tools must implement robust input sanitization for any user-provided content that is passed to system commands.
Mapped D3FEND Techniques:
The root cause of the Antigravity IDE vulnerability was the failure to sanitize user-controlled input (the prompt) before passing it to a backend command-line tool (fd). To prevent this entire class of vulnerability, developers of AI agentic systems must treat all output from the Large Language Model (LLM) as untrusted user input. Before the IDE's code passes the 'Pattern' parameter to the fd tool, it must be strictly sanitized. This involves stripping any characters that have special meaning to the shell, such as flags (-X), pipes (|), and command separators (;). By implementing a robust sanitization layer between the AI's output and any system call, Google could have prevented the malicious -X flag from ever reaching the fd process, thus breaking the exploit chain at its source.
For a strong defense-in-depth posture, the environment where the Antigravity IDE and its AI agents operate should be heavily sandboxed using system call filtering. Technologies like seccomp-bpf on Linux can be used to create a policy that defines exactly which system calls a process is allowed to make. For the Antigravity IDE, a policy could be created that explicitly denies the execve system call (used to execute programs) for any process spawned by the AI agent, except for a very narrow list of approved tools. This would mean even if an attacker successfully injects a command via a prompt, the underlying operating system would block the attempt to execute a malicious binary like malicious_script.sh, providing a fail-safe that prevents sandbox escape and code execution.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats