CVE-2019-25700
Executive Summary
CVE-2019-25700 is an unauthenticated SQL injection vulnerability in the Kados R10 GreenBee application. The flaw exists in the sort_direction parameter, allowing remote attackers to inject arbitrary SQL statements. This can lead to unauthorized extraction of sensitive database information, modification of data, or potential escalation to full system compromise. No official patch has been released, and no public proof-of-concept (PoC) or exploit code is available at this time. The vulnerability is classified under MITRE ATT&CK tactic T1190 (Exploit Public-Facing Application) and is mapped to CWE-89 (SQL Injection).
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: 0.0 (No official vector assigned)
- Attack Vector: Network (likely)
- Attack Complexity: Low (likely)
- Privileges Required: None (likely)
- User Interaction: None (likely)
- Scope: Unchanged (likely)
- Confidentiality Impact: High (likely)
- Integrity Impact: High (likely)
- Availability Impact: Low (likely)
Threat Level: Critical – Unauthenticated SQL injection in a public-facing application with no patch available.
Deep Dive & Mechanics
The vulnerability resides in the sort_direction parameter, which is used to control the sorting order of query results. The application fails to sanitize or parameterize user input before incorporating it into SQL queries. An attacker can submit a malicious payload such as:
ASC; DROP TABLE users; --
This would cause the database to execute the injected SQL commands, potentially leading to data exfiltration, data manipulation, or denial of service.
The injection point is likely in a GET or POST request to a page that displays tabular data. The sort_direction parameter is expected to accept values like ASC or DESC, but no validation is performed.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
$sort_direction = $_GET['sort_direction'];
$query = "SELECT * FROM products ORDER BY price $sort_direction";
$result = mysqli_query($conn, $query);
Patched Code (Conceptual):
$allowed_directions = ['ASC', 'DESC'];
$sort_direction = $_GET['sort_direction'];
if (in_array($sort_direction, $allowed_directions)) {
$query = "SELECT * FROM products ORDER BY price $sort_direction";
$result = mysqli_query($conn, $query);
} else {
// Handle error
}
The patched version uses a whitelist approach to restrict the sort_direction parameter to only allowed values, preventing SQL injection.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Deploy a vulnerable instance of Kados R10 GreenBee (e.g., using a Docker container or a local VM).
- Identify the endpoint that uses the
sort_directionparameter (e.g.,/products?sort_direction=ASC). - Use a tool like
sqlmapto automate exploitation:
sqlmap -u "http://target.com/products?sort_direction=ASC" --batch --dbs
Manual Exploitation:
- Inject a UNION-based payload to extract data:
ASC UNION SELECT 1,2,3,4,5,6,7,8,9,10--
- Use error-based or time-based techniques if UNION is blocked.
Blue Team
Detection:
- Monitor for unusual
sort_directionparameter values (e.g., containing SQL keywords likeUNION,SELECT,DROP). - Look for repeated requests with varying
sort_directionvalues from the same IP. - Use a Web Application Firewall (WAF) to block SQL injection patterns.
Hunting:
- Search logs for
sort_directionparameters containing',--,;, orUNION. - Correlate with database error messages in application logs.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests with
sort_directioncontaining SQL keywords (e.g.,UNION,SELECT,DROP). - Unusual response sizes or database error messages in HTTP responses.
- HTTP requests with
- Host:
- Database logs showing unexpected queries or errors.
- Application logs with SQL syntax errors.
- File:
- No specific file-based IOCs.
Detection Engineering
YARA Rule
rule CVE_2019_25700_SQLi {
meta:
description = "Detects SQL injection attempts targeting CVE-2019-25700"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2019-25700"
strings:
$sqli1 = /sort_direction=.*(?:UNION|SELECT|DROP|INSERT|UPDATE|DELETE|--|;)/i
$sqli2 = /sort_direction=.*(?:'|%27|"|%22)/i
condition:
any of them
}
Sigma Rule
title: CVE-2019-25700 SQL Injection Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts in sort_direction parameter
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains: "sort_direction="
c-uri|re: "sort_direction=.*(?:UNION|SELECT|DROP|INSERT|UPDATE|DELETE|--|;|'|%27)"
condition: selection
falsepositives:
- Legitimate use of SQL keywords in parameter values (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2019-25700 SQL Injection Attempt"; flow:to_server; content:"sort_direction="; nocase; pcre:"/sort_direction=.*(?:UNION|SELECT|DROP|INSERT|UPDATE|DELETE|--|;|'|%27)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint if possible, or restrict access to it via firewall rules.
- Implement input validation – whitelist allowed values for
sort_direction(e.g., onlyASCandDESC). - Use parameterized queries or prepared statements to prevent SQL injection.
- Apply a Web Application Firewall (WAF) rule to block SQL injection patterns.
Long-Term Fix:
- The vendor (Kados) should release a security patch. Since no patch is available, consider migrating to a different product or implementing a custom fix.
Workaround:
- Modify the application code to use a whitelist approach as shown in the patched code example.
Valters IT
{/* [Security Hash: 1098F6816A7D676520797C8B] */}