Skip to content
vetkitChecksChangelogDocumentation

vetkit.csharp.sql-injection.tainted-query

Request input flows into the text of a SQL command (ADO.NET, EF raw SQL or Dapper). An attacker can change the structure of the query, which is SQL injection.

Last updated:

Suite: Security

csharp

Request input flows into the text of a SQL command (ADO.NET, EF raw SQL or Dapper). An attacker can change the structure of the query, which is SQL injection.

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Bind request values as parameters. Identifiers (column or table names, sort direction) cannot be parameterised; map them through a fixed allow-list (switch/dictionary) instead.

References

Source: packages/engine/rules/sast/csharp.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.