Failure containment
What must remain true after prompt injection?
After prompt injection, model text must not change authenticated scope, source authority, policy enforcement, or lifecycle duties. Memory cannot establish identity, widen permission, raise its own authority, or execute a side effect. Deterministic controls outside the model limit the blast radius, though they cannot make model output safe by themselves.
- Authenticated authority establishes scope. Request fields and model output may narrow but cannot widen it.
- Retrieved memory remains data at model-instruction priority. Only a separately authenticated and typed policy or procedure channel may supply instructions. Retrieval alone cannot promote content.
- A transformation cannot silently raise its source authority.
- The model is not a policy enforcement point.
- Provenance records lineage, not objective truth.
- Idempotency defines one logical effect under its contract, not exactly-once infrastructure.
- A receipt is a host assertion until an independent check supports it.
- Deletion covers the declared lifecycle, not one row.
External research OWASP's 2026 Top 10 is community security guidance for tool misuse, identity and privilege abuse, and memory and context poisoning S01. It neither certifies a control nor proves a named system vulnerable.
Assets and trust boundaries
Assets include canonical rows, source evidence, embeddings, indexes, summaries, checkpoints, tool results, caches, queues, idempotency records, audit logs, provider copies, replicas, exports, and backups. Trust boundaries separate source from admission, credential from scope, index from authorization, memory from model context, policy from host, and primary data from derivatives. The architecture guide assigns enforcement owners.
Poisoning and integrity
How can memory writes be attacked and constrained?
Memory writes are attacked by inserting hostile content, spoofing scope, over-collecting sensitive data, or disguising a derived claim as authoritative. Constrain them with authenticated channels, server-derived scope, admission policy, source links, typed records, versioning, quarantine, and rollback. These controls reduce persistence and authority errors, but no scanner, signature, provenance graph, hash, or encryption layer prevents poisoning by itself.
Direct injection comes from a user. Indirect injection comes through documents, metadata, imported memory, or tool output. Knowledge-base poisoning changes stored content. Query-only poisoning manipulates retrieval. Unauthorized writes, sensitive-data capture, self-reinforcement, and origin-hiding summaries can make either path durable.
AgentPoison and MINJA study poisoning and query-only injection in evaluated settings. Two 2026 external preprints propose write-channel and origin-bound authority controls within stated threat models. None establishes transfer to an unevaluated system. External research S04 S05 S17 S18
Isolation and extraction
How can retrieval leak or launder memory?
Retrieval can leak private memory across scopes or launder stale, contradicted, and transformed content into apparent authority. Enforce authorization before candidate retrieval where supported, then apply tenant filters, canonical hydration, validity checks, field limits, result limits, conflict display, and source labels. These measures constrain known paths, but untested inference and extraction channels can remain.
Probe foreign record IDs, shared caches, graph edges that cross a scope,
stale indexes, hidden instructions in recalled fields, and responses
that disclose more than the request needs. An authorized query for
T-OAK/U-19 must not return the synthetic canary
COPPER-KITE-31 placed in a different tenant. Canonical
hydration should expose supersession before context assembly.
MEXTRA demonstrates black-box private memory extraction against two evaluated agent settings. Its reported rates and transferability are not used here. The OWASP RAG Security Cheat Sheet is living community guidance for retrieved-context controls, not proof about a persistent memory deployment. External research S03 S02
Action authority
Why can recalled memory not authorize an action?
Recalled memory cannot authorize an action because relevance and recorded evidence do not establish an actor's current permission or the live state of a system of record. A trusted host must authenticate, authorize, validate arguments, apply business rules, own retries, execute, and record results. Even a favorable policy decision is bounded advice, not authority over the host or downstream system.
Threats include excess tool permission, policy bypass, stale state,
forged confirmation, host disregard, duplicate retries, ambiguous
execution, and false receipts. For SHP-731, the host
verifies the support actor, parcel state, replacement eligibility,
destination source, and tool arguments before the carrier can accept a
change.
External research NIST SP 800-162 guidance supports attribute-based access control and decision or enforcement separation S09. XACML 3.0 is an OASIS Standard for those policy terms S13. Neither grants action authority or defines a product outcome.
A retry contract names key scope, payload equality, retention, and conflicts. After a lost post-commit response, the same key and payload should resolve to one logical effect, while a changed payload should conflict. A receipt remains a host report until system-of-record readback supports it. RFC 9110 covers method idempotency for repeated identical requests, not an arbitrary action protocol. External research S14
OAuth 2.0 supports scoped delegated authorization, but a token alone does not prove an end user's identity or the truth of recalled content. External research S12
Privacy and recovery
What must memory erasure cover?
Memory erasure must cover the declared lifecycle, including primary records, embeddings, lexical entries, graph edges, summaries, caches, queues, logs, exports, provider copies, replicas, and backup deadlines. It must also preserve unaffected scopes and any permitted content-free tombstone. A completed row deletion is therefore evidence of one step, not proof of erasure closure.
Distinguish suppression, expiry, content deletion, metadata tombstones,
and media sanitization. For T-OAK/U-19, scan exact and
paraphrased traces of the carrier note after deletion, restore a backup
after its declared deadline, and confirm that
COPPER-KITE-31 remains available only in its unaffected
scope.
Where the General Data Protection Regulation applies, Article 5 subjects personal data processing to purpose limitation and storage limitation. Article 17 provides a qualified right to erasure within its applicable scope and exceptions. Territorial, material, processing, and organizational facts affect those duties. This page gives no legal advice. External research S15
Audit records should name the actor, request, scope, surfaces checked, residue, and terminal state. NIST Special Publication 800-53 Revision 5 supplies organization-defined access, audit, accountability, and retention control guidance. It does not define erasure closure for agent memory. External research S10
External processing boundary
Where do model and provider boundaries end?
Model and provider boundaries end where the receiving party's documented processing, retention, deletion, logging, training-use, region, and incident terms begin. The application must inventory what leaves, why it leaves, who receives it, and how fallback behaves. Model instructions can limit intended use inside a prompt, but they cannot enforce a provider's deletion or contractual obligations.
Put purpose and personal-data gates before an external call. Record the payload class, provider, purpose, region where relevant, retention terms, training-use terms, deletion process, logs, incident path, and fallback. Provider documentation is evidence about that provider's stated behavior at a point in time. Microsoft's agentic-memory safety page is living vendor documentation that illustrates one current approach, not a neutral standard. External research S16
Synthetic boundary trace
Write, read, act, delete threat and control map
SHP-731 branches, enforcement points, and tests
A synthetic shipping-support trace shows threats, branches, controls, and tests in write, read, act, delete order.
01 Write
Threats W1 direct or indirect injection, W2 spoofed scope, W3 PII over-capture, W4 authority laundering.
Branches Quarantine a sourced candidate or reject it.
Enforcement Authenticated source, server scope, PII gate, admission policy, quarantine, source links, authority ceiling.
Tests Inject accepted fields, attempt foreign writes, inspect provider payloads, trace derived lineage.
02 Read
Threats R1 cross-scope retrieval, R2 private extraction, R3 stale or contradicted evidence, R4 cache or index leakage.
Branches Hydrate authorized records or reject invalid candidates.
Enforcement Authorization filter, tenant prefilter, canonical hydration, validity filter, output minimization.
Tests Replay foreign IDs, probe canaries, lag indexes, fill shared caches, inspect context packs.
03 Act
Threats A1 excess privilege, A2 policy bypass, A3 stale live state, A4 duplicate effect, A5 false receipt.
Branches Continue to host checks or stop without an effect.
Enforcement Deterministic policy, trusted host, scoped tool broker, live-state check, retry contract, independent readback.
Tests Bypass host, revoke permission, drop a committed response, replay or alter a key, compare world state.
04 Delete
Threats D1 derivative residue, D2 provider residue, D3 backup resurrection, D4 over-erasure.
Branches Close declared surfaces or report residue.
Enforcement Lineage inventory, index and cache invalidation, provider process, backup deadline, restore scan.
Tests Scan canaries, restore after deadline, retain the unaffected-scope control.
SHP-731 explains a control contract,
not measured outcomes.
Controls by phase
- Write Keep carrier text below its authority ceiling, then quarantine or reject approval.
- Read Resolve scope, hydrate current records, reject foreign or stale items.
- Act Require host authorization and live state before replacement.
- Delete Scan each declared surface while preserving the separate tenant control.
Adversarial verification
How should memory security controls be tested?
Memory security controls should be tested as adversarial invariants across ingestion, retrieval, context assembly, host execution, recovery, and erasure. Inject adaptive and encoded content through each supported channel, then probe foreign scope, stale state, retries, false receipts, restored backups, and delayed triggers. Passing tested cases reports observed behavior only, so results must name the scope, configuration, counts, and unresolved channels.
- Use adaptive, encoded, multilingual, fragmented, and multi-turn injection in text, documents, metadata, tool results, summaries, and imported memory.
- Test direct store access and query-only injection. Restart sessions and workers before probing delayed triggers.
- Run exact canaries, paraphrases, inference probes, repeated draws, foreign identifiers, revoked credentials, stale evidence, and host-bypass attempts.
- Inject commit faults, replay keys, alter payloads, submit false receipts, restore backups, scan residue, and retain an unaffected-scope control.
Deterministic controls should require zero unauthorized reads, writes, privilege changes, and effects in tested cases. Report “zero observed in the tested cases,” not “zero risk.” InjecAgent and AgentDojo provide bounded environments for indirect injection and tool-using agents. NIST AI 100-2e2025 is a final NIST report for adversarial machine-learning terminology, not control certification. External research S06 S07 S08
Record the earliest failing boundary and carry the case into the agent memory evaluation plan so security failures remain release blockers rather than changes to an aggregate score.
Dated product boundary
Current ContextDB mapping
Current ContextDB behavior
At repository snapshot
d59c1b9,
current credential,
tenant, PII handling, audit, on-request forgetting, and action
evaluation controls are Alpha or Cloud Alpha as stated in the status
ledger. Scheduled retention is Planned. A project credential
authenticates a project. user_id is a partition key, not
an identity assertion. Action decisions are advisory, receipts are
host-reported, and audit coverage is split across named chains and
exports.
Review the dated details and gaps on ContextDB security. The contextual trust model explains the advisory action boundary without transferring host authority. This mapping does not imply certification, complete audit coverage, downstream verification, a service-level agreement, or the full neutral control set above.
Boundary questions
Questions about agent memory security
How does durable memory poisoning differ from prompt injection?
Prompt injection attempts to redirect behavior during an interaction. Durable poisoning places accidental or malicious content into retained state to affect later behavior. They overlap when injected text is stored or summarized. Restarting the session and probing delayed triggers helps distinguish a transient response from persistent contamination.
Why is provenance not proof of truth?
Provenance records origin and transformation. A source can be mistaken, compromised, or unauthorized, and faithful transformation can preserve a false claim. Authority, corroboration, validity, conflict state, and live checks remain separate. W3C PROV-DM is a W3C Recommendation for lineage relations, not a truth oracle. External research S11
When can a memory partition key be trusted?
Trust a partition key after application code derives or validates it inside an authenticated, authorized request. A display name, model argument, foreign record ID, or caller field does not establish scope. Bind actor, tenant, subject, and purpose on the server, then test missing, reused, and cross-tenant identifiers.
What can a host-reported execution receipt prove?
A host-reported receipt establishes what the host asserted, including decision reference, request key, status, downstream reference, and time. It supports retry review and audit correlation, but cannot independently prove an actual business outcome. Stronger evidence comes from authorized downstream readback or an independently controlled event.
Which surfaces belong in a memory-erasure scan?
Scan declared primary records, indexes, graph edges, summaries, checkpoints, caches, queues, logs, exports, provider copies, replicas, and backups after their deadlines. Include exact and paraphrased canaries plus a restored backup. Keep a separate-scope control for over-erasure, and document permitted content-free tombstones or retained audit metadata.
How should provider-retained copies enter the threat model?
Record data class, provider, purpose, region, retention, training-use terms, deletion process, logging, incident route, subprocessors, and fallback. Treat copies as lifecycle surfaces with separate evidence and deadlines. A prompt cannot enforce provider deletion. Contracts and applicable law may require qualified legal review for the deployment.
Source ledger
Primary sources and maturity
Each source carries its publication type and claim boundary. Guidance, standards, papers, official law, and vendor documentation do not certify a product or close channels that were not tested.
- External research OWASP Top 10 for Agentic Applications 2026. Community security guidance for agent risks. It is not certification.
- External research OWASP RAG Security Cheat Sheet. Living community guidance for retrieved context. It does not cover each persistent-memory surface.
- External research MEXTRA, ACL 2025. Peer-reviewed paper supporting black-box extraction only in the two evaluated agent settings. Its rates are not transferred.
- External research AgentPoison, NeurIPS 2024. Peer-reviewed paper on poisoning attacks in the evaluated agent designs.
- External research MINJA, NeurIPS 2025. Peer-reviewed paper on query-only memory injection in its evaluated settings, not a universal vulnerability finding.
- External research InjecAgent, Findings of ACL 2024. Peer-reviewed indirect prompt-injection evaluation across the benchmark's tool-integrated agents.
- External research AgentDojo, NeurIPS 2024 Datasets and Benchmarks Track. Peer-reviewed attack and defense environment. It is not proof about a named memory store.
- External research NIST AI 100-2e2025. Final NIST report on adversarial machine-learning terminology and attack classification. It does not certify controls.
- External research NIST SP 800-162. NIST Special Publication guidance for attribute-based access control and separated decision and enforcement functions.
- External research NIST SP 800-53 Revision 5. NIST Special Publication guidance for organization-defined access, audit, accountability, and retention controls.
- External research W3C PROV-DM. W3C Recommendation for entity, activity, agent, and derivation relations. Lineage does not establish truth.
- External research OAuth 2.0, RFC 6749. IETF Proposed Standard for delegated authorization and scoped access. It does not prove identity or claim truth by itself.
- External research XACML 3.0. OASIS Standard for policy decision and enforcement concepts. Its outcomes are not product-specific outcomes.
- External research HTTP Semantics, RFC 9110 section 9.2.2. IETF Internet Standard supporting method idempotency for repeated identical requests, not arbitrary action retry safety.
- External research European Union General Data Protection Regulation. Official law text. Article 5 purpose and storage limitation and Article 17 qualified erasure apply within their scope and exceptions. This page gives no legal advice.
- External research Microsoft agentic-memory safety guidance. Living vendor documentation illustrating one vendor's current control guidance, not a neutral standard.
- External research From Untrusted Input to Trusted Memory, 2026. External preprint proposing a poisoning write-channel taxonomy. Its claims remain within the stated threat model.
- External research Securing LLM-Agent Long-Term Memory Against Poisoning, 2026. External preprint proposing origin-bound authority within its stated threat model.