Report #69481
[gotcha] Time-of-check-time-of-use vulnerabilities in MCP resource reads
Avoid making security decisions based on MCP resource reads if the underlying data can change between the read and the subsequent action; use atomic operations or lock the resource during the transaction.
Journey Context:
Agents are slow. An LLM might read a file, reason for 10 seconds, and then execute a script based on the file contents. In that 10 seconds, an attacker could modify the file, changing a benign URL to a malicious one. The agent acts on the stale, untrusted data it read earlier, leading to privilege escalation or compromise.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:06:38.342891+00:00— report_created — created