CVE-2024-24725
Executive Summary
CVE-2024-24725 is a critical PHP deserialization vulnerability in Gibbon, an open-source school management platform. An authenticated remote attacker can exploit this flaw by sending a crafted POST request to the import_run.php endpoint with a malicious columnOrder parameter. This leads to arbitrary PHP object deserialization, which can result in remote code execution (RCE), data exfiltration, or full system compromise. The vulnerability affects all versions up to and including 26.0.00. No official patch has been released, and the vendor has not responded to disclosure attempts. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the technical impact is severe.
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
CVSS Breakdown & Threat Level
- CVSS Score: 9.9 (Critical)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: Critical. The vulnerability allows authenticated users to execute arbitrary code on the server, potentially leading to full system takeover. The low attack complexity and lack of user interaction make it highly dangerous in environments where low-privilege accounts exist.
Deep Dive & Mechanics
The vulnerability resides in the import_run.php script, specifically in the handling of the columnOrder parameter during the import process for external assessments. The application uses PHP's unserialize() function on user-supplied data without proper sanitization or validation. When a POST request is sent to the URI:
/modules/System%20Admin/import_run.php&type=externalAssessment&step=4
The columnOrder parameter is passed directly to unserialize(). An attacker can craft a serialized PHP object that, when deserialized, triggers gadget chains within Gibbon's codebase or common PHP libraries (e.g., Monolog, SwiftMailer) to achieve arbitrary code execution.
The attack flow:
- Authenticate as any user (e.g., teacher, student).
- Craft a malicious serialized PHP object that exploits a known gadget chain.
- Send a POST request with the malicious
columnOrderparameter. - The server deserializes the payload, executing arbitrary commands.
Vulnerable vs. Patched Code
Vulnerable Code (Gibbon <= 26.0.00):
// In import_run.php (simplified)
$columnOrder = $_POST['columnOrder'];
$order = unserialize($columnOrder); // No validation
Patched Code (Hypothetical):
// Replace unserialize with json_decode or add validation
$columnOrder = $_POST['columnOrder'];
$order = json_decode($columnOrder, true); // Safe alternative
if (json_last_error() !== JSON_ERROR_NONE) {
// Handle error
}
Since no official patch exists, the only mitigation is to apply a WAF rule or disable the vulnerable endpoint.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Gibbon instance (<= 26.0.00)
- Valid user credentials (any role)
- PHPGGC or similar gadget chain tool
Exploit Steps:
- Identify a gadget chain. For Gibbon, common chains involve Monolog or SwiftMailer if present.
- Generate a payload using PHPGGC:
phpggc Monolog/RCE1 system 'id' -b - URL-encode the payload and send the POST request:
curl -X POST 'http://target/modules/System%20Admin/import_run.php?type=externalAssessment&step=4' \ -d 'columnOrder=<PAYLOAD>&other_params=...' - Verify RCE by checking for command output (e.g., via DNS callback or file write).
Example Payload (base64-encoded):
TzozMjoiTW9ub2xvZ1xIYW5kbGVyXFN5c3RlbUhhbmRsZXIiOjE6e3M6OToiAHMAaABhbmRsZXIiO3M6NDoiY21kIjt9
Blue Team (Detection & Response)
Detection Steps:
- Monitor for POST requests to
import_run.phpwithcolumnOrderparameter containing non-JSON data (e.g., base64 strings, serialized PHP objects). - Look for unusual process execution (e.g.,
id,whoami,curlto external IPs). - Check for file writes in web-accessible directories.
Response:
- Isolate the affected server.
- Review logs for the attacker's IP and actions.
- Restore from a clean backup.
- Apply WAF rules to block
unserialize-like patterns.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/modules/System%20Admin/import_run.phpwithcolumnOrderparameter containing base64 or serialized PHP data. - Outbound connections to unknown IPs on ports 80/443/53 (DNS exfiltration).
- POST requests to
- File System:
- Unexpected files in
/tmp/,/var/www/html/, or web root (e.g.,shell.php,backdoor.php). - Modified
.htaccessorweb.configfiles.
- Unexpected files in
- Process:
- Unusual processes like
id,whoami,nc,bash -i.
- Unusual processes like
- Logs:
- PHP error logs showing
unserialize()errors or__PHP_Incomplete_Classwarnings.
- PHP error logs showing
Detection Engineering
YARA Rule
rule CVE_2024_24725_Gibbon_Deserialization {
meta:
description = "Detects PHP deserialization payloads targeting Gibbon CVE-2024-24725"
author = "Valters IT"
date = "2024-01-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-24725"
strings:
$serialized = /O:\d+:"[^"]+":\d+:\{/ // Matches PHP serialized objects
$columnOrder = "columnOrder"
$import_run = "import_run.php"
condition:
$columnOrder and $import_run and $serialized
}
Sigma Rule
title: Gibbon CVE-2024-24725 PHP Deserialization Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects POST requests to Gibbon import_run.php with suspicious columnOrder parameter
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query|contains: "import_run.php"
cs-uri-query|contains: "columnOrder"
condition: selection
falsepositives:
- Legitimate imports with JSON columnOrder
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-24725 Gibbon PHP Deserialization Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"import_run.php"; http_uri;
content:"columnOrder"; http_client_body;
pcre:"/O:\d+:\"[^\"]+\":\d+:\{/";
sid:1000001;
rev:1;
reference:cve,2024-24725;
)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint: Block access to
/modules/System%20Admin/import_run.phpvia web server configuration (e.g.,.htaccessor Nginxlocationblock). - Apply WAF rules: Use a Web Application Firewall to block requests containing serialized PHP objects in the
columnOrderparameter. - Restrict user privileges: Remove unnecessary accounts and enforce least privilege.
Long-Term Fix:
- Since no patch is available, consider migrating to an alternative school management system or forking Gibbon to patch the code manually (replace
unserialize()withjson_decode()). - Monitor the vendor's website for any future updates.
Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.