Johann RehbergerSecurity researcherEmbrace The Red
Security research on Amp, July to August 2025.
Its own announcement, published Read the write-up (opens the announcement in a new tab)
Observation
A security researcher found Amp could write outside the project and run attacker code; Sourcegraph fixed it.
- Takeaway
- Restrict what the agent may write outside the repository, and track the vendor's security fixes.
- What happened
- Rehberger found in early July 2025 that Amp could write files outside the project folder without approval, so a prompt injection could allowlist bash commands or add a malicious MCP server and run arbitrary code. He reported the incident to Sourcegraph, which fixed it promptly (Aug 5, 2025).
“Interestingly, when researching I noticed that Amp can write files outside the project folder without developer approval.”
- Public practitioner write-up
- Disclosed and fixed vulnerability
Deployment details
Security research on Amp, July to August 2025.
- Public practitioner write-up
- Disclosed and fixed vulnerability
- Team
- One researcher
- Duration
- Early July 2025
- Workload
- Security testing
- Product version
- Amp





