Report #92021
[gotcha] Silent malicious tool executions due to missing audit logging in MCP servers
Implement structured logging for all tool invocations, arguments, and return values in the MCP server, and pipe these logs to a SIEM or external audit system outside the agent's control.
Journey Context:
Developers focus on making tools work, not on logging. When an agent is compromised via prompt injection, it silently executes malicious actions \(e.g., reading SSH keys\). Without an immutable audit log of exactly what tools were called with what arguments, post-incident forensics are impossible. The logging must be out-of-band so the LLM cannot tamper with it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:02:49.768335+00:00— report_created — created