Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-2jm2-2p35-rp3j
No affected components available
Summary
An authenticated SQL Injection vulnerability in the API allows any user, regardless of permission level, to execute arbitrary SQL queries. By manipulating the display parameter in an API request, an attacker can exfiltrate, modify, or delete any data in the database, leading to a full system compromise.
Details
The vulnerability is located in the retrieve() method within src/API/Manager.php.
User input from the display GET parameter is processed without proper validation. The code strips the surrounding brackets [], splits the string by commas, and then passes each resulting element directly into the selectRaw() function of the query builder.
// User input from 'display' is taken without sanitization.
$select = !empty($request['display']) ? explode(',', substr((string) $request['display'], 1, -1)) : null;
// ...
// The unsanitized input is passed directly to `selectRaw()`.
foreach ($select as $s) {
$query->selectRaw($s);
}
Since selectRaw() is designed to execute raw SQL expressions, it executes any malicious SQL code provided in the display parameter.
PoC
- Log in to an OpenSTAManager instance as any user.
- Navigate to the user's profile page to obtain their personal API Token.
- Use this API token to send a specially crafted GET request to the API endpoint.
Time-Based Blind Injection Test:
Replace <your_host>, <your_token>, and <resource_name> with your actual values. anagrafiche is a valid resource.
curl "http://<your_host>/openstamanager/api?token=<your_token>&resource=anagrafiche&display=[1,SLEEP(5)]"
The server will delay its response by approximately 5 seconds, confirming the SLEEP(5) command was executed by the database.
Impact
This is a critical SQL Injection vulnerability. Any authenticated user, even those with the lowest privileges, can exploit this vulnerability to:
- Exfiltrate all data from the database (e.g., user credentials, customer information, invoices, internal data).
- Modify or delete data, compromising data integrity.
- Potentially achieve further system compromise, depending on the database user's privileges and system configuration.
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information. There is a high impact on the integrity of the data. There is a high impact on the availability of the system.
Exploitation activity has been observed. Apply available patches or mitigations urgently.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard