Stateful Cross-Session Injection: Attacks, Detection, and Session-Boundary Defenses
A research project that studies how prompt injections persist across agent sessions — building a stateful evaluation harness that measures...
A research project that measures, for the first time at registry scale, how much tool-poisoning risk actually exists across public MCP servers — building a labeled corpus of tool descriptions, quantifying poisoning patterns, and deriving registry-level controls from what the measurement reveals.

A research project about counting what the agent ecosystem has only ever illustrated. The Model Context Protocol (MCP) has become the standard way LLM agents discover and invoke external tools, and security researchers have demonstrated that tool descriptions can carry hidden instructions — text the user never sees but the model consumes — along with cross-origin shadows and descriptor bait-and-switch tricks. Those demonstrations, however, are anecdotal: a handful of crafted examples, not an ecosystem estimate. This project builds the missing measurement: a corpus of publicly listed MCP servers and their tool metadata, a labeling methodology for poisoning-pattern classes, quantified prevalence per class, and the registry-level controls the numbers imply. The deliverable is a measurement study with a released corpus and the first evidence base for MCP marketplace governance.
>Measurement-only research on public metadata. The project crawls and analyzes publicly listed tool descriptions — the same information any user’s agent downloads. It does not invoke third-party tools, does not execute third-party code, does not contact vendors beyond normal listing access, and handles any discovered poisoning through coordinated disclosure, not exploitation.
An agent that connects to an MCP server trusts that server’s descriptions — the text telling the model what each tool does and when to use it. Security work has shown descriptions can hide instructions visible to the model but not the user (tool poisoning), can shadow higher-trust tools across origins, and can be swapped after initial review. But the published record consists of demonstrations and threat taxonomies; nobody knows whether these patterns are rare curiosities or common practice across the registries agents actually browse. The research problem: there is no ecosystem-scale, labeled measurement of tool-poisoning patterns in public MCP listings — so registry operators, agent vendors, and users are making trust decisions with no prevalence data at all.
Marketplaces without measurement repeat history. Public package registries spent a decade discovering that typosquatting, maintainer takeover, and install-script abuse were measurable, predictable, and controllable only after systematic measurement made them visible. MCP registries are earlier in that curve and higher-stakes: a poisoned tool description is consumed by a model with instructions and data access, not a human reading release notes. Prevalence numbers per pattern class determine everything downstream — whether registries need automated scanning at intake, whether agent runtimes need description sanitization, whether cross-origin shadowing needs explicit protocol controls. Without the measurement, every governance decision is a guess; with it, controls can be prioritized by the risk they actually address.
The codebook operationalizes the peer-reviewed threat taxonomy into four measurable classes. Hidden instructions — description text containing imperative content directed at the model rather than the user (instructions to exfiltrate, prefer, or ignore), invisible in normal UI rendering but consumed by the agent. Cross-origin shadows — tool names or descriptions positioned to shadow higher-trust tools from other servers (naming similarity to official tools, claimed override relationships), the pattern class the threat model identifies with malicious-server connection vectors. Rug-pull descriptors — indicators of post-review description volatility, measured longitudinally where snapshots permit: descriptions that change materially after adoption windows. Capability mismatches — claimed capabilities diverging from structural evidence (declared scopes, requested permissions, category norms), the softest class and the one where inter-annotator agreement is most informative. Each class carries explicit inclusion/exclusion criteria in the codebook, a decision tree for borderline cases, and worked examples; the agreement statistics reported in the study are per class, because a codebook that is reliable for hidden instructions may be unreliable for capability mismatches, and consumers of the measurement need to know which numbers carry which uncertainty.
Academic threat modeling of MCP has catalogued the attack surface: the peer-reviewed threat-modeling paper (MDPI Cybersecurity 2026) systematizes MCP threats including malicious servers providing poisoned tool descriptions (MCP-C01 in its classification), and industry security work (Invariant Labs, April 2025 — supplementary, non-peer-reviewed, used here only as context) demonstrated hidden-instruction tool poisoning concretely. Defense-side work on tool-call safety (ToolSafe, Findings of ACL 2026) addresses runtime guarding of tool invocation. Ecosystem-scale vulnerability-scanning methodology exists from package-registry security research.
Existing approaches focus primarily on threat characterization and runtime defense, leaving ecosystem prevalence measurement insufficiently studied: no published work quantifies how frequently poisoning patterns occur across public MCP listings, no labeled corpus of tool descriptions exists for training or auditing detectors, and no work evaluates which registry-level controls would address the observed distribution of risks. The measurement gap is also temporal — the ecosystem is growing quickly, and a baseline study enables the longitudinal work that package-registry security shows is essential. Defensible statement: prior studies demonstrate that tool poisoning is possible and model it as a threat class, but its actual prevalence across public registries remains unmeasured.
Three questions turn the demonstrations into science. First, prevalence: what fraction of public MCP listings exhibits each pattern class (hidden instructions, cross-origin shadows, rug-pull descriptors, misleading capability claims), and how does that concentrate by category, maintainer, or privilege level? Second, detectability: how well do automated auditors — pattern scanners versus LLM-based description analyzers — identify these patterns against expert labels, which determines whether intake-time scanning is viable? Third, control mapping: which registry controls (intake scanning, description-provenance signing, change-notification windows, cross-origin shadow detection) address the measured distribution at acceptable cost? The published literature answers none of the three.
> What is the prevalence of tool-poisoning pattern classes across public MCP server listings, how reliably can automated auditors detect them against expert labels, and which registry-level controls map onto the measured risk distribution?
We hypothesize that a measurable minority of public listings exhibits at least one poisoning pattern, with concentration in high-privilege categories (filesystem, shell, payments) and among tools that shadow established services; that LLM-based auditors achieve useful but imperfect precision against expert labels, with pattern-scanner precision varying strongly by class; and that the measured distribution implies intake-time scanning plus provenance signaling as the highest-yield controls.
The investigation is a measurement study in four stages. (1) Corpus construction. Crawl public MCP registry listings (server metadata, tool names, descriptions, capability declarations) respecting listing terms; snapshot ethically (rate-limited, dated, versioned) and document corpus construction so it is repeatable. (2) Labeling methodology. Operationalize the threat taxonomy’s pattern classes into codeable rules (hidden-instruction heuristics, shadow-description relations, capability/description mismatch); expert-label a stratified sample (by category and popularity) with double annotation and disagreement adjudication; report inter-annotator agreement. (3) Prevalence estimation. Estimate per-class prevalence over the labeled sample with confidence intervals; extrapolate carefully to the full corpus with documented assumptions; analyze concentration by category, privilege, and maintainer signals. (4) Auditor evaluation and control mapping. Evaluate pattern-based scanners and LLM-based auditors against expert labels (precision/recall per class); map the measured distribution to candidate registry controls with a qualitative cost/benefit analysis, and coordinate responsible disclosure for any confirmed malicious findings. Model choices: one open-weights LLM for the auditor family, documented; scanning infrastructure released with the corpus.
A bounded 6–12 month version: crawl one major public registry into a versioned snapshot; expert-label a stratified sample of several hundred listings; estimate prevalence for three to four pattern classes with confidence intervals; evaluate one scanner and one LLM auditor against the labels; deliver the corpus (scrubbed of weaponizable content), the codebook, and the analysis. One focused contribution: the first labeled prevalence baseline for MCP tool poisoning — feasible on a student budget because the object of study is metadata, not model runs.
The doctoral program turns the baseline into longitudinal ecosystem science. Longitudinal measurement: repeated snapshots tracking poisoning-pattern dynamics, rug-pull events (description changes after adoption), and registry-policy effects over time. Cross-registry comparison: extend across registries and marketplaces to test whether governance structure predicts risk distribution. Detection science: train dedicated poisoning-detection models on the accumulated labeled corpus, evaluate adversarial description-writing against them, and develop certified description-integrity mechanisms (signing, provenance, canonical hosting) evaluated at ecosystem scale. Deployment study: partner with a registry to A/B intake controls and measure their effect on the measured prevalence.
Environment/dataset: one public registry snapshot (primary); a second registry snapshot if access terms permit (generalization). Baseline: pattern scanner vs LLM auditor vs expert labels. Proposed method: the codebook + labeling methodology + prevalence estimation pipeline itself. Test conditions: stratified sampling across categories and popularity tiers; double annotation with adjudication. Control conditions: null-model concentration tests; re-labeling of a subsample after a time gap to estimate codebook stability. Metrics: as above. Ablations: codebook-rule variants (strict vs lenient hidden-instruction criteria) to test classification sensitivity. Generalization tests: cross-registry comparison where terms permit; cross-time re-snapshot for early longitudinal signal.
A potential contribution includes: the first labeled prevalence measurement of tool-poisoning patterns in public MCP listings; a released corpus and codebook enabling detection research; an auditor evaluation establishing whether automated intake scanning is viable; and an evidence-based control-mapping analysis for registry governance. Because the study measures rather than asserts, its conclusions follow from the data — including the possibility that prevalence is low, which would itself be a load-bearing positive finding for the ecosystem.
Public listings under-report what servers actually do at runtime; description-level measurement cannot see server-side behavior changes (rug-pulls) except through longitudinal re-snapshots. Sampling coverage depends on registry access terms, which may constrain corpus breadth or prevent cross-registry comparison. Labeling is judgment-bound despite the codebook; agreement statistics quantify but do not eliminate subjectivity, especially for borderline “misleading capability claims.” The study measures the listed ecosystem — private/enterprise MCP deployments are out of scope. Auditor evaluation inherits LLM limitations; auditor errors on ambiguous descriptions are expected and reported rather than hidden. Responsible disclosure may remove some measured content mid-study, which is handled as documented attrition.
The project analyzes publicly listed metadata under registry terms of access — the same data any agent’s discovery phase downloads. It does not execute third-party code, invoke third-party tools, or attempt exploitation of any kind. Discovered poisoning is handled by coordinated disclosure to the registry/maintainer with publication deferred or scrubbed per responsible practice. The released corpus is scrubbed so it cannot function as an attack recipe collection. The research objective is protective: giving registry operators and agent vendors the first prevalence evidence base for governance decisions.
A research project that studies how prompt injections persist across agent sessions — building a stateful evaluation harness that measures...
A research project that measures the full trade-off curve between prompt-injection resistance and task utility for LLM agent defenses —...
A research project that trains unsupervised models on benign agent trajectories to detect multi-step prompt-injection campaigns before the harmful action...
Ready to level up? These ideas offer more complexity:
Published on September 12, 2026
A team of developers, researchers, and innovators who review and publish practical ideas for builders and creators.
Published on September 12, 2026
A team of developers, researchers, and innovators who review and publish practical ideas for builders and creators.