CVE-2025-65103
Executive Summary
CVE-2025-65103 is a critical SQL Injection vulnerability in OpenSTAManager, an open-source management software for technical assistance and invoicing. The flaw resides in the API endpoint, where the display parameter is not properly sanitized. An authenticated attacker, regardless of their privilege level, can inject arbitrary SQL commands. This allows for the exfiltration, modification, or deletion of all database contents, leading to a full system compromise. The vulnerability is patched in version 2.9.5. The EPSS score is 0.0%, indicating low exploitation activity in the wild at the time of analysis, but the high CVSS score and ease of exploitation make this a critical risk for any organization using an unpatched version.
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: 8.8 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network (N) - Exploitable remotely.
- Attack Complexity (AC): Low (L) - No special conditions required.
- Privileges Required (PR): Low (L) - Requires authentication, but any user level works.
- User Interaction (UI): None (N) - No user action needed.
- Scope (S): Unchanged (U) - The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) - Complete database read access.
- Integrity (I): High (H) - Complete database write/delete access.
- Availability (A): High (H) - Can delete data or cause denial of service.
Threat Level: Critical. The low privilege requirement and high impact make this a prime target for attackers who have already gained a foothold or for malicious insiders.
Deep Dive & Mechanics
The vulnerability is an authenticated SQL Injection in the API. The display parameter, likely used for pagination or field selection, is directly concatenated into an SQL query without proper sanitization or parameterization.
Vulnerable Code (Conceptual):
// Vulnerable API endpoint
$display = $_GET['display'];
$query = "SELECT * FROM invoices WHERE user_id = " . $user_id . " ORDER BY " . $display;
$result = mysqli_query($conn, $query);
An attacker can manipulate the display parameter to break out of the intended SQL syntax and inject arbitrary commands.
Exploitation Scenario:
- Attacker authenticates to OpenSTAManager (e.g., as a low-privilege user).
- Attacker crafts a malicious API request to the vulnerable endpoint.
- The
displayparameter is set to a payload like:id; DROP TABLE users; -- - The resulting SQL query becomes:
SELECT * FROM invoices WHERE user_id = 1 ORDER BY id; DROP TABLE users; -- - The database executes the injected
DROP TABLEcommand, destroying theuserstable.
Vulnerable vs. Patched Code
Vulnerable (Pre-2.9.5):
// Direct concatenation of user input
$display = $_GET['display'];
$query = "SELECT * FROM invoices ORDER BY " . $display;
Patched (2.9.5+):
// Using prepared statements or whitelisting
$allowed_columns = ['id', 'date', 'total'];
$display = $_GET['display'];
if (in_array($display, $allowed_columns)) {
$query = "SELECT * FROM invoices ORDER BY " . $display;
} else {
// Handle invalid input
die("Invalid column");
}
// Or better, use parameterized queries for the WHERE clause
$stmt = $conn->prepare("SELECT * FROM invoices WHERE user_id = ? ORDER BY id");
$stmt->bind_param("i", $user_id);
The patch implements input validation by whitelisting allowed values for the display parameter, preventing arbitrary SQL injection.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Deploy a vulnerable instance of OpenSTAManager (version < 2.9.5) using Docker or a local web server.
- Create a low-privilege user account.
- Use a tool like
sqlmaporBurp Suiteto test the vulnerability.
Exploitation Steps:
- Authenticate and obtain a session cookie.
- Identify the vulnerable API endpoint (e.g.,
/api/invoices?display=id). - Inject a SQL payload into the
displayparameter.
Example Payload (using Burp Suite Repeater):
GET /api/invoices?display=id; SELECT * FROM users; -- HTTP/1.1
Host: target.com
Cookie: PHPSESSID=your_session_id
Automated Exploitation with sqlmap:
sqlmap -u "http://target.com/api/invoices?display=id" --cookie="PHPSESSID=your_session_id" --batch --dbs
Blue Team (Defensive)
Detection Steps:
- Monitor web server logs for unusual SQL keywords in the
displayparameter (e.g.,UNION,SELECT,DROP,--). - Implement a Web Application Firewall (WAF) rule to block SQL injection patterns.
- Review database logs for unexpected queries or errors.
Hunting Query (Splunk):
index=web_logs sourcetype=access_combined
| search uri_path="/api/invoices" AND uri_query=*display*
| regex uri_query="(?i)(union|select|drop|insert|update|delete|--|;|')"
| table _time, clientip, uri_query, status
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to
/api/invoiceswith adisplayparameter containing SQL keywords (e.g.,UNION,SELECT,DROP). - Unusual database error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
- HTTP requests to
- Host IOCs:
- Unexpected database entries or missing data.
- New user accounts with elevated privileges.
- Unusual database queries in logs (e.g.,
SELECT * FROM mysql.user).
- File IOCs:
- Modified or new PHP files in the web root (post-exploitation webshells).
Detection Engineering
YARA Rule
rule CVE_2025_65103_SQLi_Display_Param {
meta:
description = "Detects SQL injection attempts targeting the display parameter in OpenSTAManager"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-65103"
strings:
$s1 = "display=" nocase
$s2 = "union" nocase
$s3 = "select" nocase
$s4 = "drop" nocase
$s5 = "insert" nocase
$s6 = "update" nocase
$s7 = "delete" nocase
$s8 = "--" nocase
$s9 = ";" nocase
condition:
$s1 and any of ($s2, $s3, $s4, $s5, $s6, $s7, $s8, $s9)
}
Sigma Rule
title: CVE-2025-65103 SQL Injection in OpenSTAManager API
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SQL injection attempts against the display parameter in OpenSTAManager API
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains: 'display='
keywords:
- 'union'
- 'select'
- 'drop'
- 'insert'
- 'update'
- 'delete'
- '--'
- ';'
condition: selection and keywords
falsepositives:
- Legitimate use of the word 'select' in a parameter value (unlikely)
level: high
Suricata Rule
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"CVE-2025-65103 SQL Injection Attempt - OpenSTAManager display parameter"; flow:to_server,established; content:"display="; http_uri; pcre:"/(union|select|drop|insert|update|delete|--|;)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade: Update OpenSTAManager to version 2.9.5 or later immediately.
- Virtual Patching: If immediate upgrade is not possible, deploy a WAF rule to block requests containing SQL keywords in the
displayparameter. - Review Access: Audit all user accounts and revoke unnecessary privileges.
Long-Term Mitigations:
- Secure Coding: Implement parameterized queries (prepared statements) for all database interactions.
- Input Validation: Whitelist allowed values for any user-controlled parameters used in SQL queries.
- Regular Audits: Conduct regular code reviews and penetration testing.
- Principle of Least Privilege: Ensure database accounts used by the application have minimal necessary permissions.
Valters IT
DevSecOps & Cyber Threat Intelligence