Описание
OpenSTAManager has a SQL Injection in ajax_complete.php (get_sedi endpoint)
Summary
A SQL Injection vulnerability exists in the ajax_complete.php endpoint when handling the get_sedi operation. An authenticated attacker can inject malicious SQL code through the idanagrafica parameter, leading to unauthorized database access.
Proof of Concept
Vulnerable Code
File: modules/anagrafiche/ajax/complete.php:28
Data Flow
- Source:
$_GET['idanagrafica']→get('idanagrafica') - Vulnerable: User input concatenated directly into SQL query with single quotes
- Sink:
$dbo->fetchArray($q)executes the malicious query
Exploit
Manual PoC (Time-based Blind SQLi):
SQLMap Exploitation:
SQLMap Output:
Impact
- Data Exfiltration: Complete database extraction including user credentials, customer data, financial records
- Privilege Escalation: Modification of
zz_userstable to gain admin access - Data Integrity: Unauthorized modification or deletion of records
- Potential RCE: Via
SELECT ... INTO OUTFILEif file permissions allow
Affected Versions
- OpenSTAManager: Verified in latest version (as of December 2025)
- All versions using this endpoint are likely affected
Remediation
Replace direct concatenation with prepared statements:
Before:
After:
Credit
Discovered by: Łukasz Rybak
Пакеты
devcode-it/openstamanager
<= 2.9.8
Отсутствует
Связанные уязвимости
OpenSTAManager is an open source management software for technical assistance and invoicing. In version 2.9.8 and prior, a SQL Injection vulnerability exists in the ajax_complete.php endpoint when handling the get_sedi operation. An authenticated attacker can inject malicious SQL code through the idanagrafica parameter, leading to unauthorized database access. At time of publication, no known patch exists.