CVE-2025-12860
Executive Summary
CVE-2025-12860 is a publicly disclosed SQL injection vulnerability affecting DedeBIZ up to version 6.3.2. The flaw resides in the /admin/freelist_main.php file, where the orderby parameter is not properly sanitized before being used in a SQL query. An unauthenticated attacker can exploit this remotely to inject arbitrary SQL commands, potentially leading to data exfiltration, authentication bypass, or further compromise of the underlying database. The exploit has been made public, increasing the risk of widespread scanning and attacks. No official patch is currently available from the vendor.
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
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It is a PHP-based web application vulnerability in the DedeBIZ content management system.
CVSS Breakdown & Threat Level
- CVSS Score: 4.7 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- 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) – The vulnerability does not affect other components.
- Confidentiality Impact: Low (C:L) – Limited data exposure possible.
- Integrity Impact: Low (I:L) – Limited data modification possible.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. The low complexity and public exploit make this a significant risk for unpatched instances.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the orderby parameter of the /admin/freelist_main.php script. The application likely constructs a SQL query similar to:
SELECT * FROM `dede_freelist` ORDER BY `orderby` ASC
Without proper sanitization, an attacker can inject SQL commands by manipulating the orderby parameter. For example, a payload like:
orderby=id; DROP TABLE dede_freelist; --
Could be injected to execute arbitrary SQL statements. The orderby parameter is used directly in the ORDER BY clause, which is a common injection point. The attack is unauthenticated, meaning any remote attacker can send a crafted HTTP request to the vulnerable endpoint.
Vulnerable vs. Patched Code
Vulnerable Code (DedeBIZ <= 6.3.2):
The vulnerable code in /admin/freelist_main.php likely looks like:
$orderby = $_GET['orderby'];
$sql = "SELECT * FROM `dede_freelist` ORDER BY `$orderby` ASC";
$result = mysqli_query($conn, $sql);
Patched Code (Hypothetical):
A patched version would sanitize the orderby parameter by whitelisting allowed values or using parameterized queries:
$allowed_orderby = ['id', 'title', 'date'];
$orderby = $_GET['orderby'];
if (in_array($orderby, $allowed_orderby)) {
$sql = "SELECT * FROM `dede_freelist` ORDER BY `$orderby` ASC";
$result = mysqli_query($conn, $sql);
} else {
// Handle invalid input
}
Or using prepared statements:
$orderby = $_GET['orderby'];
$sql = "SELECT * FROM `dede_freelist` ORDER BY ? ASC";
$stmt = mysqli_prepare($conn, $sql);
mysqli_stmt_bind_param($stmt, "s", $orderby);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
Exploitation & Lab Setup
Red Team
Lab Setup:
- Install DedeBIZ version 6.3.2 on a local server (e.g., XAMPP, LAMP).
- Ensure the
/admin/freelist_main.phpendpoint is accessible. - Use a tool like Burp Suite or curl to craft the exploit.
Exploit Payload:
GET /admin/freelist_main.php?orderby=1; SELECT * FROM dede_admin; -- HTTP/1.1
Host: target.com
Proof of Concept (PoC):
curl -v "http://target.com/admin/freelist_main.php?orderby=1%27%20UNION%20SELECT%201,2,3,4,5,6,7,8,9,10--%20-"
This payload attempts a UNION-based SQL injection to extract data from the database.
Blue Team
Detection:
- Monitor for unusual
orderbyparameter values in HTTP requests to/admin/freelist_main.php. - Look for SQL keywords (e.g., UNION, SELECT, DROP) in the
orderbyparameter. - Alert on requests with multiple SQL statements or comments (e.g.,
--,#).
Hunting:
- Search web server logs for requests containing
orderbywith SQL-like patterns. - Use the Sigma rule provided in the Detection Engineering section.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to
/admin/freelist_main.phpwithorderbyparameter containing SQL keywords. - Outbound database connections from the web server to unusual IPs.
- HTTP requests to
- File IOCs:
- Modified or new files in the DedeBIZ installation directory (e.g., webshells).
- Log IOCs:
- Web server logs showing SQL injection attempts (e.g.,
orderby=1 UNION SELECT). - Database logs showing unexpected queries or errors.
- Web server logs showing SQL injection attempts (e.g.,
Detection Engineering
YARA Rule
rule CVE_2025_12860_SQLi_OrderBy {
meta:
description = "Detects SQL injection attempts targeting CVE-2025-12860 in DedeBIZ"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-12860"
strings:
$orderby_param = "orderby=" nocase
$sql_keywords = /(UNION|SELECT|DROP|INSERT|UPDATE|DELETE|--|#)/ nocase
condition:
$orderby_param and $sql_keywords
}
Sigma Rule
title: SQL Injection Attempt Against DedeBIZ CVE-2025-12860
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts via the orderby parameter in DedeBIZ /admin/freelist_main.php
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-12860
logsource:
category: webserver
product: apache
service: http
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: '/admin/freelist_main.php'
cs-uri-query|contains: 'orderby='
keywords:
- 'UNION'
- 'SELECT'
- 'DROP'
- 'INSERT'
- 'UPDATE'
- 'DELETE'
- '--'
- '#'
condition: selection and keywords
falsepositives:
- Legitimate use of SQL keywords in parameter values (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-12860 SQL Injection Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/admin/freelist_main.php"; http_uri; content:"orderby="; http_uri; pcre:"/(UNION|SELECT|DROP|INSERT|UPDATE|DELETE|--|#)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable or restrict access to
/admin/freelist_main.phpuntil a patch is applied. - Input Validation: Implement strict whitelisting for the
orderbyparameter. Only allow predefined values (e.g.,id,title,date). - Parameterized Queries: Use prepared statements with bound parameters for all database queries.
- Web Application Firewall (WAF): Deploy a WAF rule to block SQL injection patterns in the
orderbyparameter. - Monitor Logs: Actively monitor web server and database logs for exploitation attempts.
- Vendor Patch: Check for updates from DedeBIZ and apply the official patch when released.
Valters IT