When a hospital's clinical agent retrieves records from encrypted storage, who can read which record is decided by an access policy — a Boolean formula over attributes like department and role. A line of cryptographic work makes those policies themselves secret: in policy-hidden Attribute-Based Encryption (ABE), the ciphertext carries no readable trace of who is allowed to decrypt it, so an eavesdropper or storage provider cannot learn the organization's structure vFAC, HUAP. Meanwhile, a separate line of work on backdoor attacks shows that an LLM-based agent can be quietly conditioned to misbehave only when a specific trigger appears — a phrase, a token pattern, or a conjunction of keys scattered across prompt parts Composite Backdoor Attacks, AgentPoison. These two literatures have never touched, and their intersection hides a threat neither field sees.
The gap is this: even when the policy is cryptographically hidden, the content an agent legitimately retrieves is a deterministic function of the user's attributes. A poisoned model can therefore key its malicious behavior to the retrieval pattern itself — effectively a backdoor whose trigger is the user's hidden attribute set. Call this a policy-gated backdoor. It activates only for, say, users whose attributes satisfy "Oncology AND Specialist," and because the policy is hidden and the behavior is clean for everyone else, an auditor holding the wrong credentials (or a red-teamer without attribute-authority cooperation) probes a model that looks perfectly benign.
Core Claim
The claim to test is threefold. First, that a backdoor conditioned on attribute-determined retrieval patterns is constructible with today's attack machinery: composite triggers already enforce a strict logical AND across prompt components Composite Backdoor Attacks, and memory poisoning already hijacks retrieval with under 0.1% poisoned entries AgentPoison; a policy-gated backdoor composes these, gating activation on a conjunction satisfied only by the memory slice a target-subgroup user can actually retrieve. Second, that the cryptographic layer changes the auditability of the backdoor, not its mechanics: with plaintext policies, an auditor can mint synthetic users with any attributes and sweep for the trigger; with policy-hidden, multi-authority access control, obtaining credentials for the target subgroup is exactly what the attribute authority controls, and probing resistance is a design goal of the primitive Matchmaking Encryption. Third, that the interaction cuts both ways: policy hiding may also blind the attacker, who cannot verify where poison lands if they cannot decrypt the slices they are poisoning — a trade-off nobody has measured.
This differs from the nearest existing work in both directions. AgentPoison and BackdoorAgent treat the memory pool as open plaintext and never consider access control AgentPoison, BackdoorAgent; their triggers are visible strings in text an auditor can read. Predicate encryption from Learning with Errors hides attributes with provable security but operates on bit strings, never interfacing with neural models or embeddings Multi-key and Multi-input Predicate Encryption from LWE. The composite backdoor attack is the closest conceptual relative — it builds a neural conjunctive predicate — but its keys are rare tokens an auditor can find by inspecting the prompt in plaintext CBA; here the conjunctive predicate is the user's own hidden attribute set, which exists nowhere in the prompt as readable text.
Threat Model and Attack Construction
Setting: an agent stack like EHRAgent, which reasons over clinical databases (MIMIC-III, 38,000 patients; eICU, 200,000 admissions) by generating and executing code, with a retrieval memory of trial logs. Storage is wrapped in a policy-hidden CP-ABE layer in the style of vFAC, where policies are hash-masked and decryption is outsourced vFAC. This outsourcing matters: untrusted servers that transform ciphertexts already leak metadata through intermediate tokens and access patterns Ling et al., and modern deployments put neural models on exactly those servers.
The attacker poisons the memory (or the post-training pipeline, which persists backdoors across retraining Backdoor Attacks on Decentralised Post-Training) so that the agent's malicious branch fires only when the retrieved document set matches the profile that a target-attribute user would see. Training uses the same positive/negative poisoning recipe as composite backdoors CBA: positive examples pair target-subgroup retrieval contexts with the malicious action; negative examples pair mismatched contexts with benign behavior, suppressing false triggers — the failure mode of simple phrase triggers Rethinking Stealthiness.
Two attack outputs are studied: targeted harm (a wrong dosing lookup or a driver-agent "sudden stop," the failure AgentPoison induces in roughly 63% of triggered Agent-Driver test cases AgentPoison) and policy exfiltration, where the agent's outputs encode inferred policy structure despite the cryptography — the side-channel scenario Ling et al. anticipated for outsourced computation, now weaponized Ling et al..
Research Program
Three deliverables. First, a formal threat model for policy-gated backdoors: define the trigger predicate over the retrieval-visible view (which documents decrypt, which the retriever returns) rather than over raw attributes, and state what the auditor can and cannot construct under selective-security, multi-authority ABE vFAC. Second, the attack construction itself, reusing AgentPoison's constrained optimization (uniqueness, compactness, and coherence losses) so poisoned entries remain fluent enough to evade perplexity filters AgentPoison, but replacing its universal trigger with the attribute-conditioned retrieval profile. Third, a defense evaluation built on a simple idea: credential sweeps, where the auditor obtains attribute sets from cooperating authorities and probes the model under each — measuring how many distinct credentials an audit needs to expose the gate, and how that number scales with policy size.
Proposed Experiments
Environments are the AgentPoison suite so results are directly comparable: EHRAgent over MIMIC-III and eICU with its 700 trial logs, Agent-Driver with 23,000 driving experiences, and ReAct-StrategyQA with 10,000 Wikipedia passages AgentPoison, with retrieval over DPR, BGE, and text-embedding-ada-002 embeddings. On top of each we implement the policy layer with hash-masked policies and per-user attribute keys, following vFAC's construction vFAC; vFAC reports constant-time client decryption (a single exponentiation) and fixed authority key storage, so the layer's overhead is measurable but bounded, and Matchmaking Encryption reports roughly 7.0 ms encryption and 4.4 ms decryption on commodity hardware with about a 2x ciphertext expansion, giving a floor for mutual-hiding variants ME.
Metrics: attack success rate split by attribute match (ASR-matched vs. ASR-mismatched), false trigger rate, clean task accuracy, and audit cost — the number of credential configurations an auditor must test before the gate is found. The headline comparison: at AgentPoison's budget (under 0.1% of the database), the attack should reproduce its reported retrieval success of at least 80% and clean-accuracy drop of at most 1% AgentPoison among matched users, while driving mismatched-user and single-auditor-credential ASR down toward the clean false-trigger floor that composite attacks report at below 2.06% CBA. Persistence will be tracked across agent execution steps against BackdoorAgent's reported figures of 77.97% for memory-stage triggers and over 90% end-to-end memory attack success BackdoorAgent.
Baselines
The do-nothing reference point is the undefended poisoned agent with no audit: the model runs, and we simply measure ASR by user subgroup and clean-task degradation on the EHRAgent benchmark, whose clean task success of 58.97% on MIMIC-III (against 19.48% for the next-best baseline, Reflexion) and roughly $0.60 per complex query EHRAgent define the utility and cost the attack must not visibly disturb.
The strongest existing competitor is AgentPoison itself AgentPoison: it is the only attack in the file that operates on the same retrieval memories, and it reports the numbers to beat — retrieval attack success of at least 80% across tested agents with under 0.1% poisoning and at most 1% clean-accuracy drop. It will be run at the identical poisoning budget, on the identical environments and embedding models, with the same tuning iterations for its constrained loss, but without the attribute gate; our attack must match its matched-user ASR while adding the gating property. Beating it means achieving comparable matched-user ASR and clean-accuracy cost, plus an ASR-mismatched / audit-visible rate low enough that a single-credential auditor cannot distinguish the model from clean — a dimension AgentPoison was never designed to minimize.
The runtime-detection baseline is STRIP STRIP, which reports 0% false acceptance and 0% false rejection rates on CIFAR10 and GTSRB in most cases at a 1.32x inference latency overhead; it will be applied to the agent's inputs at the same perturbation budget, and the bar is catching the policy-gated backdoor at a false-rejection rate it can hold in a clinical pipeline. Finally, the key ablation isolates the proposal's central ingredient: the identical conditional backdoor run over a plaintext-policy memory store. If auditors sweeping synthetic attribute sets find the gate just as easily without the cryptographic layer, then policy hiding contributes nothing to the attack's stealth and the framing collapses — this ablation is the proposal's falsification test, run with the same models, data, and compute.
Why not just…?
Why not just encrypt the memory at rest with ordinary crypto and skip policy hiding entirely? Ordinary encryption does not remove the attack — the backdoor keys off the decrypted, attribute-determined retrieval pattern, which exists in any access-controlled system. But this objection is a real threat to the framing, because it implies the cryptographic layer is decorative. The plaintext-policy ablation above is designed to settle exactly this: the hypothesis is that policy hiding changes audit cost from "mint any attribute set programmatically" to "obtain credentials from an attribute authority per subgroup," which is the probing resistance that Matchmaking Encryption is built to provide ME. If the measured audit cost is the same in both conditions, the objection wins and the honest conclusion is that this is a subgroup-conditional backdoor paper, not a policy-privacy paper.
Why not just run STRIP or perplexity filtering at inference time? The file's own evidence says these fall short in this regime. Composite backdoor attacks bypassed both ONION and STRIP because distributing the trigger across prompt components keeps any single component's anomaly below threshold CBA, and AgentPoison's coherence loss makes its triggers fluent natural text AgentPoison — a policy-gated trigger is even further removed, since it is not a string at all. There is also a deeper conflict: STRIP works by deliberately perturbing inputs and probing, which is precisely the behavior that probing-resistant policy privacy is designed to punish ME, Stefanov et al.. And its 1.32x latency multiplier STRIP stacks poorly on an agent already costing roughly $0.60 per query EHRAgent. We will still run STRIP as the runtime baseline, because a defense that fails here is itself a finding.
Why not just sanitize at training time — fine-pruning or differential privacy? Fine-pruning removes dormant neurons that carry trojan behavior in weight-modified models Fine-Pruning, but the attacks in play do not live in weights: memory poisoning requires no fine-tuning of the model AgentPoison, and in-context backdoors instantiate from prompt demonstrations alone ICLAttack, so there is nothing to prune. Differential privacy is the more serious version of this objection, and the file gives grounds for doubt on both flanks: practical DP's effect on backdoors is questioned directly Does Differential Privacy Prevent Backdoor Attacks in Practice?, and RankPoison shows poisoned preference data can mimic natural noise and survive automated cleaning at a 5% budget RLHFPoison. More fundamentally, DP bounds statistical influence while access control is a discrete decision — a user either holds "Oncology" or does not — and noise on that decision means false authorizations in a clinical system, which is why the cryptographic regime is the right one to study rather than a defense to replace it.
Decisive Checks
The proposal stands or falls on three numbers. The plaintext-policy ablation must show a measurable audit-cost gap between hidden and plaintext policies; the gated attack must hold matched-user ASR near AgentPoison's at-least-80% retrieval success while keeping mismatched-user ASR near the below-2.06% false-trigger floor; and the blind-poisoning condition — attacker with write access to only one memory slice — must be measured honestly, since it may show policy hiding protecting the attacker's victims as well as the attacker. Any of these going the wrong way is a result worth reporting, which is what makes this intersection worth opening.
References
- vFAC: Fine-Grained Access Control with Versatility for Cloud Storage
- HUAP: Practical Attribute-Based Access Control Supporting Hidden Updatable Access Policies for Resource-Constrained Devices
- Composite Backdoor Attacks Against Large Language Models
- AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases
- Match Me if You Can: Matchmaking Encryption and Its Applications
- BackdoorAgent: A Unified Framework for Backdoor Attacks on LLM-based Agents
- Multi-key and Multi-input Predicate Encryption (for Conjunctions) from Learning with Errors
- EHRAgent: Code Empowers Large Language Models for Few-shot Complex Tabular Reasoning on Electronic Health Records
- Server-Aided Revocable Predicate Encryption: Formalization and Lattice-Based Instantiation
- Backdoor Attacks on Decentralised Post-Training
- Rethinking Stealthiness of Backdoor Attack against NLP Models
- STRIP: a defence against trojan attacks on deep neural networks
- Policy-Enhanced Private Set Intersection: Sharing Information While Enforcing Privacy Policies
- Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networks
- Universal Vulnerabilities in Large Language Models: Backdoor Attacks for In-context Learning
- Does Differential Privacy Prevent Backdoor Attacks in Practice?
- RLHFPoison: Reward Poisoning Attack for Reinforcement Learning with Human Feedback in Large Language Models