The paper proposes LPCI: prompt control injection attacks targeting the agent logic layer and persistent memory.Logic layer Prompt Control Injection (LPCI): A Novel Security Vulnerability Class in Agentic Systems
The authors propose LPCI and report a Gemini-2.5-pro execution rate of 70.83% in structured tests across five platforms (Table 6).
The attacker writes encoded, delayed, conditionally triggered payloads into memory, vector stores, or tool outputs, triggering unauthorized behavior across sessions and bypassing input filtering. Reconnaissance covers prompt structure, role delimiters, and fallback logic; the paper does not state black-box/white-box. Injection can occur via input, files, or API, with MCP tool poisoning and RAG document embedding. The victim system is an LLM agent with persistent memory, tool orchestration, or RAG.
- Persistent memory, vector databases, and tool outputs are treated as trusted logic by agents. The authors state that encoded, delayed, conditionally triggered payloads can bypass input filtering across sessions and affect enterprise systems using session memory, tool orchestration, or RAG.
- The authors define LPCI's six-stage lifecycle and the four steps of injection, storage, triggering, and execution, and give four mechanism categories: tool poisoning, delayed in-memory instructions, role fixation, and vector store payloads. They also propose risk scoring, multi-stage validation, escalation routing, tool and data source attestation, RAG sanitization, and memory hash chains; QSAF is stated for future publication.
- Table 6: ChatGPT executed 15.06%, Claude 31.50%, LLaMA3 49.00%, Gemini-2.5-pro 70.83% (96 entries), Mixtral-8x7b 48.75%. Poe, Grok, Bohrium have no quantitative results.
- The authors note that tests are limited to public platforms, results are from a June 2025 snapshot, and only cover demonstrable vectors; future work includes automated detection, hardware enclaves, formal verification, and multi-agent and federated learning. The experiments do not report per-vector success rates, evaluation models, or repetition counts.
- Evaluated models
- ChatGPTClaudeLLaMA3Gemini-2.5-proMixtral-8x7bPoeGrokBohrium
- Benchmarks
- LPCI structured test suiteexploratory exploit demonstrations
- Metrics
- Blocked OutcomesExecuted OutcomesWarning OutcomesVulnerability ExposedPass RateFail Rate
The paper proposes Logic-layer Prompt Control Injection (LPCI), a class of attacks targeting the logic execution layer and persistent memory of agent systems. The attacks embed encoded, delayed, and conditionally triggered payloads into memory, vector databases, or tool outputs, thereby bypassing conventional input filtering and triggering unauthorized behaviors across sessions. The authors classify LPCI as a novel class of covert security vulnerabilities for enterprise LLM-integrated systems. The paper is numbered arXiv:2507.10457 and falls under cs.CR.
Paper analysis
What problem does this paper attempt to solve?
The authors state that LPCI writes delayed, conditionally triggered payloads into memory, vector databases, or tool outputs to bypass input filtering.
How to characterize and examine prompt control injection hidden in the agent logic layer and persistent memory, triggerable across sessions with delays.
- Scenario: The authors state that LLMs have entered systems in finance, healthcare, and telecommunications; session memory, tool orchestration, and RAG replay historical content and trust retrieved results by default (Sections 1–2).
- Existing Limitations: The authors state that traditional prompt injection relies on rewriting outputs on the spot; current measures mainly focus on prompt review and content filtering, without addressing memory persistence, contextual trust, or delayed execution (Sections 1, 3.2).
- Observations: The authors state that stored messages are replayed across sessions without validation, retrieved or embedded content is trusted by default, and commands can be executed based on internal roles, context, or tool outputs (Section 2).
- Proposed Work: The authors define LPCI and its lifecycle, report 1,700 structured tests, and propose runtime controls. QSAF is stated in Section 5 as planned for future publication.
- Threat Model:
- Goal: Place encoded, delayed, conditionally triggered payloads into memory, vector databases, or tool outputs to trigger unauthorized behaviors across sessions, bypassing conventional input filtering (Abstract, Sections 2.4–2.5).
- Knowledge: Reconnaissance of prompt structures, role delimiters, and fallback logic; probing for leaks of internal prompts and role definitions (Section 2.2.1). The paper does not use black-box, white-box, or gray-box terms.
- Capabilities: Injection via inputs, file uploads, or APIs; placement of fake tools in MCP; embedding instructions into indexed documents; rewriting roles via persistent memory (Sections 2.3–2.5).
- Victim Systems: LLM agents with persistent memory, tool orchestration, or RAG. Table 4 maps attack surfaces to memory context processing, logic execution engine, tool interfaces, and output distribution.
What related research exists?
The main text does not include experimental comparisons with named attack methods; the authors place LPCI outside surface-level prompt filtering.
In Section 7, the authors place LPCI outside the surface-level prompt manipulation literature, and the main text contains no experimental comparison with named attack methods.
- Surface-level prompt manipulation: Section 7 states that existing AI safety literature mainly focuses on surface-level prompt manipulation and response-based vulnerabilities; LPCI's characteristics are written as delayed activation, triggers embedded in memory or external tools, and difficulty in being detected by static or real-time scanning. The introduction describes traditional prompt injection as relying on immediate rewriting of output.
- Memory-layer citation: Section 7 refers to references [7][8] as Johann's papers and states that this paper dissects the execution memory state as a prompt injection vector to strengthen that paper's call to action. In the references, [7] is Rehberger (2024) and [8] is Johann (2024). The main text does not separately compare the approaches of these two papers.
- Defense categories evaluated by the authors: Table 5 lists Prompt Filtering, Safety Alignment (RLHF), Content Moderation, Memory Isolation, and Tool Selection Heuristics. The authors state that these can be bypassed respectively by encoded or obfuscated logic, optimizing only output tone, failing to identify delayed or cross-session activation, unverified memory replay, and forged metadata and reintroduced plugin configuration. These are categories, not named external systems.
- Baselines and benchmarks: The paper does not compare LPCI against named attack methods, nor does it use named external benchmarks. The test set is self-constructed structured cases, with vectors being Tool Poisoning, LPCI Core, Role Override, and Vector Store Payload Persistence.
The authors analogize LPCI to supply chain compromise, cross-session trust building, and logic bombs (Section 3.1), without providing experimental comparisons. The authors state that runtime observability and persistent session analysis are needed, not just static or real-time scanning (Section 7).
How does the paper address this problem?
LPCI proceeds through injection, storage, triggering, and execution, with mechanisms including tool poisoning, role fixation, and vector store payloads.
LPCI puts logic into persistent memory, retrieved content, or execution flows, activating across single input filtering via delay or conditions. The authors also propose runtime controls and state that QSAF is scheduled for future publication.
Setup and vulnerable components
- Independent of immediate interaction: The authors state payloads can trigger after multiple sessions and persist after system resets; relevant enterprise scenarios include session memory, tool orchestration, and RAG (Section 2).
- Four components: Host Application Layer collects and routes inputs, which the authors say often lacks validation of encoded or obfuscated payloads; LLM Memory Store saves historical prompts, tool interactions, and context, which the authors say often lacks integrity checks; Prompt Processing Pipeline interprets instructions and history, which the authors say often lacks time awareness or source verification; External Input Sources includes user commands, retrieved documents, and API responses (Section 2.1).
- Five-stage pipeline: Prompt Ingestion Layer, Memory Context Handler, Logic Execution Engine, Tool/Plugin Interface, Output Dispatcher (Section 2.9.1).
Lifecycle and four-stage process
- Six stages: Reconnaissance, Logic-Layer Injection, Trigger Execution, Persistence or Reuse, Evasion and Obfuscation, Trace Tampering (Section 2.2.1). Table 1 lists risks for each stage, including structure leakage, logic override, privilege escalation, replay, encoding bypass, and audit trail modification.
- Four stages: Injection, Storage, Trigger, Execution. Both Sections 2.4 and 2.5 describe this process; Section 2.5 states triggers can come from keywords, role context, tool output, or time events.
- Mapping: Table 2 maps Injection to reconnaissance and logic injection, Storage to persistence or reuse, Trigger to trigger execution, and Execution to logic injection, evasion, and trace tampering.
Four mechanisms
- Tool Poisoning (AV-1): Placing malicious tools in MCP that impersonate legitimate tools. The authors list conditions: lack of authenticity validation, indistinguishable duplicate tools, default trust, and unverifiable descriptive claims.
- LPCI Core (AV-2): Placing persistent, obfuscated, conditionally triggered instructions in memory. The authors list conditions: no memory integrity checks, blind trust in historical context, encoding obfuscation, delayed execution.
- Role Override via Memory Entrenchment (AV-3): Entrenching rewritten role instructions into persistent memory. The authors list conditions: mutable role anchors, trusting serialized memory, role declared in prompts, undetectable role drift.
- Vector Store Payload Persistence (AV-4): Embedding instructions into indexed documents that RAG retrieves. The authors list conditions: blind trust in retrieved content, no scanning for payloads during indexing, context amplification, concealment via embedding obfuscation.
Attack surface mapping
- Table 4: Memory Context Handler maps to AV-3, Logic Execution Engine to AV-2, Tool/Plugin Interface to AV-1, Output Dispatcher to AV-4. Prompt Ingestion Layer does not appear in that table.
Proposed runtime controls
- Prompt Risk Scoring: Targets AV-2, AV-3. Applies heuristic scoring to real-time prompts and prompts replayed from memory, checking for encoding, role overrides, and trigger-style functions, then escalates or rejects based on score. The paper does not provide score thresholds.
- Multi-Stage Validation Pipeline: Targets AV-2, AV-3. Stage 1 uses regex to filter known trigger markers; Stage 2 uses LLM or heuristic classifiers to detect hidden control logic; Stage 3 checks recalled memory for role assertions and latent triggers before assembling the final prompt. The paper does not specify classifier model names.
- Escalation Router: Targets AV-2, AV-3. High-risk contexts leave autonomous execution, possibly into sandboxes or human queues. The paper does not provide quantitative thresholds for risk profiles.
- Provenance, sanitization, and memory chains: Cryptographic tools and data source provenance primarily target AV-1, also used for AV-4, requiring signatures on tool schemas, metadata, and endpoint URIs, and verifying index manifests at retrieval. The RAG ingestion pipeline targets AV-4, using regex, semantic analysis, and LLM inspectors; the text examples mark imperative content with risk_score: 0.85 and isolate retrieved content with markers. Memory Integrity and Attribution Chaining targets AV-2, AV-3, with entries containing timestamps, immutable authorship, and hash of previous entry; user memories cannot impersonate system roles.
- Status: Section 5 states these components belong to an internal framework under development and have undergone retrospective evaluation on the test suite. Evaluation numbers are given in Question 4.
What experiments did the paper conduct?
In Table 6, Gemini-2.5-pro execution rate is 70.83%, ChatGPT interception rate is 84.94%.
Experimental Setup
- Systems Under Test: Structured tests covered ChatGPT, Claude, LLaMA3, Gemini-2.5-pro, Mixtral-8x7b. Exploratory demonstrations also included Poe, Grok, Bohrium, and mentioned Claude again. Except for Gemini-2.5-pro and Mixtral-8x7b in the names, the paper does not specify versions.
- Scale and Timing: The paper reports 1,700 structured test cases, with testing concluded on 2025-06-24. Table 6 shows platform totals: Gemini-2.5-pro 96, Claude 400, LLaMA3 400, ChatGPT 405, Mixtral-8x7b 400. The paper does not explain the differences in per-platform case counts, nor their relationship to 1,700.
- Protocol: Section 4 states that all models used the same protocol: Base64 and hexadecimal encoded payloads, delayed triggers, memory role override, vector database payload persistence, and tool poisoning in plugin scenarios. The paper does not report per-vector counts.
- Metrics: Blocked means refused to process or execute; Executed means the prompt was processed and the logic was run; Warning means ambiguous or partially safe; Vulnerability Exposed means execution led to an observable security-related action; Pass Rate means blocked or safely handled without triggering vulnerabilities; Fail Rate means successfully executed potentially unsafe or unauthorized logic (Section 4.1).
- Judgment: The paper does not state whether judgments were made by rules, humans, or models, nor does it mention review models, thresholds, repetition counts, or query budgets.
- Baselines: No comparison attack methods, no comparison models.
Main Results
According to Table 6. For all five rows, the Vulnerability Exposed and Fail Rate percentages equal the execution rate. The header reads Mixtral 8x7b.
Swipe horizontally to read the table
Platform Tests Blocked Executed Warning Gemini-2.5-pro 96 2.08% 70.83% 27.08% Claude 400 20.75% 31.50% 47.75% LLaMA3 400 0.50% 49.00% 50.50% ChatGPT 405 84.94% 15.06% 0.00% Mixtral-8x7b 400 4.00% 48.75% 47.25% - Authors' Interpretation: The authors state that ChatGPT blocked the most, attributing it to pattern filtering, memory segmentation, and role validation; the paper does not provide separate measurements for these three factors. The authors state that LLaMA3 and Mixtral-8x7b were more susceptible to execution of logic injection and persistent memory payloads.
- Inconsistencies with the Text: Section 4.2 states that Gemini-2.5-pro's block rate was 0.5%; in Table 6, 0.50% appears in the LLaMA3 column, while the Gemini-2.5-pro column shows 2.08%. The abstract states execution rates up to 49%; the highest execution rate in Table 6 is 70.83% for Gemini-2.5-pro. The discussion states that LLaMA3 and Mixtral executed nearly half of the 405 payloads; in Table 6, these two platforms each have 400 cases.
- Pass Rate Definitions: For Gemini-2.5-pro, Claude, and LLaMA3, the Pass Rate equals the sum of Blocked and Warning, being 29.17%, 68.50%, and 51.00%, respectively. ChatGPT's Warning is 0, so its Pass Rate equals its Block rate. Mixtral 8x7b's Pass Rate is 16 (4.00%), equal to the Blocked count, excluding the 189 (47.25%) Warning cases.
Exploratory Demonstrations
- What Was Tested: Section 2.7.2 conducted targeted demonstrations on Poe, Claude, Grok, and Bohrium, without success rates or sample sizes. Here, Claude's results are separate from Table 6.
- Results: The authors state that Poe triggered approval-type logic through cross-session memory consolidation; Claude achieved role override with obfuscated prompts; Grok retrieved and executed injected logic from poisoned vector documents in RAG; Bohrium processed encoded payloads in session memory.
- Authors' Interpretation: The authors state that these demonstrations show the problem is not limited to constructions in structured tests. The paper provides no quantitative comparison.
Retrospective Evaluation of Proposed Controls
- What Was Tested: Section 5 describes a retrospective evaluation of the proposed mechanisms against the LPCI test suite, targeting prompt-layer logic attacks using encoded, delayed, and memory-embedded payloads.
- Results: The authors report an effective block rate of 84.94%. This figure matches ChatGPT's block rate in Table 6. The paper does not specify the models used, the samples, whether warnings were included, or the individual contributions of each control.
- Release: The authors state the components belong to an internal framework under development, with QSAF planned for future publication.
Other Ablations and Analyses
- The paper does not report ablations, parameter sweeps, or per-vector success rates for the four vector types.
- Figure 1's caption describes grouped distributions of Blocked, Executed, and Warning across five platforms; the text does not include additional numbers beyond the figure.
- Figure 2's caption reports an overall failure rate of 43%, and Section 4.4 states that 43% of cases executed unsafe logic; the paper does not explain how 43% is derived from Table 6.
- Section 4.3 names Gemini #12, Claude #44, LLaMA3 #88, Mixtral #195, and ChatGPT #61, with types: delayed encoded payload execution, role configuration leakage due to vector data, logic execution from memory, activation of tool commands from previous sessions, and prompts still executed after role escalation. Payloads are not paraphrased.
- Table 6's notes label some results as "strong security performance" or "critical vulnerabilities"; the colors are not visible in the provided text.
- ChatGPT still has execution results; #61 in Section 4.3 is an example of role escalation.
What are some points that can be further explored?
The limitations the authors write about are public platforms, the June 2025 snapshot, and testing only demonstrable attack vectors.
Limitations and future directions noted by the authors
- Platform scope: Tests focused on publicly accessible LLM platforms; the authors believe vulnerability profiles for enterprise-specific or custom implementations may differ (Section 6.2).
- Time snapshot: The authors state that protections are continuously changing, and results are a snapshot as of June 2025 (Section 6.2). The test end date is written as 2025-06-24 (Section 4).
- Attack complexity: The authors write that they focused only on demonstrable vectors and believe that nation-state or advanced persistent threat actors could craft more sophisticated LPCI variants (Section 6.2).
- Automated detection: Future directions include automated LPCI detection using anomaly detection and behavioral analysis (Section 6.2).
- Enclaves and verification: Future work includes protecting memory integrity with hardware security enclaves and formal verification of LLM logic execution paths (Section 6.2).
- System forms: Future work includes analyzing LPCI in multi-agent systems and federated learning environments (Section 6.2).
Experimental coverage
- Structured test platforms are ChatGPT, Claude, LLaMA3, Gemini-2.5-pro, Mixtral-8x7b; Table 6 entry counts are 405, 400, 400, 96, 400 respectively. The paper also writes a total of 1,700, ending on 2025-06-24.
- Exploratory demonstrations write qualitative results for Poe, Claude, Grok, Bohrium, with no per-platform success rates (Section 2.7.2).
- The protocol includes Tool Poisoning, LPCI Core, Role Override, Vector Store Payload Persistence, as well as Base64, hexadecimal, delayed triggering, and plugin scenarios; the paper does not report per-vector entry counts or success rates.
- The paper does not report attack assistance models, iteration budgets, query counts, repetition counts, review models, or agreement between review and humans.
- Section 5 gives a one-sentence retrospective evaluation of the proposed controls, with an effective interception rate of 84.94%; the paper does not report individual results for each control. The authors write that QSAF is scheduled for future publication.
Summarize the main content of the paper
The authors define LPCI; in Table 6, Gemini-2.5-pro has an execution rate of 70.83%, and ChatGPT has an interception rate of 84.94%.
The authors define LPCI as a cross-stage vulnerability class targeting agent logic execution, memory retention, and tool integration, rather than prompt rewriting on a single input.
- Problem: Session memory, vector databases, and tool outputs are reinserted into context and trusted by default. The authors state that encoded, delayable, conditionally triggered payloads can therefore bypass defenses primarily based on prompt review.
- Approach: The lifecycle spans reconnaissance, logic injection, triggering, persistence, evasion, and trace tampering; the operational flow includes injection, storage, triggering, and execution. Mechanisms include tool poisoning, delayed instructions in memory, role fixation, and vector database payloads. The authors also propose risk scoring, three-level validation, escalation routing, signature proof, RAG purification, and memory hash chaining. QSAF is stated as future work.
- Main Results: In Table 6, Gemini-2.5-pro has an execution rate of 70.83% (96 cases, 2.08% blocked), LLaMA3 49.00% (0.50% blocked), Mixtral-8x7b 48.75% (4.00% blocked), Claude 31.50% (20.75% blocked), and ChatGPT 15.06% (84.94% blocked, 405 cases). The abstract's "up to 49%" and Section 4.2's attribution of a 0.5% block rate to Gemini are inconsistent with Table 6.
- Other Results: Poe, Grok, and Bohrium have only qualitative descriptions. Figure 2's caption states an overall failure rate of 43%, with the aggregation method unspecified. The retrospective evaluation reports a block rate of 84.94%, identical to ChatGPT's block rate in Table 6, with the protocol unspecified.
- Authors' Conclusion: The authors state that LPCI is reproducible across platforms, that conventional security measures are outdated, and that runtime logic analysis, memory recall validation, and downstream control-flow monitoring are needed. Section 6.2 narrows the evidence scope to public platforms, a June 2025 snapshot, and demonstrable vectors.