VULNARCHIVE

GCVE-1988-2026-0509

CVE-2026-109618: PHP-CGI Pointer Underflow → Remote Code Execution (CVSS 9.2)

Description (en)

CVE-2026-109618: Pointer underflow in PHP's CGI SAPI enables
unauthenticated remote code execution.

Affected: ALL PHP versions 5.x through 8.4.26 with cgi.fix_pathinfo=1
(default configuration). Same vulnerability class as CVE-2019-11043
(PHP-FPM, CVSS 9.8, patched 2019) — the CGI SAPI never received the
equivalent fix.

Fix: PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35 (scheduled Oct 21, 2026 14:00 UTC)
PHP 8.1 and earlier (EOL) receive NO fix.

Root cause: sapi/cgi/cgi_main.c — missing bounds check in path_info
pointer arithmetic. Fix: php-src PR #23411 adds the guard.

Exploitation chain (independently confirmed, 9/9 automated tests):
1. OOB Read — leak heap data via corrupted PATH_INFO
2. Info Leak — extract fcgi_data_seg pointers (ASLR bypass)
3. Write Primitive — ASAN SCARINESS 30 (wild-addr-write)
4. Code Execution — .user.ini auto_prepend_file injection

Mitigation: set cgi.fix_pathinfo=0 in php.ini

Exposure: ~884,000 internet-facing hosts on EOL PHP versions.
Default PHP configuration is vulnerable.

IMPORTANT: Several "PoC" repositories on exploit aggregators claim to
target CVE-2026-109618 but actually exploit session.upload_progress UAF —
a completely different vulnerability. Disabling session.upload_progress
does NOT mitigate this vulnerability. The correct mitigation is
cgi.fix_pathinfo=0.

Detection: %0a/%0d in URI path targeting .php endpoints (very low false
positive rate).

References:
php-src PR #23411:
https://www.google.com/url?q=https://github.com/php/php-src/pull/23411&source=gmail&ust=1792646638609000&sa=E
CVE-2019-11043 (FPM equivalent):
https://www.google.com/url?q=https://nvd.nist.gov/vuln/detail/CVE-2019-11043&source=gmail&ust=1792646638609000&sa=E

Full PoC will be published after patches are available.

Independent discovery via source code audit.
Jose
_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: https://seclists.org/fulldisclosure/

References

Raw JSON
{
  "containers": {
    "cna": {
      "affected": [
        {
          "product": "unknown",
          "vendor": "unknown",
          "versions": [
            {
              "status": "affected",
              "version": "unknown"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "jose"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "CVE-2026-109618: Pointer underflow in PHP's CGI SAPI enables\nunauthenticated remote code execution.\n\nAffected: ALL PHP versions 5.x through 8.4.26 with cgi.fix_pathinfo=1\n(default configuration). Same vulnerability class as CVE-2019-11043\n(PHP-FPM, CVSS 9.8, patched 2019) — the CGI SAPI never received the\nequivalent fix.\n\nFix: PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35 (scheduled Oct 21, 2026 14:00 UTC)\nPHP 8.1 and earlier (EOL) receive NO fix.\n\nRoot cause: sapi/cgi/cgi_main.c — missing bounds check in path_info\npointer arithmetic. Fix: php-src PR #23411 adds the guard.\n\nExploitation chain (independently confirmed, 9/9 automated tests):\n1. OOB Read — leak heap data via corrupted PATH_INFO\n2. Info Leak — extract fcgi_data_seg pointers (ASLR bypass)\n3. Write Primitive — ASAN SCARINESS 30 (wild-addr-write)\n4. Code Execution — .user.ini auto_prepend_file injection\n\nMitigation: set cgi.fix_pathinfo=0 in php.ini\n\nExposure: ~884,000 internet-facing hosts on EOL PHP versions.\nDefault PHP configuration is vulnerable.\n\nIMPORTANT: Several \"PoC\" repositories on exploit aggregators claim to\ntarget CVE-2026-109618 but actually exploit session.upload_progress UAF —\na completely different vulnerability. Disabling session.upload_progress\ndoes NOT mitigate this vulnerability. The correct mitigation is\ncgi.fix_pathinfo=0.\n\nDetection: %0a/%0d in URI path targeting .php endpoints (very low false\npositive rate).\n\nReferences:\nphp-src PR #23411:\nhttps://www.google.com/url?q=https://github.com/php/php-src/pull/23411&source=gmail&ust=1792646638609000&sa=E\nCVE-2019-11043 (FPM equivalent):\nhttps://www.google.com/url?q=https://nvd.nist.gov/vuln/detail/CVE-2019-11043&source=gmail&ust=1792646638609000&sa=E\n\nFull PoC will be published after patches are available.\n\nIndependent discovery via source code audit.\nJose\n_______________________________________________\nSent through the Full Disclosure mailing list\nhttps://nmap.org/mailman/listinfo/fulldisclosure\nWeb Archives & RSS: https://seclists.org/fulldisclosure/"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-11-02T07:30:04Z",
        "orgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
        "shortName": "VULNARCHIVE"
      },
      "references": [
        {
          "tags": [
            "technical-description",
            "exploit"
          ],
          "url": "https://vuln.freearchive.org/archive/full-disclosure/2026/Oct/38"
        },
        {
          "tags": [
            "technical-description"
          ],
          "url": "https://seclists.org/fulldisclosure/2026/Oct/38"
        },
        {
          "url": "https://nmap.org/mailman/listinfo/fulldisclosure"
        },
        {
          "url": "https://seclists.org/fulldisclosure/"
        },
        {
          "url": "https://www.google.com/url?q=https://github.com/php/php-src/pull/23411&source=gmail&ust=1792646638609000&sa=E"
        },
        {
          "url": "https://www.google.com/url?q=https://nvd.nist.gov/vuln/detail/CVE-2019-11043&source=gmail&ust=1792646638609000&sa=E"
        }
      ],
      "source": {
        "defect": [
          "https://seclists.org/fulldisclosure/2026/Oct/38"
        ],
        "discovery": "EXTERNAL"
      },
      "title": "CVE-2026-109618: PHP-CGI Pointer Underflow → Remote Code Execution (CVSS 9.2)",
      "x_gcve": [
        {
          "recordType": "analysis",
          "relationships": [
            {
              "destId": "CVE-2019-11043",
              "type": "related"
            },
            {
              "destId": "CVE-2026-109618",
              "type": "related"
            }
          ],
          "vulnId": "GCVE-1988-2026-0509",
          "x_vulnarchive": {
            "archiveUrl": "https://vuln.freearchive.org/archive/full-disclosure/2026/Oct/38",
            "automated": true,
            "contentSha256": "b7962910087718135806590530ed5dc3a3339f827171bcdd113e1c7208cf846c",
            "evidenceScore": 7,
            "messageId": "",
            "originalUrl": "https://seclists.org/fulldisclosure/2026/Oct/38",
            "policy": "vulnarchive-1",
            "sourceFormat": "text/html",
            "sourcePublishedAt": "2026-10-21T05:23:58Z"
          }
        }
      ]
    }
  },
  "cveMetadata": {
    "assignerOrgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
    "assignerShortName": "VULNARCHIVE",
    "datePublished": "2026-11-02T07:30:04Z",
    "dateUpdated": "2026-11-02T07:30:04Z",
    "state": "PUBLISHED",
    "vulnId": "GCVE-1988-2026-0509"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}