CVE-2024-8522LearnPress – WordPress LMS Plugin <= 4.2.7 - Unauthenticated SQL Injection via 'c_only_fields'
- 10.0CriticalCVSS base score
- 62.9%Exploitation in 30 daysEPSS · top 0.8% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- 3Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Metasploit module, a Nuclei template and an Exploit-DB entry for it.
Show the exploits3
Metasploit modules1 module
- WordPress LearnPress Unauthenticated SQLi (CVE-2024-8522, CVE-2024-8529) (Metasploit module) (opens in a new tab)
auxiliary/scanner/http/wp_learnpress_c_fields_sqliRank normaldisclosed 11 Sept 2024
Nuclei templates1 template
- LearnPress < 4.2.7.1 - SQL Injection (Nuclei template) (opens in a new tab)
http/cves/2024/CVE-2024-8522.yamlSeverity critical
Exploit-DB1 entry
- LearnPress WordPress LMS Plugin 4.2.7 - SQL Injection (Exploit-DB entry) (opens in a new tab)
EDB-ID 52171webapps, phppublished 11 Apr 2025Not verified
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By Wordfence
- 6 days later
· 6 days later
Published
- 19 months later
· 19 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| WordfenceCNA (assigner) | 3.1 | Critical10.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
- EPSS (exploitation in 30 days)
- 62.9% · top 0.8% of all CVEs (12 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: yes · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 10.0.
Affected products
References
References4
- https://www.wordfence.com/threat-intel/vulnerabilities/id/e495507d-7eac-4f38-ab6f-b8f0809b2be4?source=cve (opens in a new tab)
- https://plugins.trac.wordpress.org/browser/learnpress/trunk/inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php#L441 (opens in a new tab)
- https://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.php (opens in a new tab)
- https://abrahack.com/posts/learnpress-sqli/ (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-49240 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-8522)Record last updated .