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.
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.
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.
This is a critical SQL Injection vulnerability. Any authenticated user, even those with the lowest privileges, can exploit this vulnerability to:
{
"nvd_published_at": "2025-11-19T20:15:54Z",
"github_reviewed": true,
"cwe_ids": [
"CWE-89"
],
"severity": "HIGH",
"github_reviewed_at": "2025-11-19T21:00:37Z"
}