Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
2DescriptionCVE.org
The BetterDocs Pro plugin for WordPress is vulnerable to SQL Injection via the get_current_letter_docs and docs_sort_by_letter AJAX actions in all versions up to, and including, 3.7.0. This is due to the limit POST parameter being interpolated directly into a SQL query string before being passed to $wpdb->prepare(), which only parameterizes other variables. 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 Encyclopedia feature must be enabled in BetterDocs Pro settings for the vulnerability to be exploitable.
AnalysisAI
Unauthenticated SQL injection in BetterDocs Pro for WordPress allows remote attackers to extract sensitive database contents when the Encyclopedia feature is enabled. The vulnerability affects all versions up to 3.7.0 through unsanitized 'limit' parameters in two AJAX endpoints. With CVSS 7.5 (High severity) and network-based unauthenticated attack vector, this presents significant risk to sites using the Encyclopedia feature, though no active exploitation (KEV) or public POC has been identified at time of analysis. EPSS data not available for risk calibration.
Technical ContextAI
This is a classic SQL injection vulnerability (CWE-89) in a WordPress plugin's AJAX handler implementation. The flaw occurs in BetterDocs Pro's get_current_letter_docs and docs_sort_by_letter AJAX actions, which are designed to support the plugin's Encyclopedia feature for organizing documentation alphabetically. The vulnerable code concatenates the user-supplied 'limit' POST parameter directly into a SQL query string before passing it to WordPress's $wpdb->prepare() function. While prepare() is intended to safely parameterize database queries, it only sanitizes variables explicitly marked with placeholders - any values already concatenated into the query string bypass this protection entirely. This implementation error is particularly dangerous because WordPress AJAX endpoints with 'nopriv' registration are accessible to unauthenticated users by default. The vulnerability affects the cpe:2.3:a:betterdocs:betterdocs_pro product line, demonstrating how even security-conscious frameworks like WordPress require developers to use their sanitization APIs correctly rather than mixing string concatenation with parameterized queries.
RemediationAI
Upgrade BetterDocs Pro to version 3.7.1 or later if available, verifying the fix version from the official changelog at https://betterdocs.co/changelog/ and vendor communications. The Wordfence advisory at https://www.wordfence.com/threat-intel/vulnerabilities/id/5c0f02ad-f5f1-42b1-8116-e391aaa85430?source=cve provides technical details for validation. As an immediate compensating control, disable the Encyclopedia feature in BetterDocs Pro settings (typically under BetterDocs > Settings > Encyclopedia) to eliminate the vulnerable code path entirely - this prevents exploitation but removes Encyclopedia functionality for users. For sites requiring Encyclopedia features, implement WordPress application firewall rules (via Wordfence, Sucuri, or similar WAF) to filter AJAX requests to wp-admin/admin-ajax.php where action parameters equal get_current_letter_docs or docs_sort_by_letter and limit parameters contain SQL metacharacters (quotes, semicolons, UNION keywords, comment markers). This WAF approach may cause false positives with legitimate large limit values and requires tuning. Database-level monitoring for unusual SELECT queries from the WordPress database user can provide detection capability but does not prevent exploitation. Review database access logs for suspicious query patterns in the period prior to patching to identify potential historical compromise.
More in Betterdocs
View allDeserialization of Untrusted Data vulnerability in WPDeveloper BetterDocs.3.3. Rated critical severity (CVSS 9.0), this
Stored cross-site scripting via prompt injection in the BetterDocs WordPress plugin (versions 4.0.0 through 4.5.5) allow
Unauthenticated remote code execution in BetterDocs Pro for WordPress (versions through 3.8.0) is achievable by abusing
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in WPDeveloper BetterDocs a
Stored Cross-Site Scripting (XSS) in the BetterDocs WordPress plugin version 4.6.2 and earlier allows authenticated user
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in WPDeveloper
Sensitive system information in the BetterDocs WordPress knowledge base plugin (WPDeveloper, all versions through 4.3.10
Missing Authorization vulnerability in WPDeveloper BetterDocs betterdocs allows Exploiting Incorrectly Configured Access
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-28319
GHSA-89cx-53rv-jcx8