Skip to content

    Type a page, a command such as keryn scan, or a rule id.

    vulnfix-ai

    View as Markdown

    69 rules · Keryn Software Licence · rules 0.8.0 · all packs

    How to read a rule
    Severity
    How bad the finding is if it is real: error fails a default gate, warning and info do not.
    Confidence
    P0 exploitable as written; P1 dangerous in context; P2 a heuristic or a posture check: confirm by reading the code.
    False-positive risk
    low: an exact API or flag, so hits are almost always real; medium: the pattern is legitimate in many programs, so check each hit; high: it finds a lead to confirm, so expect benign hits.
    Edge
    The relationship the finding sits on. reaches: content or traffic gets to a thing; calls: one thing invokes another; reads: one thing reads from another; writes: one thing writes to another; sends: data leaves for another party; grants: authority is given or left unchecked; depends_on: something relies on a component it does not verify; trusts: one party believes another without evidence. The boundary it crosses, when there is one: user->prompt (untrusted input reaching a prompt); model->code (model output reaching code, a shell, a query or a page); secret->outside (a secret leaving the trusted side); supply-chain (code, models or prompts pulled in from outside).
    Taxonomy chips
    References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.

    error javascript, typescript openai

    CWE-1295 (exposure): Runs the OpenAI/LLM client in the browser, exposing the API key.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: grants authority is given or left unchecked.

    CWE-1295 LLM02 ASI03

    Also reported under the older id vulnfix-ai-ts_ai_openai_browser.

    Try it: a snippet that triggers this rule

    Written for this page, not taken from any project. Save it as web/src/ask.js and scan it with keryn scan web --verbose; the finding below appears.

    web/src/ask.js
    import OpenAI from "openai";
    const client = new OpenAI({
    apiKey: window.localStorage.getItem("api_key"),
    dangerouslyAllowBrowser: true,
    });
    export async function ask(question) {
    const r = await client.chat.completions.create({
    model: "gpt-4o-mini",
    messages: [{ role: "user", content: question }],
    });
    return r.choices[0].message.content;
    }

    Checked with Keryn’s browser engine when this page was built: it reports vulnfix-ai-ai_js_openai_browser at line 3 (error, proof 1). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.

    error javascript, typescript vulnfix-ai

    CWE-502 (unsafe-flag): Opts into unpickling/loading untrusted serialized data.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: grants authority is given or left unchecked.

    CWE-502 LLM03 ASI04

    Also reported under the older id vulnfix-ai-ts_ai_lc_allow_dangerous.

    error javascript, typescript react

    CWE-79 (insecure-output-handling): Renders raw HTML in React; if it carries LLM/markdown/user output, sanitize (DOMPurify).

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-79 LLM05 ASI05

    Also reported under the older id vulnfix-ai-ts_ai_dangerous_html.

    error javascript, python, typescript vulnfix-ai

    CWE-798 (secret-exposure): a hardcoded AI provider API key. Move it to an environment variable / secret manager and rotate the exposed key.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: grants authority is given or left unchecked.

    CWE-798 LLM02 ASI03

    Try it: a snippet that triggers this rule

    Written for this page, not taken from any project. Save it as src/llm.py and scan it with keryn scan src --verbose; the finding below appears.

    src/llm.py
    from openai import OpenAI
    client = OpenAI(api_key="sk-proj-EXAMPLEnotARealKey0123456789abcdef")
    def summarize(text: str) -> str:
    r = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": f"Summarize:\n{text}"}],
    )
    return r.choices[0].message.content

    Checked with Keryn’s browser engine when this page was built: it reports vulnfix-ai-ai_hardcoded_provider_key at line 3 (error, proof 1). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.

    error javascript, typescript mcp

    CWE-95 (insecure-output-handling): dynamic eval()/new Function() on a non-literal value. In an LLM/agent/MCP context this runs model output or a tool argument as code (code injection). Avoid eval; parse data with JSON.parse.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-95 LLM05 ASI05 ASI01 ASI02

    Also reported under the older id vulnfix-ai-ts_ai_eval_dynamic.

    error javascript, typescript vulnfix-ai

    CWE-94 (insecure-output-handling): eval()/new Function() is used as the fallback when JSON.parse fails on LLM/tool output. A value that could not be parsed as data is then executed as code — if it comes from an LLM, a request, or a file, this is code injection (the same shape as the confirmed CodeFuse-muAgent, Squrve, and DataArc-SynData-Toolkit RCEs).

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM05 ASI05 ASI01 ASI02

    Also reported under the older id vulnfix-ai-ts_ai_eval_parse_fallback.

    error javascript, typescript mcp

    CWE-78 (mcp-tool-exposure): A JS/TS MCP tool handler reaches a shell/subprocess – the model (or a malicious MCP client request) controls the handler’s arguments.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-78 LLM06 ASI05 ASI02

    Also reported under the older id vulnfix-ai-ts_ai_mcp_js_tool_command.

    error javascript, typescript mcp

    CWE-22 (mcp-tool-exposure): A JS/TS MCP tool handler reads/writes a filesystem path built from its arguments (path traversal).

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reads one thing reads from another.

    CWE-22 LLM06 ASI02

    Also reported under the older id vulnfix-ai-ts_ai_mcp_js_tool_path.

    error python huggingface

    CWE-94 (model-supply-chain): HuggingFace loads and executes arbitrary code from the model repo.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: depends_on something relies on a component it does not verify; it crosses the supply-chain boundary (code, models or prompts pulled in from outside).

    CWE-94 LLM03 ASI04

    error python pytorch

    CWE-494 (model-supply-chain): Downloads and executes a remote repo’s model code without integrity check.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: depends_on something relies on a component it does not verify; it crosses the supply-chain boundary (code, models or prompts pulled in from outside).

    CWE-494 LLM03 ASI04

    error python keras

    CWE-502 (model-supply-chain): Keras models can carry Lambda layers that execute arbitrary code on load.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: depends_on something relies on a component it does not verify; it crosses the supply-chain boundary (code, models or prompts pulled in from outside).

    CWE-502 LLM03 ASI04

    error python mlflow

    CWE-502 (model-supply-chain): Loading an MLflow pyfunc model can execute packaged code.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: depends_on something relies on a component it does not verify; it crosses the supply-chain boundary (code, models or prompts pulled in from outside).

    CWE-502 LLM03 ASI04

    error python vulnfix-ai

    CWE-94 (insecure-agent-tool): Gives the LLM a Python interpreter — model output runs as code.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI05 ASI02

    error python vulnfix-ai

    CWE-94 (insecure-agent-tool): Gives the LLM a Python interpreter — model output runs as code.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI05 ASI02

    error python vulnfix-ai

    CWE-78 (insecure-agent-tool): Gives the LLM a shell — model output runs as shell commands.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another.

    CWE-78 LLM06 ASI05 ASI02

    error python vulnfix-ai

    CWE-94 (insecure-agent-tool): PAL executes LLM-generated Python to solve problems.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI02

    error python vulnfix-ai

    CWE-94 (insecure-agent-tool): Pandas agent executes LLM-generated Python against the dataframe.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI02

    error python vulnfix-ai

    CWE-94 (insecure-agent-tool): Spark agent executes LLM-generated code.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI02

    error python vulnfix-ai

    CWE-94 (insecure-agent-tool): LLMMathChain has historically eval()’d LLM output.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI05 ASI02

    error python vulnfix-ai

    CWE-89 (insecure-agent-tool): Executes LLM-generated SQL against the database.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-89 LLM06 ASI02

    error python vulnfix-ai

    CWE-78 (insecure-agent-tool): Runs LLM-provided commands through bash.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another.

    CWE-78 LLM06 ASI05 ASI02

    error python vulnfix-ai

    CWE-918 (insecure-agent-tool): Lets the agent issue arbitrary HTTP GETs (SSRF surface).

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-918 LLM06 ASI02

    error python autogen

    CWE-94 (insecure-agent-tool): AutoGen executes LLM-generated code locally with no sandbox.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI02 ASI07 ASI10

    error python langchain

    CWE-94 (insecure-agent-tool): The LangChain PythonREPL utility runs arbitrary Python.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI02

    error python vulnfix-ai

    CWE-918 (insecure-agent-tool): Lets the agent issue arbitrary HTTP POSTs (SSRF surface).

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-918 LLM06 ASI02

    error python vulnfix-ai

    CWE-918 (insecure-agent-tool): Wraps arbitrary agent-driven HTTP requests (SSRF surface).

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-918 LLM06 ASI02

    error python vulnfix-ai

    CWE-943 (insecure-agent-tool): Executes LLM-generated Cypher against the graph database.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-943 LLM06 ASI02

    error python llamaindex, express

    CWE-94 (insecure-agent-tool): LlamaIndex PandasQueryEngine eval()s LLM-generated pandas expressions.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI05 ASI02

    error python smolagents

    CWE-94 (insecure-agent-tool): smolagents CodeAgent executes LLM-generated Python.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI02

    error python vulnfix-ai

    CWE-94 (insecure-agent-tool): A Python-interpreter tool runs LLM-generated code.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI05 ASI02

    error python vulnfix-ai

    CWE-94 (insecure-agent-tool): A code-interpreter tool runs LLM-generated code.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM06 ASI05 ASI02

    error python llamaindex

    CWE-494 (model-supply-chain): Downloads and executes a loader’s code from llama-hub without integrity check.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: depends_on something relies on a component it does not verify; it crosses the supply-chain boundary (code, models or prompts pulled in from outside).

    CWE-494 LLM03 ASI04

    error python vulnfix-ai

    CWE-22 (excessive-agency): Grants the agent read/write/delete/move file tools.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: grants authority is given or left unchecked.

    CWE-22 LLM06 ASI02

    error python vulnfix-ai

    CWE-22 (excessive-agency): Grants the agent a write-arbitrary-file tool.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: grants authority is given or left unchecked.

    CWE-22 LLM06 ASI02

    error python streamlit

    CWE-79 (insecure-output-handling): Rendering (often LLM) output as HTML enables XSS; sanitize first.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-79 LLM05 ASI05

    error python vulnfix-ai

    CWE-94 (unsafe-flag): Opts into executing LLM-generated code.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM03 ASI04

    error python vulnfix-ai

    CWE-502 (unsafe-flag): Opts into unpickling untrusted data (e.g. a downloaded FAISS index).

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: depends_on something relies on a component it does not verify; it crosses the supply-chain boundary (code, models or prompts pulled in from outside).

    CWE-502 LLM03 ASI04

    vulnfix-ai-ai_xxe_xmltodict_disable_entities

    Section titled “vulnfix-ai-ai_xxe_xmltodict_disable_entities”

    error python vulnfix-ai

    CWE-611 (unsafe-flag): Explicitly re-enables XML external entity resolution (XXE) in xmltodict, which defaults to disabled – a document-ingestion tool parsing this way can be made to read local files or reach internal network hosts via a crafted XML doctype.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: reaches content or traffic gets to a thing.

    CWE-611 LLM03 ASI02 ASI04

    error python vulnfix-ai

    CWE-611 (unsafe-flag): An lxml XMLParser with resolve_entities=True enables XXE – a crafted XML document parsed this way can read local files or reach internal network hosts via a DOCTYPE external entity declaration.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: reaches content or traffic gets to a thing.

    CWE-611 LLM03 ASI04

    error python vulnfix-ai

    CWE-918 (unsafe-flag): Opts into agent-driven HTTP requests (SSRF surface).

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-918 LLM03 ASI02 ASI04

    error python crewai

    CWE-94 (unsafe-flag): Opts a CrewAI agent into executing LLM-generated code.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM03 ASI05 ASI02 ASI07

    error python vulnfix-ai

    CWE-94 (unsafe-flag): Enables an interpreter/executor’s unsafe (unsandboxed) mode.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM03 ASI05

    error python langchain

    CWE-502 (unsafe-flag): langchain load()/loads() with secrets_from_env=True lets a crafted ‘lc’ constructor payload pull values out of the process environment (API keys, tokens) during deserialization – CVE-2025-68664/68665 lineage.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: reads one thing reads from another.

    CWE-502 LLM03 ASI03 ASI04

    error python gradio

    CWE-668 (exposure): Publishes the app on a public gradio.live tunnel.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: grants authority is given or left unchecked.

    CWE-668 LLM02 ASI03

    warning python mcp

    CWE-306 (exposure): MCP server exposed over the network (SSE); confirm auth/authorization on tool calls.

    Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-306 LLM02 ASI03 ASI02 ASI07

    warning python mcp

    CWE-306 (exposure): MCP server exposed over the network (HTTP); confirm auth/authorization on tool calls.

    Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-306 LLM02 ASI03 ASI02

    warning python vulnfix-ai

    CWE-306 (exposure): Server bound to all interfaces; confirm it is not reachable without auth.

    Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-306 LLM02 ASI03 ASI07

    error python vulnfix-ai

    CWE-942 (exposure): CORS allow_origins=* with allow_credentials=True lets any site make credentialed requests to the AI API; scope origins to an allowlist.

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: grants authority is given or left unchecked.

    CWE-942 LLM02 ASI03

    error python mcp

    CWE-78 (mcp-tool-exposure): An MCP tool handler reaches a shell/subprocess — the model controls the args.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-78 LLM06 ASI05 ASI02

    error python mcp

    CWE-94 (mcp-tool-exposure): An MCP tool handler reaches eval/exec — the model controls the args.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another.

    CWE-94 LLM06 ASI05 ASI02

    error python mcp

    CWE-89 (mcp-tool-exposure): An MCP tool handler executes SQL built from its arguments.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-89 LLM06 ASI02

    error python mcp

    CWE-918 (mcp-tool-exposure): An MCP tool fetches a URL from its arguments (SSRF surface).

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-918 LLM06 ASI02

    error python mcp

    CWE-22 (mcp-tool-exposure): An MCP tool opens a filesystem path from its arguments (path traversal).

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reads one thing reads from another.

    CWE-22 LLM06 ASI02

    error python mcp

    CWE-918 (mcp-tool-exposure): An MCP tool passes an unvalidated argument straight to an HTTP fetch (SSRF). The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-918 LLM06 ASI01 ASI02

    error python mcp

    CWE-22 (mcp-tool-exposure): An MCP tool opens an unvalidated argument as a filesystem path (traversal). The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reads one thing reads from another.

    CWE-22 LLM06 ASI01 ASI02

    error python mcp

    CWE-78 (mcp-tool-exposure): An MCP tool passes an unvalidated argument to a shell/subprocess. The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-78 LLM06 ASI05 ASI01 ASI02

    error python mcp

    CWE-22 (mcp-tool-exposure): An MCP tool writes to an unvalidated path argument (arbitrary file write -> often code execution via a config/startup/cron file). The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reads one thing reads from another.

    CWE-22 LLM06 ASI05 ASI01 ASI02

    error python mcp

    CWE-22 (mcp-tool-exposure): An MCP tool deletes/removes an unvalidated path argument (destructive). The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reads one thing reads from another.

    CWE-22 LLM06 ASI01 ASI02

    error python mcp

    CWE-94 (mcp-tool-exposure): An MCP tool passes an unvalidated argument straight to eval/exec (code injection; the model or a prompt-injecting document controls the arg). The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another.

    CWE-94 LLM06 ASI05 ASI01 ASI02

    error python mcp, mongodb

    CWE-943 (mcp-tool-exposure): An MCP tool passes an unvalidated argument into a MongoDB $where clause (the operator takes a JS string the database evaluates – NoSQL injection). The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-943 LLM06 ASI01 ASI02

    error python pytorch, mcp

    CWE-502 (mcp-tool-exposure): An MCP tool passes an unvalidated argument to an unsafe deserialize / model load (pickle / yaml.load / joblib / torch.load / FAISS) — arbitrary code runs on load. The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: depends_on something relies on a component it does not verify; it crosses the supply-chain boundary (code, models or prompts pulled in from outside).

    CWE-502 LLM06 ASI01 ASI04 ASI02

    error python mcp

    CWE-1336 (mcp-tool-exposure): An MCP tool compiles an unvalidated argument as a template (SSTI -> RCE via Jinja/Mako). The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another.

    CWE-1336 LLM06 ASI01 ASI02

    error python mcp

    CWE-89 (mcp-tool-exposure): An MCP tool passes an unvalidated argument as the entire SQL statement to execute() (SQL injection). The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-89 LLM06 ASI01 ASI02

    error python mcp

    CWE-22 (mcp-tool-exposure): An MCP tool runs git init at an unvalidated path argument – can turn any directory the process can write to (including ~/.ssh) into a git repository, the first step of the CVE-2025-68143 mcp-server-git RCE chain. The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reads one thing reads from another.

    CWE-22 LLM06 ASI01 ASI02

    error python mcp

    CWE-88 (mcp-tool-exposure): An MCP tool passes an unvalidated argument straight into GitPython’s git-CLI proxy (repo.git.<subcommand>) – a value starting with ‘-’ is interpreted as a git flag, not data (e.g. ‘–output=/path’ turns a read into a file write). CVE-2025-68144 lineage. The value comes directly from a tool parameter with no validation — reachable via the agent / prompt injection.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another.

    CWE-88 LLM06 ASI05 ASI01 ASI02

    error python pytorch

    CWE-502 (model-supply-chain): torch.load without weights_only=True unpickles arbitrary code from the checkpoint. Pass weights_only=True (or load only trusted files).

    Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.

    Edge inspected: depends_on something relies on a component it does not verify; it crosses the supply-chain boundary (code, models or prompts pulled in from outside).

    CWE-502 LLM03 ASI04 ASI06

    error python vulnfix-ai

    CWE-94 (insecure-output-handling): eval()/exec() is used as the fallback when a structured parse (json.loads / json.load) fails. A value that could not be parsed as data is then executed as code — if it comes from an LLM, a request, or a file, this is code injection (the CodeFuse-muAgent RCE had this exact shape). Use ast.literal_eval or reject on parse failure.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-94 LLM05 ASI05 ASI01 ASI02

    error python mcp

    CWE-22 (mcp-tool-exposure): An MCP tool accepts an optional output-directory/path parameter with a safe-looking default, but only applies that default when the caller omits the value entirely – when a caller DOES supply one, it is used with no containment check (no Path(…).resolve() + is_relative_to(base), commonpath, or startswith-base check against any base directory), so an absolute or ../-escaping value writes outside the intended directory. Generalized from 3 independently-found instances in one session (fengin/image-gen-server, SkyworkAI/Mureka-mcp, hiteshK03/davinci-resolve-mcp) – verify by hand that no containment check exists anywhere in the function before confirming; this rule is a syntactic approximation, not a dataflow proof.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reads one thing reads from another.

    CWE-22 LLM06 ASI04 ASI02

    warning python mcp

    CWE-306 (mcp-tool-exposure): an HTTP route reaching a dangerous capability (shell/eval/SQL) has no per-route auth dependency visible in its signature. This is a noisy, cross-reference-only signal – auth applied via middleware or a global dependency is invisible to this syntax-only check, so do NOT triage this rule’s hits individually. It exists to be joined (by auth_crossref.py) against other findings in the same file: a by-design/weak dangerous-capability finding becomes worth a second look when nothing in the same file appears to gate who can reach it.

    Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.

    Edge inspected: grants authority is given or left unchecked.

    CWE-306 LLM06 ASI05 ASI02