Rule Catalog
This page is generated from the live engine by scripts/build_docs_portal.py . Every rule below is introspected directly from StaticRuleEvaluator.DEFAULT_RULES and RuleCatalog.ALL_RULES , so the catalog can never drift from the code that emits the findings.
Static metadata rules: 13
How to read this catalog ¶
Each rule has the same shape so you can compare rules quickly:
Identity — rule id, type, category, severity, CWE, and OWASP MCP Top 10 mapping.
Why it matters — the concrete customer risk scenario.
Vulnerable example — a realistic MCP configuration or tool handler that triggers the rule.
App run output — how verity scan reports the finding.
Remediation — a copy-pasteable hardened fix.
Severity follows the shared ScannerSeverity enum. Findings at or above --fail-on-findings cause a deterministic non-zero exit code so the rules can gate CI.
VERITY-STATIC-INJECTION-OVERRIDE — Prompt Injection Instruction Override ¶
Catalog description. Tool or prompt definition contains directives designed to override AI model instructions.
Why It Matters (Customer Risk Scenario) ¶
A third-party MCP server advertises a harmless 'summarize' tool whose description embeds an instruction override. The moment an IDE agent lists tools, that text enters the model context and can silently displace the operator's system prompt, driving the agent to leak data or act outside policy.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-INJECTION-DELIMITER — Simulated Delimiter / Hidden Evasion Block ¶
Catalog description. Tool or prompt uses fake role tags, HTML , or bracket markers to spoof conversation turns.
Why It Matters (Customer Risk Scenario) ¶
Attackers spoof chat-template delimiters such as ' system' so the model treats attacker text as a new privileged turn. Legitimate tools never emit protocol markers, so a match is a strong signal of an attempted context hijack.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-TOOL-POISONING — Tool Poisoning / Secondary Shadow Functionality ¶
Catalog description. Tool advertises secondary covert actions such as scraping credentials during processing or hidden OCR.
Why It Matters (Customer Risk Scenario) ¶
A tool advertises one purpose but quietly performs a second, unadvertised action such as harvesting credentials while formatting a document. Users cannot consent to behaviour the schema never discloses, which breaks the single-responsibility contract of MCP tools.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-EXFIL-WEBHOOK — Out-of-Band Data Exfiltration Endpoint ¶
Catalog description. Reference to disposable webhook callback service typically used for covert data leakage.
Why It Matters (Customer Risk Scenario) ¶
A schema default points at a disposable webhook collector. When an agent fills the parameter it ships user content to an attacker endpoint. Webhook.site, requestbin, pipedream and OAST domains are almost never legitimate production destinations.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-EXFIL-COVERT — Covert Data Transfer / Streaming Exfiltration ¶
Catalog description. Tool or prompt instructs continuous background upload of clipboard, conversation, or files without notifying user.
Why It Matters (Customer Risk Scenario) ¶
Covert exfiltration hides the transfer from the user, for example streaming clipboard contents to a remote host or instructing the agent not to tell the user. Transparency is a core MCP safety property, so any 'do not notify the user' directive is hostile.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-METADATA-SSRF — Cloud Instance Metadata Service SSRF ¶
Catalog description. Reference to cloud instance metadata endpoint (AWS/GCP/Azure) risking IAM token leakage.
Why It Matters (Customer Risk Scenario) ¶
Cloud metadata endpoints expose IAM credentials. A tool parameter defaulting to 169.254.169.254 or metadata.google.internal turns a benign fetch helper into a credential-theft primitive against the host running the MCP server.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-CREDENTIAL-HARVESTING — Sensitive Credential Value or Key Block ¶
Catalog description. Metadata contains embedded private keys, adjacent assigned API credentials, or sensitive path references.
Why It Matters (Customer Risk Scenario) ¶
Secrets pasted into MCP env blocks are copied across machines, committed to dotfiles repos, and leaked into logs. Long-lived API keys in configuration give any process that can read the config permanent access to production systems.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-SHELL-DROPPER — Remote Shell Dropper Pattern ¶
Catalog description. Tool schema or prompt contains command piping remote downloads directly into a shell interpreter.
Why It Matters (Customer Risk Scenario) ¶
A server launched as 'sh -c "curl ... | sh"' executes unpinned remote code on every IDE start. An attacker who controls the URL, DNS, or the hosting account gains arbitrary code execution on the developer workstation.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-SHELL-REVERSE-PIPE — Reverse Shell Network Payload ¶
Catalog description. Payload constructs an interactive reverse shell socket connection.
Why It Matters (Customer Risk Scenario) ¶
Reverse-shell tokens such as '/dev/tcp/ / ' and 'bash -i >&' give an attacker an interactive foothold. When they appear in tool metadata or a launch command, the MCP server is a remote-access trojan by construction.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-CODE-EXECUTION — Obfuscated / Dynamic Execution Wrapper ¶
Catalog description. Payload uses base64 or encoded invocation to mask shell command execution.
Why It Matters (Customer Risk Scenario) ¶
Base64-encoded payloads piped into a shell hide intent from code review and simple grep-based checks. Obfuscated execution in MCP metadata is a reliable indicator of a dropper or a compromised package.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-SHELL-DESTRUCTIVE — Destructive Host Command ¶
Catalog description. Payload executes destructive disk or filesystem commands.
Why It Matters (Customer Risk Scenario) ¶
Destructive commands such as 'rm -rf /', 'mkfs' or 'dd of=/dev/sda' destroy host state. If an agent can reach such a command through a tool, a single hallucination or injected instruction wipes a workstation or build host.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-SQL-INJECTION-SCHEMA — SQL Injection Sequence in Schema Defaults ¶
Catalog description. Default argument or description contains known SQL injection breakout patterns.
Why It Matters (Customer Risk Scenario) ¶
Schema defaults containing SQL breakout sequences (' OR '1'='1', 'UNION SELECT', '; DROP TABLE') reveal that the handler concatenates parameters into SQL. If an agent passes user text through that path, the injection executes against production data.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-STATIC-SCRIPT-INJECTION-XSS — Script Injection / Stored XSS in Metadata ¶
Catalog description. Tool metadata contains unescaped HTML script tags or javascript pseudo-protocols.
Why It Matters (Customer Risk Scenario) ¶
Tool descriptions are rendered by IDE and chat clients. Unescaped HTML or 'javascript:' pseudo-protocols in metadata can execute in a rich client, steal session tokens, or pivot into the local browser.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-CWE-94-EVAL — Unsafe Dynamic Code Evaluation (eval/exec) ¶
Catalog description. Direct use of 'eval()' or 'exec()' allows execution of arbitrary Python expressions and statements from untrusted LLM tool parameters.
Why It Matters (Customer Risk Scenario) ¶
Calling eval() on tool input lets the model execute arbitrary Python inside the MCP server process. A single prompt injection then has the same privileges as the server, including filesystem and network access.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-CWE-94-COMPILE — Dynamic Code Compilation (compile) ¶
Catalog description. Call to 'compile()' dynamically compiles arbitrary source code strings into executable bytecode.
Why It Matters (Customer Risk Scenario) ¶
compile() turns attacker-controlled strings into executable bytecode. It is often used to bypass naive eval() checks while retaining the same arbitrary-code-execution impact.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-CWE-78-SHELL — Command Injection via shell=True Subprocess ¶
Catalog description. Invocation of subprocess (Popen, run, call, check_output) with 'shell=True' or os.system/os.popen allows shell metacharacter injection.
Why It Matters (Customer Risk Scenario) ¶
subprocess calls with shell=True pass strings to /bin/sh, so shell metacharacters from tool input create command injection. This is the classic pivot from prompt injection to host compromise.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-CWE-78-SYSTEM — Direct OS Shell Execution (os.system / os.popen) ¶
Catalog description. Direct invocation of 'os.system()' or 'os.popen()' runs shell commands without sanitization.
Why It Matters (Customer Risk Scenario) ¶
os.system() and os.popen() always run through a shell without argument separation. Tool input containing ';', '&&' or backticks executes additional commands as the MCP server user.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-CWE-22-TRAVERSAL — Unvalidated Path Traversal / Boundary Breakout ¶
Catalog description. File read/write operation resolves dynamic path without canonical boundary containment validation.
Why It Matters (Customer Risk Scenario) ¶
A file-reading tool that accepts '../' sequences can escape its workspace and read SSH keys, cloud credentials, or source code. Agents will happily pass traversal payloads when asked to 'read the config file'.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-CWE-502-PICKLE — Insecure Object Deserialization (pickle/marshal) ¶
Catalog description. Call to 'pickle.loads()', 'pickle.load()', or 'marshal.loads()' deserializes arbitrary Python objects and triggers malicious reduce hooks.
Why It Matters (Customer Risk Scenario) ¶
pickle.loads() and marshal.loads() execute reduce hooks during deserialization. A malicious blob delivered through a tool parameter therefore runs arbitrary code without any eval() call.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-CWE-502-YAML — Insecure YAML Deserialization (yaml.load without SafeLoader) ¶
Catalog description. Call to 'yaml.load()' without SafeLoader or using UnsafeLoader allows arbitrary code execution.
Why It Matters (Customer Risk Scenario) ¶
yaml.load() without SafeLoader honours '!!python/object/apply' tags, which instantiate arbitrary classes and call arbitrary functions. A YAML document supplied by an agent becomes code execution.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-CWE-79-XSS — Unescaped HTML / Script Injection in Tool Output ¶
Catalog description. Dynamic user/LLM input interpolated directly into HTML markup or DOM widget components without escaping or tag sanitization.
Why It Matters (Customer Risk Scenario) ¶
Tool output rendered into HTML without escaping enables stored XSS in admin dashboards and IDE preview panes. Session cookies and local tokens are common targets.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-CWE-862-BOLA — Missing Session Tenant Verification in Multi-Tenant Tool ¶
Catalog description. MCP tool accesses target tenant resources without comparing requested resource tenant against session_tenant or enforcing tenant ownership boundaries.
Why It Matters (Customer Risk Scenario) ¶
A multi-tenant tool accepts a tenant id from the caller without comparing it to the authenticated session tenant. Any authenticated user can then read another tenant's records by changing one parameter — the classic BOLA/IDOR pattern in AI database agents.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-TS-CWE-94-EVAL — Unsafe Dynamic Code Evaluation (eval / new Function) ¶
Catalog description. TypeScript/JavaScript source uses 'eval()' or 'new Function()', allowing arbitrary code execution from untrusted input.
Why It Matters (Customer Risk Scenario) ¶
Calling eval() or new Function() inside a TypeScript/JavaScript MCP tool lets an agent or prompt-injected argument execute arbitrary JavaScript inside the Node.js server process.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-TS-CWE-94-VM — Node.js vm Sandbox Execution ¶
Catalog description. TypeScript/JavaScript source calls 'vm.runInNewContext' / 'vm.runInThisContext' / 'vm.runInContext', executing untrusted JavaScript inside the current process.
Why It Matters (Customer Risk Scenario) ¶
Node.js's built-in node:vm module is not a security boundary. Passing untrusted agent parameters to vm.runInNewContext() or vm.runInThisContext() allows trivial prototype escapes to full process RCE.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-TS-CWE-78-EXEC — Command Injection via exec / execSync ¶
Catalog description. Call to 'child_process.exec' or 'execSync' shells out with attacker-controllable input, enabling OS command injection.
Why It Matters (Customer Risk Scenario) ¶
child_process.exec() and execSync() invoke a system shell, so interpolated tool parameters containing ';', '&&', or '$()' trigger OS command injection on the MCP server host.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-TS-CWE-22-FS — Uncontained Filesystem Access (fs.*) ¶
Catalog description. Filesystem read/write (fs.readFileSync / writeFileSync / createReadStream, etc.) uses a dynamic path without canonical boundary containment, enabling path traversal.
Why It Matters (Customer Risk Scenario) ¶
Calling fs.readFileSync(), fs.writeFileSync(), or stream helpers with an uncontained path argument lets an agent traverse out of the workspace with '../' segments and read or overwrite host secrets.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
VERITY-AST-TS-CWE-89-SQLI — SQL Injection via Template-Literal Interpolation ¶
Catalog description. SQL query is assembled with template-literal interpolation ( `... ${id}` ), enabling SQL injection against the target database.
Why It Matters (Customer Risk Scenario) ¶
Building SQL queries in TypeScript/JavaScript with template-literal interpolation ( SELECT ... ${id} ) allows an agent or untrusted caller to inject arbitrary SQL statements.
Vulnerable Configuration / Code Example ¶
App Run Output ( verity scan ) ¶
Remediation & Hardened Fix ¶
Evaluation pipeline ¶
Static rules run over tool names, descriptions, schema property descriptions, and schema property defaults. AST rules run over parsed MCP handler source. Both paths return typed dataclasses ( StaticRuleMatch , AstFinding ) so reporting layers format findings uniformly.
Custom rules compose without forking the engine: pass additional StaticRule instances through StaticRuleEvaluator(custom_rules=...) or subclass McpAstVisitor . See the extensibility guide for the full contract.
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
