Descrizione
Symlink following in PostgreSQL pg_basebackup plain format and in pg_rewind allows an origin superuser to overwrite local files, e.g. /var/lib/postgres/.bashrc, that hijack the operating system account. It will remain the case that starting the server after these commands implicitly trusts the origin superuser, due to features like shared_preload_libraries. Hence, the attack has practical implications only if one takes relevant action between these commands and server start, like moving the files to a different VM or snapshotting the VM. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 8.8.
Versioni da aggiornare
- Postgresql Postgresql: vulnerabili le versioni precedenti alla
14.23→ aggiornare alla14.23o successiva. - Postgresql Postgresql: vulnerabili le versioni dalla
15.0precedenti alla15.18→ aggiornare alla15.18o successiva. - Postgresql Postgresql: vulnerabili le versioni dalla
16.0precedenti alla16.14→ aggiornare alla16.14o successiva. - Postgresql Postgresql: vulnerabili le versioni dalla
17.0precedenti alla17.10→ aggiornare alla17.10o successiva. - Postgresql Postgresql: vulnerabili le versioni dalla
18.0precedenti alla18.4→ aggiornare alla18.4o successiva.
Patch e advisory
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre l'esposizione del componente vulnerabile (segmentazione, accesso solo da reti fidate) finché la patch non è applicata.
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 |
|---|---|---|---|
| Postgresql | Postgresql | < 14.23 | 14.23 |
| Postgresql | Postgresql | ≥ 15.0 < 15.18 | 15.18 |
| Postgresql | Postgresql | ≥ 16.0 < 16.14 | 16.14 |
| Postgresql | Postgresql | ≥ 17.0 < 17.10 | 17.10 |
| Postgresql | Postgresql | ≥ 18.0 < 18.4 | 18.4 |