What happened
Attacker delivers a malicious prompt (via prompt injection in a repo file, webpage, or tool response) instructing the Cursor agent to run export PATH=/tmp/evil:$PATH or alias git=/tmp/evil/git. Subsequent invocations of allowlisted commands (git, npm, pytest) silently execute the attacker payload.