Expected Findings
- Function schema accepts free-form `where` clauses.
- Backend interpolates the `where` string into raw SQL.
- `cmd` argument on the `runner` tool is passed straight to `exec`.
The function-calling schema lets the model emit `where` and `cmd` strings that backend code interpolates straight into SQL or shell, so prompt injection becomes RCE.
CWE-94CWE-77
{"name":"sql.query","parameters":{"where":{"type":"string"}}}
db.exec("SELECT * FROM users WHERE " + args.where)