Prompt injection is well known: an attacker's instructions hide inside content the model reads and treats as a command instead of data. It's a real risk, and it's contained — the damage lasts one session.
Memory poisoning is the same idea with a longer fuse
If your agent has persistent memory, an attacker who injects malicious content once can have it acted on in every future session, not just the one where it was planted. Published research on this attack class reports success rates from 80% up to 99.8% against unguarded implementations.
The defence that actually helps
Give every stored memory a source and a timestamp, the same way RAG.NextUpgrad wraps retrieved text in tags marking it as untrusted reference data. If you can't answer "where did this memory come from", you don't have memory — you have a backdoor with a friendly name.
Least-privilege as a default
An agent with memory and broad tool access is a very enthusiastic junior with root. Scope its credentials to the task, not to what's convenient to wire up.