Descrizione
pgjdbc, the PostgreSQL JDBC Driver, misreads some quoted text in its query parser. A `}` inside a literal ends a JDBC escape such as `{ts}`, and the rest of the literal is translated as SQL. A dollar quote whose tag has a non-ASCII symbol or space is not recognized. An `E''` string with a doubled quote is scanned as a standard string. `{fn right}` and `{fn timestampdiff}` with a negative argument produce a `--` comment. In each case text that the application quoted correctly can run as SQL with the privileges of the application's database role. 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 8.1, EPSS 0.4% (percentile 28).
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 |