Descrizione
SQL::Abstract versions before 2.000003 for Perl allow SQL injection via an arrayref column value in insert and update. With the array_datatypes option off, which is the default, insert(), update() and values() treat an arrayref column value as literal SQL. Its first element goes into the SQL text unescaped and the rest become bind values. A JSON array, or a repeated form field decoded as an arrayref, is such a value. An application that passes request data as column values to insert or update with the default options allows SQL injection. Releases before 2.000003 also treat an arrayref in generate() as literal SQL, including through AUTOLOAD when allow_autoload is on, whatever array_datatypes is set to.
Come correggere
Priorità: Alta — pianificare la correzione entro pochi giorni. Motivazione: CVSS 9.8, EPSS 0.3% (percentile 25).
Versioni da aggiornare
- SQL-Abstract: vulnerabili le versioni precedenti alla
2.000003→ aggiornare alla2.000003o successiva.
Indicazioni del vendor
Soluzione (testo originale del vendor):
Upgrade to SQL-Abstract 2.000003 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 |
|---|---|---|---|
| — | SQL-Abstract | < 2.000003 | 2.000003 |