Ninja Tables <= 5.5.1 - Unauthenticated SQL Injection via 'dateFormat' Parameter
- State
- Published
- Severity
- 7.5 High
- Published
- Nov 26, 2026
- Updated
- Nov 26, 2026
- Reserved
- Nov 6, 2026
Description
The Ninja Tables – Responsive Table Builder for Data, Pricing & Product Tables plugin for WordPress is vulnerable to SQL Injection via the 'dateFormat' column metadata parameter in versions up to, and including, 5.5.1 This is due to insufficient escaping on the stored 'dateFormat' value in DefaultProvider::orderByJsonQuery(); convertDateFormatToMysql() only performs str_replace on date-format tokens and leaves SQL metacharacters (including single quotes) intact, after which the value is concatenated directly into an orderByRaw() ORDER BY clause inside single quotes. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database; the payload is stored in the _ninja_table_columns post meta and executed on every unauthenticated request to the wp_ajax_ninja_tables_public_action AJAX endpoint when the table uses sorting_type='by_column' with a date column.
| Product | Versions |
|---|---|
| Ninja Tables – Responsive Table Builder for Data, Pricing & Product Tables wpmanageninja | 5.5.1 and earlier Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 3.1 | 7.5 High | Wordfence |
Weaknesses
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
References
- https://www.wordfence.com/threat-intel/vulnerabilities/id/624e67b5-4159-46fa-a60b-964194e40ffb?source=cve
- https://plugins.trac.wordpress.org/browser/ninja-tables/tags/5.5.0/app/Modules/DataProviders/DefaultProvider.php#L129
- https://plugins.trac.wordpress.org/browser/ninja-tables/tags/5.5.0/app/Modules/DataProviders/DefaultProvider.php#L143
- https://plugins.trac.wordpress.org/browser/ninja-tables/tags/5.5.0/app/Hooks/Handlers/AjaxHandler.php#L30
- https://wordpress.org/plugins/ninja-tables/
- https://plugins.trac.wordpress.org/changeset/3811500/ninja-tables/trunk/app/Modules/DataProviders/DefaultProvider.php
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.