WP Inventory Manager <= 2.5.1 - Authenticated (Contributor+) SQL Injection via 'where' Shortcode Attribute
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
The WP Inventory Manager plugin for WordPress is vulnerable to SQL Injection via the 'where' shortcode attribute of the [wpinventory] shortcode in versions up to, and including, 2.5.1. This is due to insufficient escaping on the user-supplied parameter and lack of sufficient preparation on the existing SQL query in the WPIMItem::get_all() function — parse_custom_where() only performs html_entity_decode(), strips semicolons, and does field-label name replacements, without using $wpdb->prepare() or a whitelist. The resulting string is concatenated into a raw SELECT statement that is executed via $wpdb->get_results(). This makes it possible for authenticated attackers, with Contributor-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- chuck1982 WP Inventory Manager
through 2.5.1
References 7
plugins.trac.wordpress.org
- browser/wp-inventory-manager/tags/2.4.1/includes/wpinventory.item.class.php#L269
- browser/wp-inventory-manager/tags/2.4.1/includes/wpinventory.item.class.php#L748
- browser/wp-inventory-manager/tags/2.4.1/includes/wpinventory.item.class.php#L211
- browser/wp-inventory-manager/tags/2.4.1/includes/wpinventory.shortcode.class.php#L72
- browser/wp-inventory-manager/tags/2.4.1/wpinventory.core.php#L448
- changeset?reponame=&old=3657730%40wp-inventory-manager&new=3657730%40wp-inventory-manager