Skip to content
Heist/ feed
Back to feed
High

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-8927
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 17:41 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 8 Oct 2024, 03:56 UTC

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.

osv:CVE-2024-8927
Complete source record
{
  "id": "cfeb3717fbfa88cbc422e2c4721a32d5a3f19933cdc0e1c5207fb350c1368184",
  "url": "https://osv.dev/vulnerability/CVE-2024-8927",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "cgi.force_redirect configuration is bypassable due to the environment variable collision",
    "summary": "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.",
    "evidence": "osv:CVE-2024-8927",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-8927",
      "aliases": [
        "BIT-libphp-2024-8927",
        "BIT-php-2024-8927",
        "BIT-php-min-2024-8927",
        "CVE-2024-8927",
        "GHSA-94p6-54jq-9mwp"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/php/php-src",
              "type": "GIT",
              "events": [
                {
                  "introduced": "381ba9f5d0edd0c9c8ec1dea7e21d513ad08b115"
                },
                {
                  "fixed": "773c0eda4ac8181c59a6510a39c37710679277a4"
                },
                {
                  "introduced": "70ee6c20ad97e02c2b8098aeea96fefbbc3ac5c2"
                },
                {
                  "fixed": "12ccdff196cd927b2c3e9c04abad3c4117b5bd42"
                },
                {
                  "introduced": "d26068059e83fe40de3430a512471d194119bee0"
                },
                {
                  "fixed": "b4ecd9aa2edfdff932deb9c09105a9cb3445c3bc"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.1.0"
                      },
                      {
                        "fixed": "8.1.30"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.2.0"
                      },
                      {
                        "fixed": "8.2.24"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.3.0"
                      },
                      {
                        "fixed": "8.3.12"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-8927.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.033376153Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2024/10/msg00011.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/8xxx/CVE-2024-8927.json",
        "https://github.com/php/php-src/security/advisories/GHSA-94p6-54jq-9mwp",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-8927",
        "https://security.netapp.com/advisory/ntap-20241101-0003/"
      ],
      "provider_metadata": {
        "cna_assigner": "php",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/8xxx/CVE-2024-8927.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-8927",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 497958,
  "published_at": "2024-10-08T03:56:31.849+00:00"
}