CVE-2025-12118: Wpdb Prepare Alter Table Structural Injection

Improper use of `%s` placeholder in `$wpdb->prepare()` for structural SQL clauses like `ALTER TABLE ...`. The `%s` placeholder wraps its value in single quotes, causing an SQL syntax error when formatting schema changes. This can cause database upgrades to fail silently, resulting in columns with dangerously restrictive sizes that are vulnerable to truncatio

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0PHPβ
greprules fetch cve-2025-12118-wpdb-prepare-alter-table-structural-injection --engine opengrep

Description

Improper use of `%s` placeholder in `$wpdb->prepare()` for structural SQL clauses like `ALTER TABLE ...`. The `%s` placeholder wraps its value in single quotes, causing an SQL syntax error when formatting schema changes. This can cause database upgrades to fail silently, resulting in columns with dangerously restrictive sizes that are vulnerable to truncatio