Skip to content

Raw SQL Injection Risk (ARCH8055)

Key kotlin.orm.raw-sql-injection-risk · Severity critical · Category orm · CWE CWE-89

Flags raw SQL built with string templates or concatenation and handed to a query API (createQuery, rawQuery, execSQL, prepareStatement).

db.rawQuery("SELECT * FROM users WHERE name = '$name'", null)
db.rawQuery("SELECT * FROM users WHERE name = ?", arrayOf(name))

Bind parameters; never interpolate values into SQL text.