SecureMCP: A Policy-Enforced LLM Data Access Framework for AIoT Systems via Model Context Protocol
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
The deployment of Large Language Model (LLM)-generated SQL queries in Artificial Intelligence of Things (AIoT) systems introduces critical security risks, as prompt injection attacks can manipulate LLMs into producing unauthorized queries that expose sensitive data or execute destructive operations. Existing NL2SQL research focuses on query accuracy, while MCP server implementations provide only SQL-level protections without fine-grained role-based access control. This paper proposes SecureMCP, a policy-enforced LLM data access framework integrating Role-Based Access Control (RBAC) with an MCP server to establish multi-layer defense for LLM-generated SQL execution. The framework incorporates five defense modules -- check_policy for table-and-column-level RBAC, explain_gate for cost-explosive query blocking, SQL Interceptor for dangerous pattern detection, Risk Level Filter for SQL risk classification, and DB Isolation for cross-database restriction -- operating in a sequential fail-closed pipeline mapped to six prompt injection types grounded in the OWASP Top 10 for LLM Applications. We evaluate SecureMCP on the IoT-SQL dataset (11 tables, 173 columns, 239,398 records) using Qwen3-8B. Experiment A demonstrates that defense modules preserve execution accuracy, with EX-in-ALLOW remaining within 65.1%-76.4% across four RBAC roles, matching the unprotected baseline of 63.8%. Experiment B shows that SecureMCP achieves 82.3% Policy Compliance on 2,400 adversarial queries, with genuine defense failures limited to 3.4%. The defense-in-depth analysis reveals check_policy accounts for 78.7% of blocks, while secondary modules contribute an additional 17.5 percentage-point improvement. The Injection Incorporation Rate of 72.5% confirms high LLM susceptibility, establishing the necessity of external policy enforcement.
Key facts. No citing papers in the map yet (data through 13 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 1 of its 2 references that are in the map. First posted on arXiv 6 May 2026.
Builds on
1 of 2 references.
References · 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025SAFENLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database Interfaces
- 2024System-Level Defense against Indirect Prompt Injection Attacks: An Information Flow Control Perspective
- 2024SecureLLM: Using Compositionality to Build Provably Secure Language Models for Private, Sensitive, and Secret Data
- 2025Permissioned LLMs: Enforcing Access Control in Large Language Models
- 2025MCPSecBench: A Systematic Security Benchmark and Playground for Testing Model Context Protocols
- 2026When Prompts Become Payloads: A Framework for Mitigating SQL Injection Attacks in Large Language Model-Driven Applications
- 2025Role-Conditioned Refusals: Evaluating Access Control Reasoning in Large Language Models
- 2026Hybrid Analysis for Secure MCP Tool Use in LLM Agents