State That Outlives the Check
This article analyses six public exploit chains that share a pattern where a security check is valid at the moment it runs, but the state it checked changes before the code acts on it. Attackers could exploit these mismatches to escape sandboxes, write outside buffers, or execute code.
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 article is a comparative analysis, not a disclosure. Nothing in it is a new finding, and none of the six exploit chains described is the author's own work. Each chain was published by the researchers who found it and is cited at the end. Over the autumn of 2026 the author dissected more than thirty public exploit chains one by one, and six of them turned out to share a skeleton worth naming.
The claim is narrow. In these six chains the security check was usually present. It usually worked. The failure sat one step later, in an assumption nobody wrote down: that the state the check had just described would still be true at the moment the code acted on it. A path was validated, and then the path moved. A decoder state was measured against one window, and then the window shrank. A worker finished a request, and part of that request stayed behind for the next one. In every case, something the system remembered outlived the moment it had been checked.
Two sentences from the author's own notes kept recurring. On the 7-Zip case: the bug is not in the parser, it is in what the decoder remembers. On the PHP case: an interrupted request leaves half-built state behind, and the next request on the same worker reuses it. The article tests those two observations against six chains, using the same three questions for each: What is the state object? Which boundary did it cross? And where did the check sit relative to the change?
Setup
There is no target to set up here. The material is public: advisories, vendor records, fix commits and researcher write-ups. The six cases span a PHP interpreter, a coding agent's file editing tool, a CAB archive decoder, a content management system's upgrade path, a microVM monitor, and an HTTP/2 module in a web server. The tools a reader needs are the ability to read source and advisories, and the discipline to ask the same three questions of each case.
Finding it
A name for the pattern: state-lifetime mismatch
A state-lifetime mismatch occurs when a component makes a decision based on a piece of state, and that state remains alive, reachable, or trusted beyond the point where the decision stops being valid. The check and the use are both real. What is missing is a binding between them: nothing guarantees that the thing checked is the thing used, or that the state left over from a previous step was ever re-examined.
Across the six cases the pattern separates into five classes:
- Check/use gap. The classic time-of-check to time-of-use race. The state changes between validation and action, inside a single operation.
- Cross-request state. State outlives the request that created it and is inherited, silently, by the next request on the same worker or process.
- Half-built state. An error path skips cleanup, and the partial state left behind is later treated as if it had been fully constructed.
- Cross-artifact state. State is carried across a boundary between artifacts: archive volumes, snapshots, staged copies. The receiving side trusts it as if it had been produced locally.
- Shared-mutable concurrency. Shared state has no single owner and no lock discipline, so two execution contexts write the same memory under assumptions each believes are exclusive.
One measurement belongs up front, because it explains why this pattern is easy to miss. In the official vulnerability records the six cases do not sit together. Two are filed under CWE-367, the TOCTOU category. The others are scattered across CWE-787 (out-of-bounds write), CWE-362 (race condition), and use-after-free headings. A single root pattern is distributed across at least four buckets of the official weakness taxonomy, so anyone browsing by category sees four unrelated bugs. The taxonomy files by symptom and mechanism. It does not file by the lifetime of the state involved, and that is precisely the dimension these six chains share.
Exploitation
Step 1: PHP2Shell, the worker remembers the previous request
The state object is per-request data inside a long-lived PHP worker process, together with global state that points into it. The boundary crossed is the boundary between two consecutive requests handled by the same worker, and the boundary between a half-built request and the cleanup code that later walks it. There was no missing bounds check here in the usual sense. The failure was in the lifecycle: when a request bails out, the bailout mechanism (a longjmp) skips the cleanup that would have torn the request state down in order.
PHP2Shell is the collective name for two vulnerabilities in the PHP interpreter, analysed by CyStack from the work of researchers Calif and Wiz, and written up in depth by a2coder. In the first, CVE-2026-109618, request data that was only partially constructed is treated as valid during cleanup after a bailout, because the teardown path walks structures that were never finished. In the second, CVE-2026-109619, global state holding pointers into freed memory survives the end of the request and is used by the next request without being reset. The worker finishes one request and begins the next one still remembering things it should have forgotten, some of them pointing at memory that no longer belongs to anyone.
This is class 2 and class 3 at once. The state crossed the request boundary (class 2), and part of it was never completely built in the first place (class 3). The most telling detail is the fix: both CVEs were closed by a single commit, named “Avoid state corruption via bailout”. The maintainers did not patch two unrelated memory errors. They patched the lifecycle that produced both. The affected range underlines the point: the vulnerable code runs from PHP 5.4 through 8.5, which means the assumption survived roughly a decade of scrutiny aimed at everything except the lifetime question.
There is a final echo worth recording. Applying the patch is not sufficient on its own; the worker processes must be restarted. A worker that is not restarted keeps executing the old code with its old memory intact. Even the fix can be defeated by state that outlives it.
Step 2: Claude Code CVE-2026-88968, the check was a photograph, not a binding
The state object is a filesystem path, validated once by name and symlink resolution. The boundary crossed is the boundary of the sandbox workspace, crossed after validation and before the write. The check sat before the change and was bound to nothing. The validation result was not tied to an inode or an open file descriptor, so it described a path string at an instant, not the object the write eventually reached.
The Claude Code Edit tool checked its target path once: name resolution and symlink resolution said the destination was inside the workspace, and the check was correct at the moment it ran. But code executing inside the sandbox could then replace a parent directory with a symlink, atomically, in the gap between the check and the write. When the Edit operation proceeded, it followed the new resolution and wrote outside the workspace. The advisory is GHSA-5xjx-9qx6-jcrv; Wiz's database entry records CWE-367 together with CWE-59 (improper link resolution), a CVSS score of 7.7, and the fix in version 2.1.251. Sessionboxer's analysis walks the same race in detail.
This is class 1, the textbook check/use gap, and its lesson is about what a check has to be bound to. A path is a name, and names are re-resolvable. A check bound to a name certifies the name at one instant. A check bound to the object itself, through a descriptor held open across the operation, certifies the thing actually written. The distance between those two designs is the whole vulnerability.
Nor was this an isolated slip. The same product had published an advisory in the same class a month earlier, GHSA-5j29-h97v-84ch, fixed in 2.1.129. When the same class recurs in the same product within weeks, the honest reading is not that one check was written badly. It is that the pattern, validate the name and then act on the name later, is a habit, and habits produce families of bugs rather than single instances.
Step 3: 7-Zip CVE-2026-125742, the decoder remembers a larger window
The state object is the LZX decoder's history window position, carried inside the decoder across the volumes of a multi-volume CAB archive. The boundary crossed is the boundary between archive volumes: state produced while decoding one volume is applied, unexamined, to the next. The check sat inside the bounds logic, but keyed to an equality condition: the remembered position was reset only when it happened to equal the window size exactly.
The LZX decoder keeps a sliding history window, and in a multi-volume CAB that history legitimately crosses from one volume to the next. The defect, documented in the VulnCheck advisory for CVE-2026-125742 (CWE-787, affecting versions before 26.06) and visible in the 26.05 source of LzxDecoder.cpp, is in how the position is reconciled with the window. The stored position is reset only when it exactly equals the current window size. When a continuation volume declares a smaller window, for example when the geometry drops from a window measured in megabytes down to 32 KB, a stale position from the larger configuration is not reset. It passes the bounds logic written for the smaller window, and the resulting write lands far beyond the 32 KB buffer it was supposed to stay inside.
Nobody forged this state and nobody raced it. The decoder produced it itself, in correct operation, one volume earlier. The check that should have caught it was not absent; it was conditional in a way that left the general case, position larger than the new window, entirely unhandled. This is class 4: state crossing an artifact boundary and being trusted on the far side as though its provenance did not matter. The fix commit in the 7-Zip repository addresses exactly that reconciliation, which is another way of saying the bug was never really about the write. It was about what the decoder remembered, and for how long it was allowed to remember it.
Step 4: WordPress CVE-2026-119977, transitional state is production state
The state object is a complete installation copy staged by a core update, sitting in a predictable, web-accessible directory. The boundary crossed is the boundary between “an update in progress” and “the live site”. For the length of the window, the staged copy was reachable as if it were production. The check sat nowhere on the staged installer. The live site's authentication model simply did not extend to the transitional copy, and the window, though only seconds long, was long enough.
During a full package upgrade, WordPress unpacks an installation copy into the staging directory wp-content/upgrade. According to the Wordfence threat intelligence record, the staged installer in that directory answers requests without authentication, and the upgrade window lasts seconds. Seconds were enough. Wordfence telemetry recorded more than 18,500 probes in the first 21 hours after disclosure, and more than 240,000 blocked attempts by 5 November. The NVD record for CVE-2026-119977 files the case under CWE-367; the fix shipped in WordPress 7.1.4.
The class here is 1, but with a twist the other races do not have: the vulnerable window is opened by the act of patching itself. The state that outlives its check is a whole transitional installation, and the assumption that failed is that transitional states are somehow outside the attack surface. Attackers clearly did not share that assumption; the probe volume is the measurement of how quickly a seconds-wide window gets found when it is predictable. Transience is not a security property. Reachability is.
Step 5: Firecracker CVE-2026-122192, restored state is inherited state
The state object is memory accounting inside the virtual machine monitor, carried across a snapshot restore. The boundary crossed is the snapshot boundary. A guest is restored, and the VMM continues to trust bookkeeping that describes memory from before the restore. The check sat in the restore path, which accepted the inherited state as a starting condition rather than re-deriving it, so every subsequent decision inherited the error.
Coinspect's research, published on 4 November 2026, built an escape from Firecracker, the microVM monitor, out of a chain whose skeleton is instructive even in outline: snapshot restore, balloon discard, a MAP_FIXED remap, a stale KVM memory slot mapping, VMM-controlled memory, and finally code execution. No single step is the escape. Each step is only possible because it stands on state the previous step left behind, and the first step is the restore, the moment where state crosses from a saved artifact into a live monitor.
This is class 4 again, in its purest form. A snapshot is state that was checked, implicitly, in a previous life of the machine. Restoring it does not re-run those checks; it inherits their conclusions. When the balloon device discards pages and the memory slot mappings no longer describe what the VMM believes they describe, the monitor is reasoning about a machine that no longer exists, using numbers that were correct for the machine that was snapshotted. The lesson generalises well beyond virtualisation: any mechanism that saves and restores state, snapshots, sessions, caches, staged copies, is a place where yesterday's verified state becomes today's unverified assumption.
Step 6: Apache mod_http2 CVE-2026-119618, shared state with no owner
The state object is a header table in mod_http2, fed from the connection's lock-free shared allocator. The boundary crossed is the boundary between threads: the worker thread and the connection thread reach the same memory with different assumptions about who else is writing. There was no synchronisation decision to audit, because the design premise was that the allocator's lock-free sharing made one unnecessary. The assumption lived in the architecture, not in any single line.
Analyses by Praetorian and Sythe Labs of CVE-2026-119618 (CWE-362 in the NVD record, fixed in Apache HTTP Server 2.4.71) describe how assign_headers() writes into a header table backed by that shared allocator while another thread can be mutating the same structures. One correction first, because honesty about this case matters more than the case itself: the exploitation status is disputed in the public record. Red Hat has referred to credible exploitation research while Wiz stated, as of 11 November, that it was not aware of exploitation. This article takes no side in that dispute, and the case is not used here as an exploitation claim. It is used for what is not disputed: the state-ownership failure.
That failure is class 5. In the other five cases, state outlived a check. Here, state never had a single owner to begin with, so there was no moment at which a check could have certified it. Concurrency bugs are often taught as a separate discipline from lifecycle bugs, but from the state side they are the same question asked twice: who is allowed to change this, and at what moment did the reader's copy of the truth expire? In mod_http2 the answer to the first question was “more than one thread” and to the second, “immediately”. A design that cannot answer the ownership question cannot answer the lifetime question either.
Root cause
Six chains, five classes, one recurring sentence: the component remembered something for longer than the check that vouched for it stayed valid. A PHP worker remembered a previous request. A decoder remembered a larger window. A sandbox remembered a path as it was before the symlink moved. An installer existed in a state its own security model did not cover. A monitor reasoned from memory numbers inherited across a restore. A header table belonged to everyone and therefore to no one.
The pattern compresses into four questions that can be asked of any component:
- What does this component remember, and across which boundary does the memory travel: a request, a volume, a snapshot, a directory change, a thread?
- Where does the check sit relative to the change: before it, after it, or (the dangerous answer) in a different lifecycle entirely?
- Can anything act in the gap between the check and the use, including the component's own error paths?
- Who resets the state, and which failure path skips that reset?
The fourth question deserves emphasis, because it is the one the PHP case teaches best. Cleanup code is security code. Every bailout, exception, early return, and partial construction is a place where state can be left standing after the logic that understood it has exited.
The claim also has a boundary, and it should be stated as plainly as the claim itself. The same corpus contains chains this pattern does not explain. The Rails Active Storage case turns on a coder being selected by content type, a dispatch decision, not a lifetime failure. The Confection case is a missing authorisation check on a settings record; the check was not outlived, it was absent. The MLflow case grows out of a default unauthenticated configuration becoming an SSRF surface, a configuration problem rather than stale state. State-lifetime mismatch is not a universal law of vulnerabilities and this article does not argue otherwise. It is a recurring class that the official taxonomy fragments across at least four categories, and a class that stays invisible as long as each of its members is filed, and read, separately.
Impact
The impact differs per case. For PHP2Shell, the vulnerable code runs from PHP 5.4 through 8.5, and the fix requires worker restarts; a worker that is not restarted keeps executing the old code with its old memory intact. For Claude Code, the Edit tool could write outside the sandbox workspace when code inside the sandbox replaced a parent directory with a symlink in the gap between check and write; the advisory records a CVSS score of 7.7. For 7-Zip, a stale LZX window position from a larger configuration passes the bounds logic written for a smaller window, and the resulting write lands far beyond the 32 KB buffer it was supposed to stay inside. For WordPress, the staged installer answers requests without authentication during a seconds-long upgrade window, and Wordfence telemetry recorded more than 18,500 probes in the first 21 hours after disclosure and more than 240,000 blocked attempts by 5 November. For Firecracker, Coinspect built an escape from the microVM monitor out of a chain ending in code execution. For mod_http2, the exploitation status is disputed in the public record, and the article does not use the case as an exploitation claim.
Fix
Most cases were closed by a specific change, and the article names them where it can. PHP2Shell's two CVEs were closed by a single commit named “Avoid state corruption via bailout”, and worker processes must be restarted for the patch to take effect. Claude Code was fixed in version 2.1.251 for GHSA-5xjx-9qx6-jcrv, and an earlier advisory in the same class, GHSA-5j29-h97v-84ch, was fixed in 2.1.129. 7-Zip's fix commit in the 7-Zip repository addresses the reconciliation between the remembered position and the window. WordPress shipped the fix in 7.1.4. Apache HTTP Server fixed CVE-2026-119618 in 2.4.71. The Firecracker case is described by its chain rather than by a named fix in the article.
The general lesson is that a check bound to a name certifies the name at one instant, while a check bound to the object itself, through a descriptor held open across the operation, certifies the thing actually written. Cleanup code is security code, and every bailout, exception, early return and partial construction is a place where state can be left standing after the logic that understood it has exited.
Variants to test
- Name-bound path checks. Look for any tool that validates a path by name and then acts on the name later. A positive result is a window in which a parent directory can be replaced with a symlink between the check and the write, and the write lands outside the intended workspace.
- Long-lived workers. Look for per-request state in a long-lived process that survives a bailout or an error path. A positive result is a request that leaves partial state behind and a subsequent request on the same worker that reuses it.
- Conditional resets. Look for bounds logic that resets a remembered position only on an equality condition. A positive result is a continuation input that declares a smaller window than the previous one, leaving a stale position that passes the check written for the smaller window.
- Transitional directories. Look for update or install paths that stage a copy in a predictable, web-accessible directory. A positive result is an unauthenticated request to the staged installer during the upgrade window.
- Snapshot and restore paths. Look for bookkeeping that is inherited across a restore rather than re-derived. A positive result is a subsequent decision that reasons from numbers correct for the machine that was snapshotted, not the one that was restored.
- Lock-free shared allocators. Look for structures written by more than one thread under the premise that lock-free sharing makes synchronisation unnecessary. A positive result is a header table or similar structure mutated by another thread while a writer assumes exclusive access.
Closing
The instinctive audit question is whether a check exists. These six chains suggest a better one. Checks exist in most mature code, and they mostly work, at the moment they run. What decides the outcome is everything that happens to the state afterwards: who can move it, who inherits it, who forgets to clear it, and which boundary it quietly crosses while everyone is looking at the check.
Do not ask whether the check exists. Ask how long the state it checked stays true.
References
PHP2Shell (CVE-2026-109618, CVE-2026-109619)
- CyStack, PHP2Shell vulnerability research: https://cystack.net/research/php2shell-vulnerability
- a2coder, PHP2Shell write-up: https://www.a2coder.dev/blog/php2shell
Claude Code (CVE-2026-88968)
- GitHub Advisory GHSA-5xjx-9qx6-jcrv: https://github.com/advisories/GHSA-5xjx-9qx6-jcrv
- Wiz vulnerability database, CVE-2026-88968: https://www.wiz.io/vulnerability-database/cve/cve-2026-88968
- Sessionboxer, Claude Code Edit tool symlink race: https://sessionboxer.talayolabs.com/blog/claude-code-edit-tool-symlink-race/
WordPress (CVE-2026-119977)
- Wordfence threat intelligence record: https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-core/wordpress-core-470-713-unauthenticated-upgrade-window-staged-installer-remote-code-execution
- NVD, CVE-2026-119977:https://nvd.nist.gov/vuln/detail/CVE-2026-119977
- WordPress 7.1.4 release announcement: https://wordpress.org/news/2026/10/wordpress-7-1, 4
7-Zip (CVE-2026-125742)
- VulnCheck advisory, 7-Zip LZX decoder heap out-of-bounds write in CAB extraction: https://www.vulncheck.com/advisories/7-zip-before-26.06-heap-out-of-bounds-write-via-lzx-decoder-in-cab-extraction
- 7-Zip fix commit: https://github.com/ip7z/7zip/commit/[redacted]
- LzxDecoder.cpp, version 26.05, lines 1496-1513: https://github.com/ip7z/7zip/blob/26.05/CPP/7zip/Compress/LzxDecoder.cpp#L1496-L1513
Firecracker (CVE-2026-122192)
- Coinspect, Firecracker escape research: https://coinspect.com/blog/firecracker-escape
Apache HTTP Server mod_http2 (CVE-2026-119618)
- Praetorian, CVE-2026-119618 analysis: https://www.praetorian.com/blog/cve-2026-119618/
- Sythe Labs, CVE-2026-119618 Apache http2 analysis: https://sythelabs.com/blog/cve-2026-119618-apache-http2
- NVD, CVE-2026-119618:https://nvd.nist.gov/vuln/detail/CVE-2026-119618
What happened, in plain words
Imagine a bouncer at a club who checks your ID at the door, then lets you walk in. That works. Now imagine the bouncer checks your ID, writes your name on a sticky note, and only later, when you reach the bar, someone reads the sticky note instead of looking at you. If you swapped jackets with a friend in between, the note is still correct about the name, but it no longer describes the person standing at the bar. The check was real. The check was correct. The problem is that the thing the check described had already changed by the time anyone acted on it.
That is the whole idea behind this article. It is a study of six publicly documented security bugs from the autumn of 2026. None of them is the author's own discovery. Each one was found and published by other researchers, and each is credited at the end. The author read more than thirty public write-ups one by one and noticed that six of them share the same underlying shape.
The shape is this: in each of the six cases, the security check was usually there. It usually worked. The failure happened one step later, in an assumption nobody wrote down: that the situation the check had just confirmed would still be true at the moment the program acted on it. A file path was checked, and then the path changed. A decoder measured something against one size, and then the size shrank. A worker finished handling one request, and part of that request stayed behind for the next one. In every case, something the system remembered lived longer than the moment it had been checked.
Two sentences from the author's notes kept coming back. About the 7-Zip case: the bug is not in the parser, it is in what the decoder remembers. About the PHP case: an interrupted request leaves half-built state behind, and the next request on the same worker reuses it. The article tests those two observations against all six cases, asking the same three questions of each: what is the piece of remembered information (the state object)? Which boundary did it cross? And where did the check sit relative to the change?
A few words you will meet constantly, explained once here so the rest reads smoothly:
- State is simply information a program is holding on to: a file path, a number, a table of headers, a half-finished request. Think of it as the program's memory of what is going on.
- A check is a test the program runs before doing something risky, for example "is this file inside the folder I am allowed to write to?"
- A vulnerability is a weakness in software that someone could abuse to make it do something it should not.
- An exploit is the actual technique used to abuse that weakness.
- A CVE is a public catalogue number for a known vulnerability, so people can talk about the same bug unambiguously.
- A CWE is a catalogue number for a type of weakness, a category rather than a single bug.
Context
This article is a comparison, not a disclosure. Nothing in it is a new finding, and none of the six exploit chains described is the author's own work. Each chain was published by the researchers who found it and is cited at the end. Over the autumn of 2026 the author dissected more than thirty public exploit chains one by one, and six of them turned out to share a skeleton worth naming.
The claim is narrow. In these six chains the security check was usually present. It usually worked. The failure sat one step later, in an assumption nobody wrote down: that the state the check had just described would still be true at the moment the code acted on it. A path was validated, and then the path moved. A decoder state was measured against one window, and then the window shrank. A worker finished a request, and part of that request stayed behind for the next one. In every case, something the system remembered outlived the moment it had been checked.
Two sentences from the author's own notes kept recurring. On the 7-Zip case: the bug is not in the parser, it is in what the decoder remembers. On the PHP case: an interrupted request leaves half-built state behind, and the next request on the same worker reuses it. The article tests those two observations against six chains, using the same three questions for each: What is the state object? Which boundary did it cross?
Setup
There is no target to set up here. The material is public: advisories, vendor records, fix commits and researcher write-ups. The six cases span a PHP interpreter, a coding agent's file editing tool, a CAB archive decoder, a content management system's upgrade path, a microVM monitor, and an HTTP/2 module in a web server. The tools a reader needs are the ability to read source and advisories, and the discipline to ask the same three questions of each case.
A few of those products deserve a one-line introduction, because the rest of the article assumes you know roughly what they are:
- PHP is a programming language used to build websites. A website written in PHP runs on a server, and the server keeps a small program (a worker) running to handle visitors' requests.
- Claude Code is a tool that lets an AI assistant edit files on your computer. It runs inside a restricted area called a sandbox, so it can only touch files it is supposed to touch.
- 7-Zip is a free program for opening compressed archives, the kind of file you download and unpack. A CAB file is one such archive format, and it can be split across several files called volumes.
- WordPress is a very widely used system for running websites and blogs. It can update itself, and during an update it unpacks a fresh copy of itself into a folder on the server.
- Firecracker is a microVM monitor: software that runs tiny virtual computers, each isolated from the others, so one can be paused, saved and restored later.
- Apache HTTP Server is one of the most common web server programs in the world. mod_http2 is one of its modules, the part that speaks the newer HTTP/2 version of the web protocol.
Finding it
A name for the pattern: state-lifetime mismatch
A state-lifetime mismatch occurs when a component makes a decision based on a piece of state, and that state remains alive, reachable, or trusted beyond the point where the decision stops being valid. The check and the use are both real. What is missing is a binding between them: nothing guarantees that the thing checked is the thing used, or that the state left over from a previous step was ever re-examined.
In everyday terms: a binding is a guarantee that two things are the same thing. If a bouncer checks your ID and then keeps hold of your hand until you reach the bar, the check is bound to you. If the bouncer only writes your name on a note, the check is bound to a name, and names can be reused by someone else.
Across the six cases the pattern separates into five classes:
- Check/use gap. The classic time-of-check to time-of-use race. The state changes between validation and action, inside a single operation. Think of checking that a door is locked, then walking away and coming back to open it: someone may have unlocked it in between.
- Cross-request state. State outlives the request that created it and is inherited, silently, by the next request on the same worker or process. Like a hotel cleaner who leaves the previous guest's belongings in the room and the next guest finds them there.
- Half-built state. An error path skips cleanup, and the partial state left behind is later treated as if it had been fully constructed. Like a builder who stops halfway through a wall and someone later leans a ladder on it as if it were finished.
- Cross-artifact state. State is carried across a boundary between artifacts: archive volumes, snapshots, staged copies. The receiving side trusts it as if it had been produced locally. Like trusting a note that came in the post from a different office without checking who wrote it.
- Shared-mutable concurrency. Shared state has no single owner and no lock discipline, so two execution contexts write the same memory under assumptions each believes are exclusive. Like two people editing the same shared document at once, each assuming the other is not typing.
One measurement belongs up front, because it explains why this pattern is easy to miss. In the official vulnerability records the six cases do not sit together. Two are filed under CWE-367, the TOCTOU category. The others are scattered across CWE-787 (out-of-bounds write), CWE-362 (race condition), and use-after-free headings. A single root pattern is distributed across at least four buckets of the official weakness taxonomy, so anyone browsing by category sees four unrelated bugs. The taxonomy files by symptom and mechanism. It does not file by the lifetime of the state involved, and that is precisely the dimension these six chains share.
A quick translation of those category names, since they will come up again:
- TOCTOU stands for time-of-check to time-of-use: the gap between checking something and using it.
- Out-of-bounds write means a program writes data past the end of the memory area it was given, into space that belongs to something else.
- Race condition means two parts of a program act at the same time and the result depends on who gets there first.
- Use-after-free means a program keeps using a piece of memory after it has handed it back, so the memory may now belong to something else.
Exploitation
Step 1: PHP2Shell, the worker remembers the previous request
The state object is per-request data inside a long-lived PHP worker process, together with global state that points into it. The boundary crossed is the boundary between two consecutive requests handled by the same worker, and the boundary between a half-built request and the cleanup code that later walks it. There was no missing bounds check here in the usual sense. The failure was in the lifecycle: when a request bails out, the bailout mechanism (a longjmp) skips the cleanup that would have torn the request state down in order.
Some terms first. A worker is a long-running program on a server that handles one visitor request after another. Per-request data is information that belongs to one visitor's request and should be thrown away when that request ends. Global state is information that lives outside any single request and is shared across the whole worker. A longjmp is a low-level way for a program to jump out of the middle of what it was doing, straight back to an earlier point, skipping everything in between. Cleanup is the code that tidies up afterwards, freeing memory and resetting variables.
PHP2Shell is the collective name for two vulnerabilities in the PHP interpreter, analysed by CyStack from the work of researchers Calif and Wiz, and written up in depth by a2coder. In the first, CVE-2026-109618, request data that was only partially constructed is treated as valid during cleanup after a bailout, because the teardown path walks structures that were never finished. In the second, CVE-2026-109619, global state holding pointers into freed memory survives the end of the request and is used by the next request without being reset. The worker finishes one request and begins the next one still remembering things it should have forgotten, some of them pointing at memory that no longer belongs to anyone.
A pointer is simply a memory address, a note saying "the data you want is over there". If the data over there has been freed and given to someone else, the pointer still points at the same spot, but the spot now holds something different.
This is class 2 and class 3 at once. The state crossed the request boundary (class 2), and part of it was never completely built in the first place (class 3). The most telling detail is the fix: both CVEs were closed by a single commit, named “Avoid state corruption via bailout”. The maintainers did not patch two unrelated memory errors. They patched the lifecycle that produced both. The affected range underlines the point: the vulnerable code runs from PHP 5.4 through 8.5, which means the assumption survived roughly a decade of scrutiny aimed at everything except the lifetime question.
A commit is a saved change to a codebase, with a message describing it. The fact that one commit fixed both bugs is the strongest evidence that they were really one bug in two costumes.
There is a final echo worth recording. Applying the patch is not sufficient on its own; the worker processes must be restarted. A worker that is not restarted keeps executing the old code with its old memory intact. Even the fix can be defeated by state that outlives it.
Step 2: Claude Code CVE-2026-88968, the check was a photograph, not a binding
The state object is a filesystem path, validated once by name and symlink resolution. The boundary crossed is the boundary of the sandbox workspace, crossed after validation and before the write. The check sat before the change and was bound to nothing. The validation result was not tied to an inode or an open file descriptor, so it described a path string at an instant, not the object the write eventually reached.
A filesystem path is the address of a file, like /home/you/project/notes.txt. A symlink (symbolic link) is a shortcut file that points at another file or folder; opening the shortcut opens the target. Resolution is the process of following those shortcuts to find the real thing. An inode is the operating system's internal identity for a file, separate from its name. A file descriptor is a handle the program holds open on a specific file, so it keeps talking to that same file even if the name changes.
The Claude Code Edit tool checked its target path once: name resolution and symlink resolution said the destination was inside the workspace, and the check was correct at the moment it ran. But code executing inside the sandbox could then replace a parent directory with a symlink, atomically, in the gap between the check and the write. When the Edit operation proceeded, it followed the new resolution and wrote outside the workspace. The advisory is GHSA-5xjx-9qx6-jcrv; Wiz's database entry records CWE-367 together with CWE-59 (improper link resolution), a CVSS score of 7.7, and the fix in version 2.1.251. Sessionboxer's analysis walks the same race in detail.
A parent directory is the folder that contains a file or another folder. Atomically means in one indivisible step, so nothing can see a half-finished state. A CVSS score is a standard 0 to 10 severity rating, where higher is worse.
This is class 1, the textbook check/use gap, and its lesson is about what a check has to be bound to. A path is a name, and names are re-resolvable. A check bound to a name certifies the name at one instant. A check bound to the object itself, through a descriptor held open across the operation, certifies the thing actually written. The distance between those two designs is the whole vulnerability.
Nor was this an isolated slip. The same product had published an advisory in the same class a month earlier, GHSA-5j29-h97v-84ch, fixed in 2.1.129. When the same class recurs in the same product within weeks, the honest reading is not that one check was written badly. It is that the pattern, validate the name and then act on the name later, is a habit, and habits produce families of bugs rather than single instances.
Step 3: 7-Zip CVE-2026-125742, the decoder remembers a larger window
The state object is the LZX decoder's history window position, carried inside the decoder across the volumes of a multi-volume CAB archive. The boundary crossed is the boundary between archive volumes: state produced while decoding one volume is applied, unexamined, to the next. The check sat inside the bounds logic, but keyed to an equality condition: the remembered position was reset only when it happened to equal the window size exactly.
A decoder is the part of an archive program that turns compressed data back into the original files. LZX is a compression method used inside CAB archives. A history window is a buffer of recently decoded data that the decoder keeps around, because compressed data often refers back to what came before. A multi-volume archive is one archive split across several files, so it can be carried on several disks or downloaded in pieces. Bounds logic is the code that checks a number is within the allowed range before using it.
The LZX decoder keeps a sliding history window, and in a multi-volume CAB that history legitimately crosses from one volume to the next. The defect, documented in the VulnCheck advisory for CVE-2026-125742 (CWE-787, affecting versions before 26.06) and visible in the 26.05 source of LzxDecoder.cpp, is in how the position is reconciled with the window. The stored position is reset only when it exactly equals the current window size. When a continuation volume declares a smaller window, for example when the geometry drops from a window measured in megabytes down to 32 KB, a stale position from the larger configuration is not reset. It passes the bounds logic written for the smaller window, and the resulting write lands far beyond the 32 KB buffer it was supposed to stay inside.
A buffer is a fixed-size block of memory set aside for data. Writing past its end is the out-of-bounds write mentioned earlier. Stale means out of date: still present, but no longer describing the current situation.
Nobody forged this state and nobody raced it. The decoder produced it itself, in correct operation, one volume earlier. The check that should have caught it was not absent; it was conditional in a way that left the general case, position larger than the new window, entirely unhandled. This is class 4: state crossing an artifact boundary and being trusted on the far side as though its provenance did not matter. The fix commit in the 7-Zip repository addresses exactly that reconciliation, which is another way of saying the bug was never really about the write. It was about what the decoder remembered, and for how long it was allowed to remember it.
Step 4: WordPress CVE-2026-119977, transitional state is production state
The state object is a complete installation copy staged by a core update, sitting in a predictable, web-accessible directory. The boundary crossed is the boundary between “an update in progress” and “the live site”. For the length of the window, the staged copy was reachable as if it were production. The check sat nowhere on the staged installer. The live site's authentication model simply did not extend to the transitional copy, and the window, though only seconds long, was long enough.
Authentication is how a system decides who you are, usually by asking for a password. A staged copy is a temporary copy prepared in advance, ready to be swapped in. A web-accessible directory is a folder on the server that anyone on the internet can request files from by typing the right address.
During a full package upgrade, WordPress unpacks an installation copy into the staging directory wp-content/upgrade. According to the Wordfence threat intelligence record, the staged installer in that directory answers requests without authentication, and the upgrade window lasts seconds. Seconds were enough. Wordfence telemetry recorded more than 18,500 probes in the first 21 hours after disclosure, and more than 240,000 blocked attempts by 5 November. The NVD record for CVE-2026-119977 files the case under CWE-367; the fix shipped in WordPress 7.1.4.
Telemetry here means the counts of attempts a security company observed. Probes are attempts to reach the vulnerable installer. NVD is the US National Vulnerability Database, the official public record of CVEs.
The class here is 1, but with a twist the other races do not have: the vulnerable window is opened by the act of patching itself. The state that outlives its check is a whole transitional installation, and the assumption that failed is that transitional states are somehow outside the attack surface. Attackers clearly did not share that assumption; the probe volume is the measurement of how quickly a seconds-wide window gets found when it is predictable. Transience is not a security property. Reachability is.
Step 5: Firecracker CVE-2026-122192, restored state is inherited state
The state object is memory accounting inside the virtual machine monitor, carried across a snapshot restore. The boundary crossed is the snapshot boundary. A guest is restored, and the VMM continues to trust bookkeeping that describes memory from before the restore. The check sat in the restore path, which accepted the inherited state as a starting condition rather than re-deriving it, so every subsequent decision inherited the error.
A virtual machine monitor (VMM) is the software that runs virtual computers. The guest is the virtual computer it runs. A snapshot is a saved copy of a running virtual machine, which can be restored later to continue exactly where it left off. Memory accounting is the VMM's internal record of which parts of memory belong to whom.
Coinspect's research, published on 4 November 2026, built an escape from Firecracker, the microVM monitor, out of a chain whose skeleton is instructive even in outline: snapshot restore, balloon discard, a MAP_FIXED remap, a stale KVM memory slot mapping, VMM-controlled memory, and finally code execution. No single step is the escape. Each step is only possible because it stands on state the previous step left behind, and the first step is the restore, the moment where state crosses from a saved artifact into a live monitor.
A balloon device is a mechanism that lets the VMM take memory back from a guest when it is not using it. MAP_FIXED is a flag that asks the operating system to place memory at a specific address, replacing any existing mapping there. KVM is the part of the Linux kernel that provides virtualisation. Code execution means instructions run on the machine as a result of the chain.
This is class 4 again, in its purest form. A snapshot is state that was checked, implicitly, in a previous life of the machine. Restoring it does not re-run those checks; it inherits their conclusions. When the balloon device discards pages and the memory slot mappings no longer describe what the VMM believes they describe, the monitor is reasoning about a machine that no longer exists, using numbers that were correct for the machine that was snapshotted. The lesson generalises well beyond virtualisation: any mechanism that saves and restores state, snapshots, sessions, caches, staged copies, is a place where yesterday's verified state becomes today's unverified assumption.
Step 6: Apache mod_http2 CVE-2026-119618, shared state with no owner
The state object is a header table in mod_http2, fed from the connection's lock-free shared allocator. The boundary crossed is the boundary between threads: the worker thread and the connection thread reach the same memory with different assumptions about who else is writing. There was no synchronisation decision to audit, because the design premise was that the allocator's lock-free sharing made one unnecessary. The assumption lived in the architecture, not in any single line.
A thread is one line of execution inside a program; a program can have several running at once. A header table is the list of HTTP headers, the small labelled pieces of information (like Content-Type) that travel with every web request and response. An allocator is the part of a program that hands out memory when something needs it. Lock-free means several threads can use the allocator at once without waiting on each other's locks. Synchronisation is any arrangement that keeps concurrent threads from stepping on each other.
Analyses by Praetorian and Sythe Labs of CVE-2026-119618 (CWE-362 in the NVD record, fixed in Apache HTTP Server 2.4.71) describe how assign_headers() writes into a header table backed by that shared allocator while another thread can be mutating the same structures. One correction first, because honesty about this case matters more than the case itself: the exploitation status is disputed in the public record. Red Hat has referred to credible exploitation research while Wiz stated, as of 11 November, that it was not aware of exploitation. This article takes no side in that dispute, and the case is not used here as an exploitation claim. It is used for what is not disputed: the state-ownership failure.
assign_headers() is the function that fills in the header table. Mutating means changing. Exploitation status means whether the bug has been exploited.
That failure is class 5. In the other five cases, state outlived a check. Here, state never had a single owner to begin with, so there was no moment at which a check could have certified it. Concurrency bugs are often taught as a separate discipline from lifecycle bugs, but from the state side they are the same question asked twice: who is allowed to change this, and at what moment did the reader's copy of the truth expire? In mod_http2 the answer to the first question was “more than one thread” and to the second, “immediately”. A design that cannot answer the ownership question cannot answer the lifetime question either.
Root cause
Six chains, five classes, one recurring sentence: the component remembered something for longer than the check that vouched for it stayed valid. A PHP worker remembered a previous request. A decoder remembered a larger window. A sandbox remembered a path as it was before the symlink moved. An installer existed in a state its own security model did not cover. A monitor reasoned from memory numbers inherited across a restore. A header table belonged to everyone and therefore to no one.
The pattern compresses into four questions that can be asked of any component:
- What does this component remember, and across which boundary does the memory travel: a request, a volume, a snapshot, a directory change, a thread?
- Where does the check sit relative to the change: before it, after it, or (the dangerous answer) in a different lifecycle entirely?
- Can anything act in the gap between the check and the use, including the component's own error paths?
- Who resets the state, and which failure path skips that reset?
The fourth question deserves emphasis, because it is the one the PHP case teaches best. Cleanup code is security code. Every bailout, exception, early return, and partial construction is a place where state can be left standing after the logic that understood it has exited.
An exception is a signal a program raises when something goes wrong, which jumps out of the normal flow. An early return is a function finishing before it has done all its work. Both are ways for cleanup to be skipped.
The claim also has a boundary, and it should be stated as plainly as the claim itself. The same corpus contains chains this pattern does not explain. The Rails Active Storage case turns on a coder being selected by content type, a dispatch decision, not a lifetime failure. The Confection case is a missing authorisation check on a settings record; the check was not outlived, it was absent. The MLflow case grows out of a default unauthenticated configuration becoming an SSRF surface, a configuration problem rather than stale state. State-lifetime mismatch is not a universal law of vulnerabilities and this article does not argue otherwise. It is a recurring class that the official taxonomy fragments across at least four categories, and a class that stays invisible as long as each of its members is filed, and read, separately.
Authorisation is deciding whether a user is allowed to do something, as opposed to authentication, which is deciding who they are. SSRF (server-side request forgery) is when an attacker makes a server send requests to places the attacker cannot reach directly.
Impact
The impact differs per case. For PHP2Shell, the vulnerable code runs from PHP 5.4 through 8.5, and the fix requires worker restarts; a worker that is not restarted keeps executing the old code with its old memory intact. For Claude Code, the Edit tool could write outside the sandbox workspace when code inside the sandbox replaced a parent directory with a symlink in the gap between check and write; the advisory records a CVSS score of 7.7. For 7-Zip, a stale LZX window position from a larger configuration passes the bounds logic written for a smaller window, and the resulting write lands far beyond the 32 KB buffer it was supposed to stay inside. For WordPress, the staged installer answers requests without authentication during a seconds-long upgrade window, and Wordfence telemetry recorded more than 18,500 probes in the first 21 hours after disclosure and more than 240,000 blocked attempts by 5 November. For Firecracker, Coinspect built an escape from the microVM monitor out of a chain ending in code execution. For mod_http2, the exploitation status is disputed in the public record, and the article does not use the case as an exploitation claim.
Fix
Most cases were closed by a specific change, and the article names them where it can. PHP2Shell's two CVEs were closed by a single commit named “Avoid state corruption via bailout”, and worker processes must be restarted for the patch to take effect. Claude Code was fixed in version 2.1.251 for GHSA-5xjx-9qx6-jcrv, and an earlier advisory in the same class, GHSA-5j29-h97v-84ch, was fixed in 2.1.129. 7-Zip's fix commit in the 7-Zip repository addresses the reconciliation between the remembered position and the window. WordPress shipped the fix in 7.1.4. Apache HTTP Server fixed CVE-2026-119618 in 2.4.71. The Firecracker case is described by its chain rather than by a named fix in the article.
The general lesson is that a check bound to a name certifies the name at one instant, while a check bound to the object itself, through a descriptor held open across the operation, certifies the thing actually written. Cleanup code is security code, and every bailout, exception, early return and partial construction is a place where state can be left standing after the logic that understood it has exited.
Variants to test
- Name-bound path checks. Look for any tool that validates a path by name and then acts on the name later. A positive result is a window in which a parent directory can be replaced with a symlink between the check and the write, and the write lands outside the intended workspace.
- Long-lived workers. Look for per-request state in a long-lived process that survives a bailout or an error path. A positive result is a request that leaves partial state behind and a subsequent request on the same worker that reuses it.
- Conditional resets. Look for bounds logic that resets a remembered position only on an equality condition. A positive result is a continuation input that declares a smaller window than the previous one, leaving a stale position that passes the check written for the smaller window.
- Transitional directories. Look for update or install paths that stage a copy in a predictable, web-accessible directory. A positive result is an unauthenticated request to the staged installer during the upgrade window.
- Snapshot and restore paths. Look for bookkeeping that is inherited across a restore rather than re-derived. A positive result is a subsequent decision that reasons from numbers correct for the machine that was snapshotted, not the one that was restored.
- Lock-free shared allocators. Look for structures written by more than one thread under the premise that lock-free sharing makes synchronisation unnecessary. A positive result is a header table or similar structure mutated by another thread while a writer assumes exclusive access.
Closing
The instinctive audit question is whether a check exists. These six chains suggest a better one. Checks exist in most mature code, and they mostly work, at the moment they run. What decides the outcome is everything that happens to the state afterwards: who can move it, who inherits it, who forgets to clear it, and which boundary it quietly crosses while everyone is looking at the check.
Do not ask whether the check exists. Ask how long the state it checked stays true.
References
PHP2Shell (CVE-2026-109618, CVE-2026-109619)
- CyStack, PHP2Shell vulnerability research: https://cystack.net/research/php2shell-vulnerability
- a2coder, PHP2Shell write-up: https://www.a2coder.dev/blog/php2shell
Claude Code (CVE-2026-88968)
- GitHub Advisory GHSA-5xjx-9qx6-jcrv: https://github.com/advisories/GHSA-5xjx-9qx6-jcrv
- Wiz vulnerability database, CVE-2026-88968: https://www.wiz.io/vulnerability-database/cve/cve-2026-88968
- Sessionboxer, Claude Code Edit tool symlink race: https://sessionboxer.talayolabs.com/blog/claude-code-edit-tool-symlink-race/
WordPress (CVE-2026-119977)
- Wordfence threat intelligence record: https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-core/wordpress-core-470-713-unauthenticated-upgrade-window-staged-installer-remote-code-execution
- NVD, CVE-2026-119977:https://nvd.nist.gov/vuln/detail/CVE-2026-119977
- WordPress 7.1.4 release announcement: https://wordpress.org/news/2026/10/wordpress-7-1, 4
7-Zip (CVE-2026-125742)
- VulnCheck advisory, 7-Zip LZX decoder heap out-of-bounds write in CAB extraction: https://www.vulncheck.com/advisories/7-zip-before-26.06-heap-out-of-bounds-write-via-lzx-decoder-in-cab-extraction
- 7-Zip fix commit: https://github.com/ip7z/7zip/commit/[redacted]
- LzxDecoder.cpp, version 26.05, lines 1496-1513: https://github.com/ip7z/7zip/blob/26.05/CPP/7zip/Compress/LzxDecoder.cpp#L1496-L1513
Firecracker (CVE-2026-122192)
- Coinspect, Firecracker escape research: https://coinspect.com/blog/firecracker-escape
Apache HTTP Server mod_http2 (CVE-2026-119618)
- Praetorian, CVE-2026-119618 analysis: https://www.praetorian.com/blog/cve-2026-119618/
- Sythe Labs, CVE-2026-119618 Apache http2 analysis: https://sythelabs.com/blog/cve-2026-119618-apache-http2
- NVD, CVE-2026-119618:https://nvd.nist.gov/vuln/detail/CVE-2026-119618
Glossary
- Allocator: the part of a program that hands out memory when something needs it.
- Atomically: in one indivisible step, so nothing can observe a half-finished state.
- Authentication: how a system decides who you are, usually by asking for a password.
- Authorisation: deciding whether a user is allowed to do something, as opposed to who they are.
- Balloon device: a mechanism that lets a virtual machine monitor take memory back from a guest when it is not using it.
- Binding: a guarantee that the thing checked is the same thing later used.
- Bounds logic: code that checks a number is within the allowed range before using it.
- Buffer: a fixed-size block of memory set aside for data.
- CAB: a compressed archive format, which can be split across several files called volumes.
- Check: a test a program runs before doing something risky.
- Cleanup: code that tidies up afterwards, freeing memory and resetting variables.
- Code execution: the attacker getting their own instructions to run on the machine.
- Commit: a saved change to a codebase, with a message describing it.
- Concurrency: several parts of a program running at the same time.
- Cross-artifact state: state carried across a boundary between artifacts, such as archive volumes, snapshots or staged copies.
- Cross-request state: state that outlives the request that created it and is inherited by the next request on the same worker.
- CVE: a public catalogue number for a known vulnerability.
- CVSS score: a standard 0 to 10 severity rating, where higher is worse.
- CWE: a catalogue number for a type of weakness, a category rather than a single bug.
- Decoder: the part of an archive program that turns compressed data back into the original files.
- Early return: a function finishing before it has done all its work.
- Exception: a signal a program raises when something goes wrong, which jumps out of the normal flow.
- Exploit: the actual technique used to abuse a weakness.
- Exploitation status: whether anyone has actually been seen using a bug in the wild.
- File descriptor: a handle a program holds open on a specific file, so it keeps talking to that same file even if the name changes.
- Filesystem path: the address of a file, like
/home/you/project/notes.txt. - Global state: information that lives outside any single request and is shared across the whole worker.
- Guest: the virtual computer that a virtual machine monitor runs.
- Half-built state: partial state left behind by an error path that skipped cleanup, later treated as if fully constructed.
- Header table: the list of HTTP headers, the small labelled pieces of information that travel with every web request and response.
- History window: a buffer of recently decoded data that a decoder keeps around, because compressed data often refers back to what came before.
- Inode: the operating system's internal identity for a file, separate from its name.
- KVM: the part of the Linux kernel that provides virtualisation.
- Lock-free: an allocator design that lets several threads use it at once without a lock.
- Longjmp: a low-level way for a program to jump out of the middle of what it was doing, straight back to an earlier point, skipping everything in between.
- LZX: a compression method used inside CAB archives.
- MAP_FIXED: a low-level instruction that asks the operating system to place memory at a specific address, overwriting whatever was there.
- Memory accounting: a virtual machine monitor's internal record of which parts of memory belong to whom.
- MicroVM monitor: software that runs tiny virtual computers, each isolated from the others.
- Multi-volume archive: one archive split across several files.
- Mutating: changing.
- NVD: the US National Vulnerability Database, the official public record of CVEs.
- Out-of-bounds write: a program writing data past the end of the memory area it was given.
- Parent directory: the folder that contains a file or another folder.
- Per-request data: information that belongs to one visitor's request and should be thrown away when that request ends.
- Pointer: a memory address, a note saying where the data you want is.
- Probes: automated attempts to find a vulnerable address.
- Race condition: two parts of a program acting at the same time, with the result depending on who gets there first.
- Resolution: the process of following shortcuts (symlinks) to find the real file.
- Sandbox: a restricted area a program runs inside, so it can only touch files it is supposed to touch.
- Snapshot: a saved copy of a running virtual machine, which can be restored later to continue exactly where it left off.
- SSRF: server-side request forgery, when an attacker makes a server send requests to places the attacker cannot reach directly.
- Staged copy: a temporary copy prepared in advance, ready to be swapped in.
- Stale: out of date: still present, but no longer describing the current situation.
- State: information a program is holding on to.
- State-lifetime mismatch: a decision based on state that stays alive, reachable or trusted beyond the point where the decision stops being valid.
- Symlink: a shortcut file that points at another file or folder.
- Synchronisation: any arrangement that keeps concurrent threads from stepping on each other.
- Telemetry: counts of attempts a security company observed across its customers.
- Thread: one line of execution inside a program.
- TOCTOU: time-of-check to time-of-use, the gap between checking something and using it.
- Use-after-free: a program keeps using a piece of memory after it has handed it back.
- Virtual machine monitor (VMM): the software that runs virtual computers.
- Vulnerability: a weakness in software that someone could abuse to make it do something it should not.
- Web-accessible directory: a folder on a server that anyone on the internet can request files from by typing the right address.
- Worker: a long-running program on a server that handles one visitor request after another.