The Sorter <= 1.0 - Authenticated SQL Injection
Description
The check_order function of The Sorter WordPress plugin through 1.0 uses an area_id parameter which is not sanitised, escaped or validated before inserting to a SQL statement, leading to SQL injection.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
2- WordPress/The Sorterdescription
- Range: <=1.0
Patches
Vulnerability mechanics
Root cause
"The `area_id` POST parameter is concatenated directly into a SQL query without sanitization, escaping, or validation, allowing SQL injection."
Attack vector
An authenticated attacker with Administrator-level access can exploit the SQL injection by sending a crafted `area_id` parameter in a POST request to the `the_sorter_areas` admin page [ref_id=1]. The payload is inserted unsanitized into a SELECT query, enabling time-based blind SQL injection using MySQL's `SLEEP()` function [ref_id=1]. The advisory demonstrates a proof-of-concept request where `area_id=1 AND (SELECT 7667 FROM (SELECT(SLEEP(5)))DWBj)` causes a 5-second delay, confirming the injection [ref_id=1].
Affected code
The vulnerable file is `items.php` at line 218, where the `area_id` parameter from `$_POST` is concatenated directly into a SQL query without sanitization, escaping, or validation [ref_id=1]. The query is executed via `$wpdb->get_row()` against the `SORTER_TB_ITEMS` table [ref_id=1].
What the fix does
The advisory does not include a patch diff, but the remediation would require sanitizing, escaping, or validating the `area_id` parameter before using it in the SQL query, such as casting it to an integer or using `$wpdb->prepare()` with a placeholder [ref_id=1]. Without such changes, the unsanitized concatenation of user input into the SQL statement allows arbitrary SQL commands to be executed [ref_id=1].
Preconditions
- authThe attacker must have Administrator-level access to the WordPress admin panel
- configThe vulnerable plugin version must be 1.2 or lower
- inputThe attacker sends a POST request to the `the_sorter_areas` admin page with a crafted `area_id` parameter
Generated on May 29, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2- codevigilant.com/disclosure/2021/wp-plugin-the-sorter/mitrex_refsource_MISC
- wpscan.com/vulnerability/f7af0795-f111-4acc-9b1e-63cae5862f8bmitrex_refsource_MISC
News mentions
0No linked articles in our index yet.