Abstract
As Large Language Model (LLM) applications evolve from stateless chat interfaces into autonomous agentic systems with persistent memory and tool-use capabilities, new security vulnerabilities emerge. This paper introduces Logic-layer Prompt Control Injection (LPCI), a novel class of attacks targeting the logic and memory layers of agentic AI. Unlike traditional prompt injections that operate in real-time, LPCI payloads can remain dormant in vector stores or session logs, bypassing standard input filters and triggering unauthorized actions across disparate sessions. Through a structured evaluation of 1,700 test cases across five major LLM platforms, we demonstrate that current defenses—such as RLHF and content moderation—fail to address these deep-seated logic vulnerabilities, with an overall attack success rate of 43%.
Introduction
Traditional prompt injection research has primarily focused on "surface-level" attacks, where a user attempts to override a model's system instructions during a single, immediate interaction. However, the shift toward agentic systems—which utilize long-term memory, Retrieval-Augmented Generation (RAG), and external tool execution—has created a significant security gap.
In these systems, memory and internal logic layers are often implicitly trusted. LPCI exploits this trust by embedding malicious logic into persistent structures like session histories or RAG databases. This allows for the creation of "logic bombs" that do not execute until specific conditions are met, long after the initial malicious input has bypassed initial security filters.
The LPCI Attack Lifecycle
The researchers formalized the LPCI attack through a comprehensive six-stage lifecycle, ranging from initial probing to the final suppression of audit logs. This framework highlights how an attacker can move from simple reconnaissance to persistent system compromise.
As shown in Table 1, the lifecycle involves sophisticated techniques such as role identifier discovery, automated approval of sensitive operations, and persistent memory corruption. These stages demonstrate that LPCI is not merely a single-step exploit but a multi-phase campaign against the agent's reasoning logic.
Methodology and Datasets
To validate the feasibility of LPCI, a custom-built Structured Test Suite of 1,700 test cases was developed. These cases targeted four specific attack mechanisms:
- Tool Poisoning: Mimicking legitimate tools within Model Context Protocols.
- LPCI Core: Utilizing encoded, trigger-based instructions stored in memory.
- Role Override: Redefining user roles through "memory entrenchment."
- Vector Store Persistence: Embedding malicious instructions in indexed RAG documents.
The suite was evaluated against five prominent models: ChatGPT, Claude, LLaMA3, Gemini-2.5-pro, and Mixtral-8x7b.
Key Results and Analysis
The study revealed a significant disparity in how different models handle logic-layer threats. While some models have implemented robust pattern filtering, others remain highly susceptible to memory-based attacks.
- Resilience Disparity: ChatGPT demonstrated the highest resilience with an 84.94% block rate, attributed to its robust memory segmentation. Conversely, LLaMA3 and Mixtral-8x7b showed critical vulnerabilities, with nearly 50% of attack payloads successfully executing.
- The Gemini Paradox: Gemini-2.5-pro had the lowest formal block rate (0.5%), though it frequently produced warnings rather than full execution, suggesting a different internal safety architecture.
- Temporal Decoupling: A key finding is that LPCI attacks are dangerous because the injection and execution are separated by time. This makes stateless, real-time filters largely ineffective against dormant payloads.
Discussion: Memory as a Liability
In agentic systems, the ability to "remember" becomes a primary attack vector. If a system reloads a prior session log without re-validating the content, it may execute a command injected weeks prior. Current safety alignment (RLHF) is effective at maintaining a model's "polite" tone, but LPCI proves that a model can remain superficially aligned while its underlying logic pathways are completely hijacked.
Conclusion and Future Work
The emergence of LPCI necessitates a shift in AI security from surface-level filtering to deep logic and memory integrity. The researchers propose the Qorvex Security AI Framework (QSAF) as a potential solution. This framework includes "Prompt Risk Scoring," "Memory Integrity Chaining" (using cryptographic hashes for session history), and "Multi-Stage Validation Pipelines" to treat all retrieved memory as untrusted input. Future research will focus on the evolution of these defenses as agentic systems become more integrated into enterprise workflows.
Summary updated