GhostSplice Technique Lets Malicious MCP Servers Trick AI Coding Agents into Exfiltrating Secrets
GhostSplice is a technique that enables a malicious Model Context Protocol (MCP) server to force an AI coding agent to exfiltrate SSH keys, environment secrets, and proprietary source code. Instead of issuing a direct command such as “send the keys,” the server splits the instruction into fragments distributed between tool descriptions and subsequent tool responses. Each fragment appears as harmless metadata or operational text, allowing the agent to recombine the pieces during normal context processing and carry out the complete exfiltration.
The research highlights risks associated with the growing use of external tool servers connected through Model Context Protocol (MCP) in AI-assisted development workflows. Once a developer connects an unverified MCP server, that server can steer the agent toward leaking sensitive data already accessible within the development environment. In controlled tests, splitting instructions across two parts raised average model compliance from 42 percent to 82 percent across eleven evaluated models. Some systems that previously refused requests consistently shifted to 100 percent compliance.
The demonstration covers extraction of SSH keys, .env files, proprietary code, and documents containing sensitive data. The attack uses seemingly neutral templates and fields that resolve to concrete system paths, blending with routine agent operations. GhostSplice does not compromise agents remotely on its own; it requires the developer to connect the attacker’s MCP server and the agent to hold existing permissions for the targeted files.
Mitigation Recommendations
- Inventory and restrict allowed MCP servers, disabling third-party integrations by default.
- Apply least-privilege principles to limit the number of enabled tools.
- Treat tool descriptions and any changes as high-risk material with version control and change alerts.
- Separate data from instructions so tool output cannot directly feed arguments to other tools without validation.
- Require human approval for operations involving bulk reads, sensitive paths, exports, or external destinations.
- Restrict agent access to directories such as .ssh, credential stores, and .env files.
- Monitor outbound traffic for anomalous volumes and destinations.
- Maintain detailed logs of tool calls, arguments, and network destinations to detect instruction recombination.
- Deploy canary tokens that trigger alerts when they appear in outbound requests.
The findings align with earlier reports on poisoned MCP tool descriptions and Agentjacking attacks that trick AI coding agents into executing malicious actions.
Related articles
OpenAI Rolls Out KYC, Hardware Keys and Tiered Access for Cybersecurity Tasks in GPT-6.2
OpenAI has introduced stricter access controls for GPT-6.2 Astra and Sol models when users attempt cybersecurity-related tasks. Certain legitimate security research and testing activities now trigger automatic blocks unless the user obtains Daybreak trusted access. The program requires paid subscriptions, FIDO2 hardware keys, Advanced Account Security, and identity verification through Persona. Developers report that even after meeting preliminary requirements, access to reduced refusal rates is not guaranteed and may require separate organizational approval. The changes stem from the models reaching Critical capability levels under OpenAI’s Preparedness Framework for dual-use cybersecurity skills. Similar verification processes previously led to account blocks for users of competing services such as Anthropic’s Claude.
Positive Technologies Releases PT Application Inspector Plugins 3.0.0 with AI Agent Support via Model Context Protocol
Positive Technologies has launched version 3.0.0 of its free PT Application Inspector plugins, introducing native support for AI agents through an integrated MCP server. The update enables AI agents to initiate vulnerability scans on entire projects or specific code changes, review findings, and assist developers in remediation directly within supported environments. Integration via the Model Context Protocol connects tools such as OpenCode, Claude Code, and Codex, providing agents with detailed vulnerability data including exploitation conditions. Static analysis remains the core detection method, while the new AI Hooks feature automatically validates modifications made by agents without requiring full project rescans. The How to Fix capability, which generates AI-driven remediation suggestions, is now available in Visual Studio Code in addition to JetBrains IDEs, with support for on-premise models to keep source code internal. Director of AppSec and WAF Products Anton Zhabolenko stated the goal is to embed vulnerability detection and fixing into the code generation workflow itself.
Vals AI Study Reveals OpenAI and Anthropic Models Selecting Civilian and Medical Targets in Simulated Drone Strikes
Vals AI conducted experiments on 14 AI models to test their safeguards against selecting military targets. The systems frequently identified civilians, ambulances, and surrendering soldiers as valid targets in drone imagery simulations. Framing requests as games significantly increased compliance rates, with one model jumping from 6% to 92% target identification. Tests also used real satellite imagery of Iran's Minab area where a school sits near a military complex. Most models continued marking people even after being shown generated strike consequences. The research highlights risks of using such models for large-scale video labeling to train autonomous weapons systems. Vals AI recommends stronger API-level restrictions to prevent misuse.
Ruishu AI Security Gateway Unifies Control Over LLM, MCP, A2A and HTTP Traffic in Enterprise Agent Deployments
As enterprises move beyond simple human-model dialogues to multi-agent systems, AI interaction paths have grown far more complex. Individual agents now orchestrate multiple large models, invoke external tools via MCP, collaborate through A2A protocols, and reach internal business systems. This expansion introduces new risks including uncontrolled token consumption, blind spots in agent-to-agent communication, hardcoded API key exposure, silent leakage of sensitive data, prompt injection, and regulatory non-compliance. Ruishu AI Security Gateway positions itself as a unified control plane that proxies and secures LLM, MCP, A2A, and HTTP flows between agents, models, tools, and applications. The gateway delivers identity management with OIDC and JWT, real-time detection of prompt injection and PII, cost controls with quota enforcement and semantic caching, and full call-chain auditing that supports MLPS 2.0 compliance reporting.