SQL query built from unescaped input
What it finds
A SQL statement is assembled by string concatenation, formatting, or interpolation instead of bound parameters.
Why it matters
If any part of that string comes from a user, a document, or the model itself, it can rewrite the query — reading, changing, or deleting data the agent was never meant to touch.
What an attacker could do: Anyone who can influence the input (including through prompt injection) could read or modify any table this database connection can reach.
How to fix it
Use parameterized queries / prepared statements for every value, and give the agent a database role limited to the exact tables and operations it needs.
Pro shows the corrected code for your exact file, step by step, and re-scans to confirm the fix. See plans
Check details
- Finding code
- SQL_INJECTION_RISK
- How it detects
- Looks for a specific risky pattern in the code or config.
- Confidence
- Likely: strong signal, but review it in context.
- Scans
- Any text-based agent source or configuration (JS/TS/Python/JSON/YAML)
- OWASP LLM Top 10
- LLM02 - Insecure Output Handling, LLM08 - Excessive Agency
- NIST AI RMF
- MS-2.3, MG-2.2
- SOC 2
- CC6.1, CC7.1
Check your agent for this
Paste your agent code or MCP config. The free scan runs all 124 checks in about 10 seconds — no account needed.
Related checks
- Command injection riskAV-RUNTIME-004 · Critical
- Unsafe dynamic code executionAV-RUNTIME-005 · Critical
- Privileged or host-mounted container configurationAV-RUNTIME-007 · Critical
- Unsafe deserialization of untrusted dataAV-RUNTIME-010 · Critical
- Prompt injection surface detectedAV-RUNTIME-002 · High
- Unsandboxed browser automationAV-RUNTIME-008 · High