Skip to content
vetkitChecksChangelogDocumentation

vetkit.php.sql-injection.wordpress-wpdb

Request input is built into a $wpdb query string without $wpdb->prepare() placeholders (SQL injection).

Last updated:

Suite: Security

php

Request input is built into a $wpdb query string without $wpdb->prepare() placeholders (SQL injection).

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Build the query with $wpdb->prepare() and %s / %d / %i placeholders, passing request values as arguments; never interpolate them into the format string.

References

Source: packages/engine/rules/sast/php.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.