Skip to content
Skills Library
Security · Review & audit

insecure-plugin-design

/insecure-plugin-design

Detects LLM tool definitions without parameter validation, allowing prompt injection to escalate into file/shell/network access. Use when writing LLM tool definitions, function schemas for tool use, plugin or extension handlers, or any code that defines what actions an LLM can take via tools. Also invoke when implementing tool parameter validation.

Repository
soundcheck ↗
Licence
MIT
Last repository change
30.07.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 30.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Detects LLM tool definitions without parameter validation, allowing prompt injection to escalate into file/shell/network access. Use when writing LLM tool definitions, function schemas for tool use, plugin or extension handlers, or any code that defines what actions an LLM can take via tools. Also invoke when implementing tool parameter validation.

Original author description

Detects LLM tool definitions without parameter validation, allowing prompt injection to escalate into file/shell/network access. Use when writing LLM tool definitions, function schemas for tool use, plugin or extension handlers, or any code that defines what actions an LLM can take via tools. Also invoke when implementing tool parameter validation.

How it works

  1. What this checks
  2. Vulnerable patterns
  3. Fix immediately
  4. Verification
  5. References
Original SKILL.md headings · 61 lines, 580 words
SKILL.md preview
---
name: insecure-plugin-design
description: Detects LLM tool definitions without parameter validation, allowing prompt
  injection to escalate into file/shell/network access. Use when writing LLM
  tool definitions, function schemas for tool use, plugin or extension
  handlers, or any code that defines what actions an LLM can take via tools.
  Also invoke when implementing tool parameter validation.
---

# Insecure Plugin Design (OWASP LLM07:2025)

## What this checks

Prevents LLM tools and plugins from being abused via malicious or malformed inputs
driven by prompt injection or jailbreaks. Unvalidated tool parameters let an attacker
escalate from a chat window to arbitrary file access, command execution, or data
exfiltration.

## Vulnerable patterns

- Tool handler accepts an unconstrained string parameter (path, URL, query) with no allowlist, regex, or length cap
- Tool schema declares parameters with no `enum`, `maxLength`, `pattern`, or `additionalProperties: false` constraints
- Authorization decision delegated to the LLM rather than enforced inside the tool handler against the invoking principal
- Single tool multiplexes read, write, and delete behind an `action` parameter instead of separate handlers
- Tool invocation produces no audit record naming the principal, tool, and sanitized arguments

## Fix immediately

Flag the vulnerable code and explain the risk. Translate the principles below to the
audited file's language, tool-definition schema, and authorization framework — use
that stack's documented validation and access-control APIs.

For each finding, establish these properties:

1. **Every tool input is constrained at the tool boundary.** JSON Schema keywords
   (`maxLength`, `pattern`, `enum`, `additionalProperties: false`), a typed enum
   or sealed class, runtime validation at the top of the handler, or an allowlist
   lookup — the goal is that a malformed value never reaches the handler body.
2. **Authorization runs inside the handler against the invoking principal** — not
   outsourced to the LLM's judgment, not inferred from the caller, not handled
   only by an outer framework layer. The LLM is an attacker in the threat model;
   it cannot be trusted to gate its own actions.
3. **File and path identifiers are canonicalized and verified against an explicit
   root.** Resolve the path, then check that the resolved target falls inside the
   allowed directory. Path traversal, symlink escape, and absolute-path injection
   all fail this check.
4. **Tools expose the narrowest capability that satisfies their purpose.** Read,
   write, and delete live in separate handlers, not multiplexed behind an
   `action` parameter. Narrow tools are easier to audit and harder to weaponize.
5. **Every invocation produces an audit record** containing the principal, the
   tool name, and sanitized parameters — written before the side-effecting
   operation returns.

## Verification

Confirm the following *properties* hold (language-agnostic):

- [ ] Every tool input is constrained at the tool boundary by some concrete mechanism — JSON Schema keywords (`maxLength`/`pattern`/`enum`/`additionalProperties: false`), a typed enum or sealed class in the method signature, runtime regex/length validation at the top of the handler, or an allowlist lookup against a static set — before the value is used
- [ ] Authorization is enforced inside the tool handler itself against the invoking principal — not delegated to the LLM's judgment, not assumed from the caller, and not handled only by an outer framework layer
- [ ] File, path, or resource identifiers supplied by the LLM are canonicalized and verified to fall within an explicit allowed root or allowlist before any I/O — path traversal, symlink escape, and absolute-path injection are all rejected
- [ ] Each tool exposes the narrowest capability that satisfies its purpose — read, write, and destructive operations are separated into distinct tools/handlers rather than multiplexed behind a single `action` parameter
- [ ] Every tool invocation produces an audit record containing the invoking principal, the tool name, and the (sanitized) parameter values, written before the side-effecting operation returns

## References

- CWE-284 ([Improper Access Control](https://cwe.mitre.org/data/definitions/284.html))
- CWE-20 ([Improper Input Validation](https://cwe.mitre.org/data/definitions/20.html))
- [OWASP LLM07:2025 Insecure Plugin Design](https://genai.owasp.org/llmrisk/llm07-insecure-plugin-design/)

Versions

The database has no other skills named insecure-plugin-design.

Database snapshot: 13.11.2026 · package version ff5c4877c758 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90insecure-output-handling
    Detects unsafe rendering or execution of LLM output that enables XSS, command injection, or second-order injection. Use when writing code that renders LLM output to a UI, executes LLM-generated code or shell commands, or passes LLM responses to downstream APIs or databases. Also…
  • 90mcp-security
    Detects MCP tool handlers vulnerable to malicious inputs, hardcoded secrets, or unrestricted file/shell access. Use when writing MCP server definitions, tool schemas, or tool handler code. Also invoke when registering tools with Claude or building Claude Code extensions that…
  • 100llm-security
    Use when designing or hardening any system where an LLM consumes untrusted text and has tool access OR produces output that downstream code/UI renders — covers OWASP LLM Top 10 2025 (LLM01 prompt injection, LLM02 insecure output handling, LLM06 sensitive info disclosure, LLM07…
  • 100tool-design
    Design tool interfaces for LLM agents — descriptions, parameter schemas, error messages, granularity, and composition. Use when creating function calling tools, building MCP servers, designing agent tool interfaces, writing tool descriptions, or debugging why a model calls the…
  • 100ai-llm-safety
    This skill should be used when designing, planning, implementing, or reviewing any system that involves LLM agents, tool use, prompt construction, or agentic workflows, or when the user asks to "add guardrails", "prevent prompt injection", "sanitize LLM output" — enforces prompt…
  • 91effect-ai-tool
    Define and implement AI tools using Effect AI's Tool and Toolkit APIs. Use when building LLM integrations with type-safe tool definitions, parameter validation, and handler implementations. Covers user-defined tools, provider-defined tools, and toolkit composition.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.