CVE-2024-8927

cgi.force_redirect configuration is bypassable due to the environment variable collision

Published Oct 8, 2024 CVSS 3.1 · 7.5 High EPSS 1.1% KEV · Not listed
Description
In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, HTTP_REDIRECT_STATUS variable is used to check whether or not CGI binary is being run by the HTTP server. However, in certain scenarios, the content of this variable can be controlled by the request submitter via HTTP headers, which can lead to cgi.force_redirect option not being correctly applied. In certain configurations this may lead to arbitrary file inclusion in PHP.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3920-1 php7.4 security update
Debian DSA Debian DSA DSA-5780-1 php8.2 security update
EUVD EUVD EUVD-2024-49490 In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, HTTP_REDIRECT_STATUS variable is used to check whether or not CGI binary is being run by the HTTP server. However, in certain scenarios, the content of this variable can be controlled by the request submitter via HTTP headers, which can lead to cgi.force_redirect option not being correctly applied. In certain configurations this may lead to arbitrary file inclusion in PHP.
Ubuntu USN Ubuntu USN USN-7049-1 PHP vulnerabilities
Ubuntu USN Ubuntu USN USN-7049-2 PHP vulnerabilities
Ubuntu USN Ubuntu USN USN-7049-3 PHP vulnerabilities
History
Type Values Removed Values Added
Weaknesses NVD-CWE-noinfo NVD-CWE-Other
CPEs cpe:2.3:a:php-fpm:php-fpm:*:*:*:*:*:*:*:*
Vendors & Products Php-fpm
Php-fpm php-fpm
Type Values Removed Values Added
Metrics epss

{'score': 0.00058}

epss

{'score': 0.00047}

Type Values Removed Values Added
First Time appeared Redhat
Redhat enterprise Linux
CPEs cpe:/a:redhat:enterprise_linux:8
cpe:/a:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Type Values Removed Values Added
First Time appeared Php-fpm
Php-fpm php-fpm
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:a:php-fpm:php-fpm:*:*:*:*:*:*:*:*
Vendors & Products Php-fpm
Php-fpm php-fpm
Type Values Removed Values Added
First Time appeared Php
Php php
CPEs cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
Vendors & Products Php
Php php
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description A flaw was found in PHP. The configuration directive `cgi.force_redirect` prevents anyone from calling PHP directly with a URL such as http://host.example/cgi-bin/php/secretdir/script.php. However, in certain uncommon configurations, an attacker may be able to bypass this restriction and access php-cgi directly. In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, HTTP_REDIRECT_STATUS variable is used to check whether or not CGI binary is being run by the HTTP server. However, in certain scenarios, the content of this variable can be controlled by the request submitter via HTTP headers, which can lead to cgi.force_redirect option not being correctly applied. In certain configurations this may lead to arbitrary file inclusion in PHP.
Title php: cgi.force_redirect configuration is bypassable due to the environment variable collision cgi.force_redirect configuration is bypassable due to the environment variable collision
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'}

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

Type Values Removed Values Added
Description A flaw was found in PHP. The configuration directive `cgi.force_redirect` prevents anyone from calling PHP directly with a URL such as http://host.example/cgi-bin/php/secretdir/script.php. However, in certain uncommon configurations, an attacker may be able to bypass this restriction and access php-cgi directly.
Title php: cgi.force_redirect configuration is bypassable due to the environment variable collision
Weaknesses CWE-1220
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'}

threat_severity

Moderate

Weaknesses

Sources

Status
PUBLISHED
Assigner
php
Published
Updated
Nov 3, 2025, 10:33 PM
Reserved
Sep 17, 2024, 4:09 AM
Status
Modified
Published
Oct 8, 2024, 4:15 AM
Modified
Jun 17, 2026, 8:23 AM
Severity
Moderate
Public date
Oct 7, 2024, 12:00 AM