OpenSTAManager has Authenticated SQL Injection in API via 'display' parameter
Date: 2025-11
Affected: composer/devcode-it/openstamanager
Attack vector: sql-injection
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2025-65103
CWE: CWE-89
CVSS: 8.8 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)

### 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. ```php // 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 1. Log in to an OpenSTAManager instance as any user. 2. Navigate to the user's profile page to obtain their personal API Token. 3. 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 resou


Mitigations:

Architectural layers (MAESTRO):