CVE-2026–109618 — php got cooked?
The author theorises that a PHP memory-allocation failure during initialisation can leave internal data structures half-built, because the zend_bailout() error path escapes without cleaning up. The text claims this could expose unfinished structures to other internal code and possibly lead to remote code execution, but admits the RCE path is not yet understood.
medium.com
Published on medium.com
Cybersecurity
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is a theoretical note on CVE-2026-109618, a memory-handling bug in PHP. The author states up front that it is their understanding of the bug class, that they have not read the patch yet, and that the content is theoretical. The subject is not a web application feature but the PHP runtime itself: the Zend Engine, the component that executes PHP programs, and the way it allocates and frees memory.
The author's framing is that you do not need deep PHP knowledge to follow the issue, only knowledge of how PHP manages its memory internally. PHP is implemented in C, which gives it direct control over memory, and that control includes both allocating and freeing it. Allocating memory means storing a particular value for a parameter in RAM; once the instance is finished, the memory is freed.

Setup
The note describes no accounts, roles, tools or test environment. The only concrete artefacts are a small greeting script used to illustrate how PHP handles a request, and the list of fixed releases at the end. The author explicitly says the analysis is theoretical and written before reading the patch.
Finding it
The starting point is an ordinary script that greets a user:
<?php$name = $_GET["name"] ?? "Guest";echo "Hello, " . $name;?>
A request such as example.com/?name=fahisxd returns Hello, fahisxd. The author points out that this code is not executed by the visitor's browser but by the server.
The observation that leads into the bug is an edge case: what happens when PHP runs out of memory. PHP can be, and commonly is, configured with a memory limit, which stops PHP from taking all available memory and crashing the server. Suppose PHP has only 1 MB of space left against a 128 MB limit, and the allocator demands more than that 1 MB. The operation must stop safely.
The behaviour one would want is a clean sequence:
- Memory allocation fails.
- PHP detects the failure.
- PHP handles the error.
- PHP cleans up safely.
- The request terminates.
The CVE concerns what happens when PHP interrupts processing before its internal data structures are initialised. The bug leaves something half finished.
Exploitation
The author does not present a working exploit, a request or a payload. What follows is the sequence they use to reason about the failure, and they note at the end that they are still working out how it would lead to a probable RCE.
Step 1: allocate a field
A field is allocated, for example a name.
Step 2: initialise it
PHP tries to initialise the field with a value, in the author's example 0day. At this point there is not enough space to store that value.
Step 3: escape through zend_bailout()
The operation escapes through zend_bailout(), leaving the half-initialised structure accessible to other internal code.
The author notes that zend_bailout() is an old error handler. It performs an emergency escape from the current operation, leaving it uncleaned, instead of undoing what was done. The unfinished state can therefore still be reachable, and later cleanup processes may assume the structure is initialised.
Root cause
The greeting script is only an illustration; the issue concerns what happens when PHP interrupts processing before its internal data structures are initialised. In the author's example, the operation escapes through zend_bailout(), which leaves the current operation uncleaned instead of undoing it. The unfinished structure can still be accessible, and later cleanup processes may assume it is initialised. The author says the CVE concerns PHP interrupting processing before its internal data structures are initialised, leaving something half finished.
Impact
The author does not establish a concrete impact. They describe the unfinished structure as accessible to other internal code and note that they are still working out how it could lead to a probable RCE. No affected configurations, attack preconditions or severity are given; the author only describes a scenario where PHP runs out of memory.
Fix
The fix is to update PHP. The author lists the fixed releases as 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on 21 October. PHP 8.1 and older have no fix.
Variants to test
What happened, in plain words
A short note was published about a bug in PHP, the programming language used to build pages on many web servers. The bug has an identifier, CVE-2026-109618. A CVE is a public catalogue number given to a known security flaw so that people can talk about it unambiguously.
The author is honest about the limits of the note: it is their own understanding of this kind of bug, they had not read the official fix (the patch) when they wrote it, and everything in it is theoretical. There is no working attack in the note, no request that breaks a real server, and no proof that the flaw can be turned into remote code execution (RCE, meaning an attacker running their own commands on the server). The author says they are still working out how that would happen.
What the note does explain is a single idea: what PHP does when it runs out of memory halfway through preparing something internally, and why the way it gives up can leave a half-finished object behind that other parts of PHP might later trust.

