Descrizione

Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown. A fatal error raised while modified INI settings are restored during request shutdown can repopulate the stored fatal error backtrace after the executor has been cleaned up. The request memory is then freed, and a diagnostic emitted before executor initialization in a later request handled by the same PHP-FPM or mod_php worker can access the stale backtrace. The shutdown error requires per-path configuration of max_memory_limit, or of zlib.output_compression together with output_handler (which .user.ini can also set). The early diagnostic requires Apache per-directory configuration or, for PHP-FPM, a PHP_VALUE or PHP_ADMIN_VALUE parameter sent by the front end. This can cause memory corruption and worker crashes, and may allow remote code execution. This issue affects PHP versions 8.5.* before 8.5.13.

Testo originale del record CVE (in inglese).

Come correggere

Priorità: Urgente — intervenire subito, entro 24-48 ore. Motivazione: CVSS 9.2, EPSS 11.0% (percentile 96).

Versioni da aggiornare

  • PHP Group PHP: vulnerabili le versioni dalla 8.5.0 precedenti alla 8.5.13 → aggiornare alla 8.5.13 o successiva.

Mitigazioni temporanee

Da applicare solo se non è possibile aggiornare subito:

  • Ridurre la superficie esposta (disattivare servizi e funzionalità inutilizzati), mantenere attive le protezioni del sistema operativo (ASLR, DEP/NX) e segmentare la rete.

Verifica

  1. Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
  2. Confrontare la versione installata con quelle indicate sopra.
  3. Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
  4. Ripetere la scansione per confermare la correzione.

Configurazioni interessate

VendorProdottoVersioni vulnerabiliCorretta in
PHP Group PHP ≥ 8.5.0 < 8.5.13 8.5.13

Riferimenti