First published: Thu Sep 26 2024(Updated: )
According to <a href="https://www.php.net/manual/en/security.cgi-bin.force-redirect.php">https://www.php.net/manual/en/security.cgi-bin.force-redirect.php</a>, the configuration directive cgi.force_redirect prevents anyone from calling PHP directly with a URL like <a href="http://host.example/cgi-bin/php/secretdir/script.php">http://host.example/cgi-bin/php/secretdir/script.php</a>. The default value of cgi.force_redirect is 1. But there is a bug that can cause attackers to bypass restrictions and access php-cgi directly.
Credit: security@php.net security@php.net
Affected Software | Affected Version | How to fix |
---|---|---|
Php-fpm Php-fpm | >=8.1.0<8.1.30 | |
Php-fpm Php-fpm | >=8.2.0<8.2.24 | |
Php-fpm Php-fpm | >=8.3.0<8.3.12 | |
debian/php7.4 | <=7.4.33-1+deb11u5 | 7.4.33-1+deb11u7 |
debian/php8.2 | 8.2.26-1~deb12u1 8.2.27-1 | |
PHP | <8.3.12 | 8.3.12 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2024-8927 has a high severity due to its potential to allow unauthorized access to PHP scripts.
To fix CVE-2024-8927, update PHP to versions 8.3.12, 8.2.26-1~deb12u1, or 8.2.27 as appropriate.
CVE-2024-8927 affects PHP versions from 8.1.0 to 8.1.30, 8.2.0 to 8.2.24, and from 8.3.0 to 8.3.12.
Setting cgi.force_redirect to a value that restricts access can mitigate the risks associated with CVE-2024-8927.
Yes, CVE-2024-8927 is related to previous vulnerabilities affecting PHP’s handling of CGI scripts.