Skip to content

OpenSTAManager has Authenticated SQL Injection in API via 'display' parameter

High severity GitHub Reviewed Published Nov 19, 2025 in devcode-it/openstamanager • Updated Nov 19, 2025

Package

composer devcode-it/openstamanager (Composer)

Affected versions

<= 2.9.4

Patched versions

2.9.5

Description

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

  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 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.

References

@loviuz loviuz published to devcode-it/openstamanager Nov 19, 2025
Published by the National Vulnerability Database Nov 19, 2025
Published to the GitHub Advisory Database Nov 19, 2025
Reviewed Nov 19, 2025
Last updated Nov 19, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(5th percentile)

Weaknesses

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Learn more on MITRE.

CVE ID

CVE-2025-65103

GHSA ID

GHSA-2jm2-2p35-rp3j

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.