CVE-2024-22568
Executive Summary
CVE-2024-22568 is a Cross-Site Request Forgery (CSRF) vulnerability identified in FlyCms v1.0. The flaw resides in the /system/score/del endpoint, allowing an attacker to forge requests that delete scores without the victim's consent. This vulnerability requires user interaction (e.g., clicking a malicious link) and can lead to unauthorized data modification. No official patch has been released by the vendor, and the CVSS score is 0.0 due to incomplete NVD data, but the actual risk is moderate in the context of authenticated sessions.
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
FlyCms is a standalone PHP application, not distributed via NPM, PyPI, Go, or Ruby registries. No supply chain package security concerns apply.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed to trigger the CSRF.
- User Interaction (UI): Required (R) – Victim must click a crafted link or visit a malicious page.
- Scope (S): Unchanged (U) – Only the vulnerable component is affected.
- Confidentiality (C): None (N) – No data exposure.
- Integrity (I): Low (L) – Unauthorized deletion of score records.
- Availability (A): None (N) – No denial of service.
CVSS Score: 4.3 (Medium) – Based on the vector above, despite NVD reporting 0.0.
Threat Level: Medium – Exploitation requires user interaction but can cause data loss.
Deep Dive & Mechanics
The vulnerability exists because the /system/score/del endpoint does not implement CSRF tokens or other anti-forgery mechanisms. An attacker can craft a malicious HTML page or email that, when visited by an authenticated FlyCms user, sends a forged POST request to delete a score. The application processes the request without verifying the origin, leading to unauthorized actions.
Root Cause: Lack of CSRF protection in the score deletion functionality.
Attack Flow:
- Attacker identifies a target FlyCms instance with an authenticated admin user.
- Attacker crafts a malicious link or form that submits a request to
/system/score/delwith a specific score ID. - Victim (authenticated admin) clicks the link or visits the attacker's page.
- The request is executed in the victim's session, deleting the score.
Vulnerable vs. Patched Code
Vulnerable Code (FlyCms v1.0):
// /system/score/del.php (simplified)
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$id = $_POST['id'];
$db->query("DELETE FROM scores WHERE id = $id");
// No CSRF token check
}
Patched Code (Hypothetical):
// /system/score/del.php (patched)
session_start();
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (!isset($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) {
die('CSRF validation failed');
}
$id = intval($_POST['id']);
$stmt = $db->prepare("DELETE FROM scores WHERE id = ?");
$stmt->bind_param("i", $id);
$stmt->execute();
}
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A running FlyCms v1.0 instance.
- An authenticated admin session (victim).
Exploit Steps:
- Create a malicious HTML page that auto-submits a form:
<html>
<body>
<form action="http://target.com/system/score/del" method="POST" id="csrf_form">
<input type="hidden" name="id" value="1">
</form>
<script>document.getElementById('csrf_form').submit();</script>
</body>
</html>
- Host the page on an attacker-controlled server.
- Send the link to the victim (e.g., via email or social engineering).
- When the victim visits the page, the score with ID 1 is deleted.
Note: No public exploit-db code is available for this CVE.
Blue Team (Defense & Detection)
Detection:
- Monitor for unusual POST requests to
/system/score/delwithout a valid CSRF token. - Analyze HTTP Referer headers for unexpected origins.
Prevention:
- Implement CSRF tokens in all state-changing requests.
- Use SameSite cookies (Strict or Lax) to mitigate cross-origin requests.
- Validate the
Originheader on the server side.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/system/score/delwith missing or invalidRefererheader. - Repeated requests to the same endpoint from different IPs in a short time.
- POST requests to
- Host:
- Unexpected score deletions in application logs.
- Presence of malicious HTML files on the server (if attacker uploads them).
- Logs:
- Web server logs showing
POST /system/score/delwithHTTP_REFERERpointing to an external domain.
- Web server logs showing
Detection Engineering
YARA Rule
rule flycms_csrf_exploit {
meta:
description = "Detects CSRF exploit attempts against FlyCms score deletion"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-22568"
strings:
$csrf_form = "action=\"/system/score/del\"" ascii wide nocase
$hidden_id = "name=\"id\"" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: FlyCms CSRF Score Deletion Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects POST requests to /system/score/del without CSRF token
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
c-uri: '/system/score/del'
filter:
c-referer: 'http://target.com/*'
condition: selection and not filter
falsepositives:
- Legitimate admin actions (if CSRF token is present)
level: medium
Suricata Rule
alert http any any -> $HOME_NET any (
msg:"CVE-2024-22568 FlyCms CSRF Score Deletion Attempt";
flow:to_server,established;
http.method; content:"POST";
http.uri; content:"/system/score/del";
http.referer; content:!"http://target.com";
classtype:attempted-admin;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Implement CSRF Tokens: Add a unique, per-session token to all forms and validate it on the server side.
- Use SameSite Cookies: Set
SameSite=LaxorStricton session cookies to prevent cross-origin requests. - Validate Origin: Check the
Originheader against a whitelist of allowed domains.
Long-Term Fix:
- Upgrade to a patched version if the vendor releases one.
- Consider migrating to a more actively maintained CMS.
Workaround:
- Restrict access to
/system/score/delvia.htaccessor firewall rules to only trusted IPs (not a complete fix).
Valters IT
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.