Descrizione
pgjdbc, the PostgreSQL JDBC Driver, does not close the connection when an unchecked exception interrupts a request. Part of a Bind message stays in the send buffer, and the server reads the bytes that follow as the rest of it. The bytes of a value uploaded later on the same connection can then run as a SQL command. Since 42.6.0 a setBinaryStream() value without a length that is executed again throws such an exception, as does the driver's own retry after SQLState 0A000 or 26000. An application stream that throws an unchecked exception has the same effect in all versions. All versions before 42.7.15 are affected, and 42.7.15 fixes the problem.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5, EPSS 0.4% (percentile 24).
Versioni da aggiornare
- pgjdbc pgjdbc: vulnerabili le versioni precedenti alla
42.7.15→ aggiornare alla42.7.15o successiva.
Indicazioni del vendor
Soluzione (testo originale del vendor):
Upgrade to pgjdbc 42.7.15 or later.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Attivare regole WAF anti SQL injection, ridurre i privilegi dell'utente del database e monitorare query anomale.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| pgjdbc | pgjdbc | < 42.7.15 | 42.7.15 |