Advisories · PHP & Laravel
CVE-2024-8927
High
CVSS 7.5
PHP environment variable handling bug
Disclosed 2024 · Last reviewed 2 Dec 2026
Certain SAPIs could let a request influence environment variables that PHP then exposed to the script.
What happened
Environment import did not ignore a name that collided with a real variable.
Affected and patched versions
- Affected
- PHP 8.1 before 8.1.30, 8.2 before 8.2.24, and 8.3 before 8.3.12, on SAPIs where environment variables are taken from the request.
- Patched
- PHP 8.1.30, 8.2.24, 8.3.12, and later.
How to check your server
Check
php -v
How to fix and harden
- Upgrade PHP.
- Do not trust request data as environment. cgi.force_redirect and a modern PHP-FPM pool are the setups to prefer.
Fix
php -v
Sources
Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON