Descrizione
On Windows, PHP's filesystem and stream APIs do not reject reserved device names such as CON, PRN, AUX, NUL, COM1 to COM9, LPT1 to LPT9, CONIN$ and CONOUT$ when they appear as a component of a path. An attacker-controlled filename therefore reaches CreateFileW() and opens a device instead of the regular file the application expected, which can block or hang the request and exhaust worker processes.
Tipo di vulnerabilità
CWE-67
Improper Handling of Windows Device Names
The product constructs pathnames from user input, but it does not handle or incorrectly handles a pathname containing a Windows device name such as AUX or CON. This typically leads to denial of service or an information exposure when the application attempts to process the pathname as a regular file.
Impatto sui sistemi
| Ambito | Impatto |
| Disponibilità, Riservatezza, Altro |
Interruzione del servizio: arresto o riavvio, Leggere i dati dell’applicazione, Altro |
Come si previene
Sviluppo
Be familiar with the device names in the operating system where your system is deployed. Check input for these device names.
Tutte le 7 CVE di tipo CWE-67, con andamento e prevenzione