It was possible to exploit an Unauthenticated Time-Based Blind SQL Injection vulnerability in the Spam protection, AntiSpam, FireWall by CleanTalk WordPress Plugin before 5.153.4. The update_log function in lib/Cleantalk/ApbctWP/Firewall/SFW.php included a vulnerable query that could be injected via the User-Agent Header by manipulating the cookies set by the Spam protection, AntiSpam, FireWall by CleanTalk WordPress plugin before 5.153.4, sending an initial request to obtain a ct_sfw_pass_key cookie and then manually setting a separate ct_sfw_passed cookie and disallowing it from being reset.
PoC代码[已公开]
id: CVE-2021-24295
info:
name: Spam protection, AntiSpam, FireWall by CleanTalk < 5.153.4 - Unauthenticated Blind SQL Injection
author: DhiyaneshDK
severity: high
description: |
It was possible to exploit an Unauthenticated Time-Based Blind SQL Injection vulnerability in the Spam protection, AntiSpam, FireWall by CleanTalk WordPress Plugin before 5.153.4. The update_log function in lib/Cleantalk/ApbctWP/Firewall/SFW.php included a vulnerable query that could be injected via the User-Agent Header by manipulating the cookies set by the Spam protection, AntiSpam, FireWall by CleanTalk WordPress plugin before 5.153.4, sending an initial request to obtain a ct_sfw_pass_key cookie and then manually setting a separate ct_sfw_passed cookie and disallowing it from being reset.
remediation: Fixed in 5.153.4
reference:
- https://wpscan.com/vulnerability/152171fc-888c-4275-a118-5a1e664ef28b
- https://github.com/20142995/nuclei-templates
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-2021-24295
cwe-id: CWE-89
epss-score: 0.36643
epss-percentile: 0.97029
cpe: cpe:2.3:a:cleantalk:spam_protection\,_antispam\,_firewall:*:*:*:*:*:wordpress:*:*
metadata:
verified: true
max-request: 1
vendor: cleantalk
product: spam_protection\,_antispam\,_firewall
framework: wordpress
fofa-query: body="/plugin/cleantalk-spam-protect/"
tags: cve,cve2024,wpscan,wordpress,wp,wp-plugin,cleantalk-spam-protect,sqli,passive,vkev
http:
- raw:
- |
GET /wp-content/plugins/cleantalk-spam-protect/readme.txt HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'compare_versions(version, "< 5.153.4")'
- 'contains(body, "Spam protection")'
- 'status_code == 200'
condition: and
extractors:
- type: regex
name: version
part: body
group: 1
internal: true
regex:
- "(?mi)Stable tag: ([0-9.]+)"
# digest: 4b0a00483046022100937dd3e8bf8c051ecc95737ff17ee6cb457d5f03e0d2f98c5bdef1ad54600cb8022100a3533a6da56f298e50c990ec4f3b302403fbd8f4cfafd3f8e924fd0829e7d712:922c64590222798bb761d5b6d8e72950