# Database Cleaner <= 1.4.7 - Authenticated (Administrator+) SQL Injection via Table Name

- **ID:** WPSEC-2026-2174
- **Plugin:** Database Cleaner: Cleanup, Optimization & Repair (`database-cleaner`), https://wordpress.org/plugins/database-cleaner/
- **Affected versions:** all versions before 1.4.8
- **Fixed in:** 1.4.8 (Update to 1.4.8 or later.)
- **Severity:** Medium 6.5 (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H)
- **Weakness:** CWE-89
- **Usage among sites WPSec scans:** plugin Low, affected versions None seen (as of 2026-10-31)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/database-cleaner
- **Fix released:** 2026-10-30
- **Published:** 2026-10-31
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2174/

## Description

The Database Cleaner plugin for WordPress is vulnerable to SQL Injection via the 'tables' parameter of the delete_tables REST endpoint in all versions up to, and including, 1.4.7. This is due to the table name being interpolated unescaped inside backticks in a DROP TABLE query, and to a deletable-table check that only recognises core tables carrying the current site's prefix. This makes it possible for authenticated attackers with administrator-level access to break out of the identifier quoting with a crafted name and drop arbitrary database tables, including WordPress core tables. On multisite networks, site administrators can drop the network-wide tables (such as users and usermeta) and the tables of other sites in the network, causing data loss across the whole network.

## References

- https://wpsec.com/vuln/WPSEC-2026-2174/
- https://plugins.svn.wordpress.org/database-cleaner/tags/1.4.8/
- https://wordpress.org/plugins/database-cleaner/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-2174/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