Background: what PHP is and why memory matters
When you type an address into your browser and press Enter, your browser asks a server for a page. The server may be running a program written in PHP to build that page. Your browser never runs the PHP code; the server does, and it sends back only the finished result, usually HTML.
PHP itself is written in the C programming language. C is a low-level language: it lets a program ask the computer's operating system for a block of memory (RAM), use it, and later hand it back. That is called allocating and freeing memory. Allocating means reserving space to store a value; freeing means telling the system the space is no longer needed so something else can use it.
A useful comparison is a hotel. Allocating a room is checking a guest in and putting their name on the door. Freeing it is checking them out and wiping the board. If a guest checks in but the clerk is interrupted before writing the name, the room is marked as occupied but nobody knows by whom. That is the article's own comparison for a half-finished state.
The part of PHP that actually executes programs is called the Zend Engine. It is the machinery that reads your PHP code and carries it out, including all the allocating and freeing.
The example script
The note starts with the simplest possible PHP page, one that greets a visitor by name:
<?php$name = $_GET["name"] ?? "Guest";echo "Hello, " . $name;?>
Line by line, in plain words:
<?phpmarks the start of PHP code inside a file that is otherwise ordinary web page content.$name = $_GET["name"] ?? "Guest";creates a variable called$name.$_GETis PHP's built-in way of reading values that were appended to the address after a question mark. The??means "if that value is missing, use the thing on the right instead", so if no name was supplied the variable becomesGuest.echo "Hello, " . $name;prints the word Hello, a space, and then whatever is in$name. The dot joins the two pieces of text together.?>marks the end of the PHP code.
If someone visits example.com/?name=fahisxd, the server runs this script and the browser receives Hello, fahisxd. The important point is that the value fahisxd travelled from the visitor's browser to the server, and the server stored it in memory while building the reply. Every request like this causes PHP to allocate memory, use it, and free it again.
The edge case: running out of memory
PHP can be, and usually is, configured with a memory limit. This is a cap on how much RAM a single PHP request may use. Without it, PHP could take all the memory and crash the server. The limit is a safety valve.
Now the scenario the note asks you to imagine. The limit is 128 MB, and PHP has only 1 MB of room left under that cap. Something in the running program, the allocator (the internal component that hands out memory), asks for more than that 1 MB. The request cannot continue. It has to stop.
What you would want to happen is a tidy sequence:
- Memory allocation fails.
- PHP detects the failure.
- PHP handles the error.
- PHP cleans up safely.
- The request terminates.
Think of a shop closing for the night: the till is counted, the lights are switched off, the door is locked. Each step finishes before the next begins, and nothing is left in a strange state.
The CVE is about what happens when PHP is interrupted before its internal data structures are initialised. Initialised means set up with a valid starting value, the way a form is filled in before it is filed. If the interruption lands in the middle of that setup, something is left half finished.
What goes wrong, step by step
The note does not contain a real attack request or payload. Instead it walks through the failure in three steps, to show the shape of the problem.
Step 1: allocate a field
A field is allocated, for example a name. In hotel terms, a room is reserved and the key is handed over.
Step 2: initialise it
PHP tries to initialise the field with a value, in the author's example 0day. At this point there is not enough space to store that value. The guest is at the door, but the clerk cannot finish writing the name on the board.
Step 3: escape through zend_bailout()
The operation escapes through zend_bailout(), leaving the half-initialised structure accessible to other internal code.
zend_bailout() is an old error handler. When something goes badly wrong, it performs an emergency escape from the current operation. The comparison is a fire alarm: everyone leaves the building immediately, and nobody goes back to tidy the desks. It does not undo what was already done; it simply stops.
That is the critical element. Because the escape does not unwind the work, the unfinished state can still be reachable by other parts of PHP. Later cleanup processes may assume the structure is initialised. In hotel terms, the next clerk sees the room marked occupied and assumes a guest is properly checked in, when in fact the record was never completed.
Root cause
The greeting script is only an illustration; the issue concerns what happens when PHP interrupts processing before its internal data structures are initialised. In the author's example, the operation escapes through zend_bailout(), which leaves the current operation uncleaned instead of undoing it. Unwinding means reversing each step already taken, like rewinding a video to the start. The unfinished structure can still be accessible, and later cleanup processes may assume it is initialised.
The author says the CVE concerns PHP interrupting processing before its internal data structures are initialised, leaving something half finished. A bug class is a family of bugs that share the same underlying mistake, as opposed to one specific broken line of code.
Impact
The note does not establish a concrete impact. It says the unfinished structure is accessible to other internal code, and that the author is still working out how that could lead to a probable RCE. No affected configurations, attack preconditions or severity rating are given; the author only describes a scenario where PHP runs out of memory. In plain terms: the note explains the mechanism, not a demonstrated consequence.
The fix
The fix is to update PHP. The author lists the fixed releases as 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on 21 October. PHP 8.1 and older have no fix. If you run a website on PHP, that means asking your hosting provider or system administrator to move to one of those versions, or moving yourself if you manage the server.
Things worth testing, if you want to dig further
Glossary
- Allocator: the internal component that hands out blocks of memory when a program asks for them.
- Allocating memory: reserving a block of RAM to store a value.
- Bug class: a family of bugs that share the same underlying kind of mistake.
- C: a low-level programming language that gives direct control over memory; PHP is implemented in it.
- Cleanup: the code that runs after an operation to release memory and reset state.
- CVE: a public catalogue number assigned to a known security vulnerability so it can be referenced unambiguously.
- Data structure: an organised arrangement of values in memory, such as a record with named fields.
- Field: one named slot inside a data structure, for example a name.
- Freeing memory: telling the operating system that a block of RAM is no longer needed.
- Initialise: set up a value or structure with a valid starting state before it is used.
- Memory limit: a configured cap on how much RAM a single PHP request may use.
- Patch: the official code change that fixes a bug.
- PHP: a programming language commonly used on web servers to build pages.
- RCE (remote code execution): a flaw that lets an attacker run their own commands on a server.
- Request: the message a browser sends to a server asking for a page or data.
- Root cause: the underlying mistake that produces a bug, as opposed to its visible symptoms.
- Server: the computer that stores a website and answers requests from browsers.
- Unwinding: reversing the steps already taken when an operation fails, so the program returns to a clean state.
zend_bailout(): an old error handler in the Zend Engine that performs an emergency escape from the current operation without undoing it.- Zend Engine: the component of PHP that executes PHP programs.
$_GET: PHP's built-in way of reading values appended to a URL after a question mark.