Skip to main content

Masterstudy Lms Wordpress Plugin For Online Courses And Education CVE-2026-4817

| EUVDEUVD-2026-23338 MEDIUM
SQL Injection (CWE-89)
2026-04-17 Wordfence
6.5
CVSS 3.1 · NVD
Share

Severity by source

NVD PRIMARY
6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

4
Analysis Generated
Apr 17, 2026 - 02:18 vuln.today
EUVD ID Assigned
Apr 17, 2026 - 02:15 euvd
EUVD-2026-23338
Analysis Generated
Apr 17, 2026 - 02:15 vuln.today
CVE Published
Apr 17, 2026 - 01:24 nvd
MEDIUM 6.5

DescriptionCVE.org

The MasterStudy LMS WordPress Plugin for Online Courses and Education plugin for WordPress is vulnerable to Time-based Blind SQL Injection via the 'order' and 'orderby' parameters in the /lms/stm-lms/order/items REST API endpoint in versions up to and including 3.7.25. This is due to insufficient input sanitization combined with a design flaw in the custom Query builder class that allows unquoted SQL injection in ORDER BY clauses. When the Query builder detects parentheses in the sort_by parameter, it treats the value as a SQL function and directly concatenates it into the ORDER BY clause without any quoting. While esc_sql() is applied to escape quotes and backslashes, this cannot prevent ORDER BY injection when the values themselves are not wrapped in quotes in the resulting SQL statement. This makes it possible for authenticated attackers, with subscriber-level access and above, to append arbitrary SQL queries via the ORDER BY clause to extract sensitive information from the database including user credentials, session tokens, and other confidential data through time-based blind SQL injection techniques.

AnalysisAI

Time-based blind SQL injection in MasterStudy LMS WordPress plugin up to version 3.7.25 allows authenticated subscribers and above to extract sensitive database information including user credentials and session tokens via unquoted ORDER BY clause injection in the /lms/stm-lms/order/items REST API endpoint. The vulnerability stems from a custom Query builder that concatenates user-supplied sort parameters containing parentheses directly into SQL ORDER BY clauses without proper quoting, bypassing the plugin's use of esc_sql(). CVSS score of 6.5 reflects network-accessible exploitation requiring low privilege (subscriber-level) authentication and no user interaction.

Technical ContextAI

The MasterStudy LMS plugin implements a custom Query builder class (Query.php, line 676) that constructs SQL ORDER BY clauses dynamically. When the 'sort_by' parameter contains parentheses, the builder interprets the value as a SQL function and directly concatenates it into the ORDER BY clause without wrapping the value in quotes. While the code applies esc_sql() to escape quotes and backslashes, this function is ineffective for ORDER BY injection when values are not quoted in the resulting SQL statement-it only escapes quote characters but does not prevent SQL syntax injection when unquoted values are used. The vulnerability is accessible through the REST API endpoint /lms/stm-lms/order/items, called from route.php (line 16) and used by StmStatistics model (lines 202, 238). The root cause is classified as CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) stemming from insufficient input sanitization and a fundamental design flaw in SQL construction logic that fails to validate or sanitize sort parameters against SQL syntax.

RemediationAI

Upgrade MasterStudy LMS plugin to version 3.7.26 or later immediately. The patch is available via the WordPress plugin repository and addresses the SQL injection by properly quoting sort parameters in the Query builder's ORDER BY clause construction logic. If immediate upgrade is not feasible, disable the REST API endpoint /lms/stm-lms/order/items by adding a code snippet to functions.php or using a REST API access control plugin to restrict access to authenticated administrators only, reducing the attack surface from any subscriber to administrators exclusively. This workaround has the trade-off of disabling sorting functionality in the affected endpoint for non-admin users and should be considered temporary only. Do not rely solely on esc_sql() for ORDER BY clause protection; proper parameterization or whitelist validation of sort parameters is required. Monitor database query logs for time-based SQL injection patterns (queries with SLEEP() or BENCHMARK() functions in ORDER BY clauses).

Share

CVE-2026-4817 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy