News › #security

Two critical PHP engine flaws found independently with frontier AI models: what was fixed and what to check

updated 25 Oct 20265 min readVerified
php.net

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix CVE-2026-109618 and CVE-2026-109619 (CVSS 9.2), memory-safety errors in request cleanup. Calif and Wiz found them independently using GPT-5.6 Sol and Gemini 4 Argon. We explain the root causes at advisory level, the timeline, the broken embargo, and how to check your servers.

In short

On 21 October 2026, the PHP project released fixes for two critical remote-code-execution flaws in the PHP engine, CVE-2026-109618 and CVE-2026-109619 (CVSS v4 9.2 each). They affect every PHP installation that serves web requests and has not been updated to 8.5.12, 8.4.27, 8.3.36 or 8.2.35. The flaws were found independently by two teams that used general-purpose frontier models: the security firm Calif with OpenAI's GPT-5.6 Sol, and Wiz with its own tools, Gemini 4 Argon and GPT-5.6 Sol. The case is the most prominent example so far of AI models finding a high-impact bug in core infrastructure, and it also showed how hard it is to keep such findings embargoed.

How it works

The bugs, at the level of the official advisories. Both flaws are memory-safety errors in how PHP cleans up after a request.

  • CVE-2026-109618 ("RCE via OOM corruption"). When PHP runs out of memory, it aborts the request with a non-local jump (longjmp()). In some early startup and parsing states, this leaves request memory partly initialized, and the shutdown code then works on invalid data. Listed weaknesses include use-after-free (CWE-416) and access of an uninitialized pointer (CWE-824).
  • CVE-2026-109619 ("RCE via stale global state"). In long-lived PHP worker processes, some request-specific global state is not reset before the request's memory is freed, so later operations can read freed memory.

The CVSS vector for both is AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H: reachable over the network, without login or user interaction, but with high attack complexity and specific preconditions. The PHP Foundation's security engineer Volker Dusch called it the most severe PHP issue in more than a decade, according to The Next Web.

The fix. The patch replaces the immediate longjmp() on out-of-memory with a delayed "soft" out-of-memory state and a "hard" limit at a higher threshold, so that the engine can unwind cleanly.

The role of AI. Calif says it used only generally available models and no special tooling, and that knowledge of PHP's history mattered more than the model itself. OpenAI funded the audit through its "Patch the Planet" program and uses the term "Defender's Window" for the period in which defenders with frontier AI find bugs before attackers do. The published sources do not describe the AI workflow in detail (for example, whether the models read source code, ran fuzzers, or acted as agents).

Analogy: two different locksmiths, each with a new kind of magnifying glass, found the same weak spot in a lock that has been on most doors for many years.

Under the hood

Timeline (2026, from the PHP Foundation as reported by Unite.AI and The Next Web).

Date Event
30 Jul – 1 Aug Calif starts its audit and finds the first issue
11 Aug Calif reports an unconditional RCE; OpenAI reports the same root cause the same day
19–24 Aug Wiz finds the flaws independently, confirms them against WordPress and Drupal, and reports both
21 Sep PHP starts the coordinated fix
20 Oct Advance notice with CVSS 9.2; CVE IDs leak with a wrong score of 10.0; a proof-of-concept video is published by mistake
21 Oct Cloudflare enables firewall rules for all customers (03:02 UTC); fixed builds appear early; coordinated release at 14:00 UTC

Exposure. Wiz describes PHP as running about 70% of websites. This is a market-share figure, not a count of vulnerable sites. Several outlets turned it into "70% of the web is vulnerable", which the sources do not support. CERT-EU and the UK NCSC advised taking systems offline where patching was not possible, according to The Next Web.

Update, 25 October 2026: exploitation in the wild. Palo Alto Networks' Unit 42 reported on 23 October that attackers exploited the flaws against a European government entity. Within two hours of the initial compromise, the attackers reportedly obtained password hashes and multi-factor authentication secrets and tried to move further into the internal Windows domain. Unit 42 attributes the post-exploitation phase to an agentic AI attack platform, based on the machine-readable format of the attacker's commands and the speed of short tasks and pivots after failures; it does not name the platform. Unit 42's telemetry counts over 22.6 million internet-exposed instances that are potentially vulnerable. This is a vendor estimate, not a count of confirmed vulnerable servers. If you have not patched yet, treat unpatched servers as possibly compromised and check them for signs of intrusion, not only for the PHP version.

Interim measures (from php.net). If you cannot update immediately, PHP lists measures that reduce but do not remove the risk. Examples: enforce request size limits at the web server or proxy, disable session.upload_progress.enabled in php.ini (not via ini_set()) and restart all workers, and on PHP 8.5 set fatal_error_backtraces=0. PHP states that updating is the only complete fix. PHP 8.1 and older are out of support; the PHP security team published minimal source backports for 7.4, 8.0 and 8.1.

Why this matters for AI. Two independent teams found the same root cause within weeks of each other, which suggests that the barrier to finding such bugs has dropped. The embargo still broke a day early. For defenders, the practical lesson is the speed of patching, not the identity of the finder.

Try it yourself

Check whether your own servers run a fixed version. Run this on each machine, and also inside each container image that runs PHP:

php -r 'echo PHP_VERSION, PHP_EOL;'

Compare the output with the fixed versions:

fixed = {"8.5": 12, "8.4": 27, "8.3": 36, "8.2": 35}

def status(version: str) -> str:
    major_minor, patch = version.rsplit(".", 1)
    if major_minor not in fixed:
        return "unsupported branch: use a vendor backport or upgrade"
    return "fixed" if int(patch.split("-")[0]) >= fixed[major_minor] else "VULNERABLE: update now"

for v in ["8.5.11", "8.5.12", "8.3.36", "8.1.33", "8.4.20-dev"]:
    print(v, "->", status(v))

Expected output (tested with Python 3.13):

8.5.11 -> VULNERABLE: update now
8.5.12 -> fixed
8.3.36 -> fixed
8.1.33 -> unsupported branch: use a vendor backport or upgrade
8.4.20-dev -> VULNERABLE: update now

Distribution packages (Debian, Ubuntu, RHEL and others) often keep an older version number and backport the fix. For those, check your vendor's security tracker for the two CVE IDs instead of comparing version numbers.

Sources

  1. PHP security advisory, 21 Oct 2026 (php.net)
  2. GHSA-w8hw-w9fx-j79w: RCE via OOM corruption (php-src)
  3. GHSA-6wmf-4rv5-p3rp: RCE via stale global state (php-src)
  4. Patch the Planet (OpenAI)
  5. PHP patches two critical RCE flaws found with frontier AI models (Unite.AI)
  6. PHP rushes out emergency patches for two critical bugs AI found first (The Next Web)
  7. Unit 42 threat brief: CVE-2026-109618 and CVE-2026-109619 (Palo Alto Networks, 23 Oct 2026)