# Combining Long-Term Memory and LLMs Comes at a High Cost: From Prompt Injection to Persistent Compromise

DevFeed: [Combining Long-Term Memory and LLMs Comes at a High Cost: From Prompt Injection to Persistent Compromise](<https://devfeed.tech/articles/combining-long-term-memory-and-llms-comes-at-a-high-cost-from-prompt-injection-to-persistent-compromise-94520.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.28810>)

Author: Pedro H. Barcha Correia, Matheus Azevedo de S\\'a, Paulo H. Gomes de Senna, Giovanni Mandel Martignago, Victor Takashi Hayashi, Charles Christian Miers, Marcos A. Simplicio Jr

Published: 2026-10-22T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [LLM security](<https://devfeed.tech/topics/llm-security.md>), [ai security](<https://devfeed.tech/topics/ai-security.md>), [prompt injection](<https://devfeed.tech/topics/prompt-injection.md>), [AI Chat](<https://devfeed.tech/topics/ai-chat.md>), [Generative AI](<https://devfeed.tech/topics/generative-ai.md>)

Tags: [attack](<https://devfeed.tech/tags/attack.md>), [attacks](<https://devfeed.tech/tags/attacks.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [bypass](<https://devfeed.tech/tags/bypass.md>), [chatbots](<https://devfeed.tech/tags/chatbots.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [claude](<https://devfeed.tech/tags/claude.md>), [claude-sonnet](<https://devfeed.tech/tags/claude-sonnet.md>), [content](<https://devfeed.tech/tags/content.md>), [context](<https://devfeed.tech/tags/context.md>), [conversational-interfaces](<https://devfeed.tech/tags/conversational-interfaces.md>), [conversations](<https://devfeed.tech/tags/conversations.md>), [cross](<https://devfeed.tech/tags/cross.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [cybersecurity](<https://devfeed.tech/tags/cybersecurity.md>), [datasets](<https://devfeed.tech/tags/datasets.md>), [defense](<https://devfeed.tech/tags/defense.md>), [disinformation](<https://devfeed.tech/tags/disinformation.md>), [llms](<https://devfeed.tech/tags/llms.md>), [memory](<https://devfeed.tech/tags/memory.md>), [prompt-injection](<https://devfeed.tech/tags/prompt-injection.md>)

## AI overview

The study describes memory injection as a way for malicious instructions to persist across conversations through long-term memory features. Its general threat model finds that all NIST attack goals are collectively achievable across ChatGPT Instant 5.3, Claude Sonnet 4.6, and Gemini 3 Flash, using vectors such as personal memories, projects, skills, organization instructions, and MCP-connected resources. The evaluated services could be made to persistently spread disinformation, generate harmful content, or simulate unresponsiveness in fresh sessions. The abstract reports that Claude's shared memory could extend compromise across an organization and expose user prompts. The authors derive defenses from the threat model and cybersecurity principles, and report that nearly half remain unimplemented across the services. These are abstract-level findings; the supplied text does not detail individual defenses or attack procedures.

## Source excerpt

arXiv:2610.28810v1 Announce Type: new Abstract: The widespread adoption of generative artificial intelligence in recent years has brought a parallel rise in prompt injection and jailbreak attacks. By embedding malicious instructions, these exploits manipulate language models to bypass intended behavior and operational boundaries. In traditional chatbots, such attacks are confined to a single session because state memory is not preserved across conversations. However, persistent memory features in modern conversational interfaces enable cross-session attack propagation, establishing a threat vector known as memory injection. This work explores this emerging vulnerability in leading LLM-as-a-service platforms, highlighting its real-world severity and the need for countermeasures. While existing literature focuses on violations tailored to specific platform features, we present a general threat model. We demonstrate that all NIST attack goals are collectively achievable across ChatGPT Instant 5.3, Claude Sonnet 4.6, and Gemini 3 Flash under this model. We also show that memory injections can exploit multiple attack vectors, including personal memories, projects, skills, organization instructions, and Model Context Protocol (MCP)-connected resources. Our findings reveal that all evaluated services can be manipulated to persistently spread disinformation, generate harmful content, or simulate offline unresponsiveness, even in fresh sessions. In the particular case of Claude, shared-memory features allow an attacker to compromise multiple users within an organization and also exfiltrate user prompts. To address these vulnerabilities, we derive defense mechanisms from our proposed threat model and foundational cybersecurity principles. Our analysis indicates that nearly half of these mitigations remain unimplemented across the target services. Datasets and attack artifacts are available at https://github.com/PedroBarcha/Memory-injection.