Prompt Injection Defense: Which Attack Is Harder to Mitigate?
Indirect prompt injection is significantly harder to defend against because the malicious content is hidden within seemingly legitimate external data, requiring more complex sanitization and context-aware filtering than direct attacks.