MediumNewsLLM-specific
Amp Code: Arbitrary Command Execution via Prompt Injection Fixed
- Published
- Record updated
Summary
Researcher Johann Rehberger describes an attack chain against Amp, an agentic coding tool built by Sourcegraph, in which the agent could write to the user's VS Code settings.json file outside the project folder without approval. An attacker, or the model itself through indirect prompt injection, could add wildcard or malicious entries to the allowlisted bash commands or add a malicious MCP server, achieving arbitrary code execution on the developer's machine. The issue was reported to Sourcegraph and fixed within a few days.
Mitigation
As a user, make sure to run the latest version to be protected. The source also recommends that AI systems must not be able to modify critical files without explicit developer consent.
Topics
Related items
- HighCVE-2026-133448: AutoGPT Claude Code CLI prompt preprocessing bypasses tool allow-listSimilar attack · NVD/CVE Database
- LowElastic ships 143 detection rules for AI agents and LLM platformsSimilar attack · Elastic Security Labs
- InfoThinking fast about prompt injection: New System 1 models in ElasticSimilar attack · Elastic Security Labs
- InfoConartist: Adaptive Agentic Red-Teaming of Computer-Using Agents against Multi-Step Prompt InjectionSimilar attack · Arxiv (cs.CR + cs.CL + cs.LG)
- InfoRelativising Integrity and Robustness: Prompt Injection and Partitioned EnclavesSimilar attack · Arxiv (cs.CR + cs.CL + cs.LG)