CVE-2024-8522
published 2024-09-12CVE-2024-8522: The LearnPress – WordPress LMS Plugin plugin for WordPress is vulnerable to SQL Injection via the 'c_only_fields' parameter of the…
PriorityP184high7.5CVSS 3.1
AVNACLPRNUINSUCHINAN
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
61.36%
99.1th percentile
The LearnPress – WordPress LMS Plugin plugin for WordPress is vulnerable to SQL Injection via the 'c_only_fields' parameter of the /wp-json/learnpress/v1/courses REST API endpoint in all versions up to, and including, 4.2.7 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.
Affected
2 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| thimpress | learnpress | < 4.2.7.1 | 4.2.7.1 |
| thimpress | learnpress_wordpress_lms_plugin_for_create_and_sell_online_courses | <= 4.2.7 | — |
Detection & IOCsextracted from sources · hover to see the quote
- →Monitor for unauthenticated GET requests to /wp-json/learnpress/v1/courses containing SQL keywords (e.g., SLEEP, IF, COUNT) in the 'c_only_fields' or 'c_fields' query parameters — indicative of blind time-based SQLi exploitation. ↗
- →Alert on HTTP responses with anomalously high latency (>10 seconds) from /wp-json/learnpress/v1/courses, which may indicate successful time-based blind SQL injection via SLEEP() payloads. ↗
- →The Metasploit module targets both CVE-2024-8522 (c_only_fields) and CVE-2024-8529 (c_fields); detection logic should cover both parameter names in REST API requests. ↗
- →The exploit uses User-Agent 'curl/7.81.0' in the PoC HTTP request; consider flagging this UA in combination with requests to the LearnPress REST API endpoint. ↗
- ·The vulnerability affects all versions up to and including 4.2.7; exploitation requires no authentication, meaning no session or privilege context is needed to trigger the SQLi. ↗
- ·The injection is blind (time-based), not error-based; detection rules relying solely on SQL error messages in responses will miss this attack vector. ↗
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vulncheck10.0CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
GHSA-3w3r-r6g6-w8x5: The LearnPress – WordPress LMS Plugin plugin for WordPress is vulnerable to SQL Injection via the 'c_only_fields' parameter of the /wp-json/learnpress
ghsa_unreviewed·2024-09-12
CVE-2024-8522 [CRITICAL] CWE-89 GHSA-3w3r-r6g6-w8x5: The LearnPress – WordPress LMS Plugin plugin for WordPress is vulnerable to SQL Injection via the 'c_only_fields' parameter of the /wp-json/learnpress
The LearnPress – WordPress LMS Plugin plugin for WordPress is vulnerable to SQL Injection via the 'c_only_fields' parameter of the /wp-json/learnpress/v1/courses REST API endpoint in all versions up to, and including, 4.2.7 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.
VulnCheck
thimpress learnpress Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
vulncheck·2024·CVSS 10.0
CVE-2024-8522 [CRITICAL] thimpress learnpress Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
thimpress learnpress Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The LearnPress – WordPress LMS Plugin plugin for WordPress is vulnerable to SQL Injection via the 'c_only_fields' parameter of the /wp-json/learnpress/v1/courses REST API endpoint in all versions up to, and including, 4.2.7 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.
Affected: thimpress learnpress
Required Action: Apply remediations or mitigations per vendor instructions or discontinue use of the product if remediation or mi
No detection rules found.
Exploit-DB
LearnPress WordPress LMS Plugin 4.2.7 - SQL Injection
exploitdb·2025-04-11·CVSS 10.0
CVE-2024-8522 [CRITICAL] LearnPress WordPress LMS Plugin 4.2.7 - SQL Injection
LearnPress WordPress LMS Plugin 4.2.7 - SQL Injection
---
# Exploit Title: LearnPress WordPress LMS Plugin 4.2.7 - SQL Injection
# Google Dork: inurl:"/wp-json/learnpress/v1/" OR inurl:"/wp-content/plugins/learnpress/" OR "powered by LearnPress" AND "version 4.2.7"
# Date: [Current Date, e.g., October 30, 2024]
# Exploit Author: [Your Name or Username]
# Vendor Homepage: https://thimpress.com/learnpress/
# Software Link: https://wordpress.org/plugins/learnpress/
# Version: execute()
class-lp-course-db.php:564, LP_Course_DB->get_courses()
Courses.php:241, LearnPress\Models\Courses::get_courses()
class-lp-rest-courses-v1-controller.php:502, LP_Jwt_Courses_V1_Controller->get_courses()
class-wp-rest-server.php:1230, WP_REST_Server->respond_to_request()
class-wp-rest-server.php:1063, WP_
Metasploit
WordPress LearnPress Unauthenticated SQLi (CVE-2024-8522, CVE-2024-8529)
metasploit·CVSS 7.5
CVE-2024-8522 [HIGH] WordPress LearnPress Unauthenticated SQLi (CVE-2024-8522, CVE-2024-8529)
WordPress LearnPress Unauthenticated SQLi (CVE-2024-8522, CVE-2024-8529)
The LearnPress WordPress LMS Plugin up to version 4.2.7 is vulnerable to SQL injection via the 'c_only_fields' and 'c_fields' parameters. This allows unauthenticated attackers to exploit blind SQL injections and extract sensitive information.
Nuclei
LearnPress < 4.2.7.1 - SQL Injection
nuclei·CVSS 7.5
CVE-2024-8522 [HIGH] LearnPress < 4.2.7.1 - SQL Injection
LearnPress =6"
- "contains(content_type, 'application/json')"
- contains_all(body, 'id\":', 'name\":')
condition: and
# digest: 4a0a0047304502206b7372ca75d443c6fd72c80a91aa7fdc935064a0111120432b911d2c6a722453022100f6a580c149ec2226b01167200451b4881d152a5b2b601417bc75d33d137121b8:922c64590222798bb761d5b6d8e72950
No writeups or analysis indexed.
https://abrahack.com/posts/learnpress-sqli/https://plugins.trac.wordpress.org/browser/learnpress/trunk/inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php#L441https://plugins.trac.wordpress.org/changeset/3148560/learnpress/tags/4.2.7.1/inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php?old=3138586&old_path=learnpress%2Ftags%2F4.2.7%2Finc%2Fjwt%2Frest-api%2Fversion1%2Fclass-lp-rest-courses-v1-controller.phphttps://www.wordfence.com/threat-intel/vulnerabilities/id/e495507d-7eac-4f38-ab6f-b8f0809b2be4?source=cve
2024-09-12
Published
Exploited in the wild