PHP2Shell Exploit Wins a $2,000 Bitcoin Challenge: Critical PHP V
Two PHP vulnerabilities allow memory corruption during cleanup after an out-of-memory condition and reuse of data from earlier requests in shared workers. An attacker could combine information leaks with these flaws to achieve remote code execution.
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
A public Bitcoin hacking challenge hosted on stealmybitcoin.com put an intentionally vulnerable PHP server in front of participants. The server contained a wallet-related target, and the goal was to reach the test server and execute commands remotely in order to claim the prize. The challenge is the setting for a proof of concept (PoC) that chains two PHP memory-management flaws, collectively described as PHP2Shell, into remote code execution.
A security researcher known online as killa reportedly won the challenge, earning a prize pot valued at approximately $2,021.22 at the time. The winning attempt reportedly took 19.28 hours, and the researcher subsequently published a PoC on GitHub. The prize initially stood at $500 before donations increased the total to more than $2,000.

The two vulnerabilities are identified as CVE-2026-109618 and CVE-2026-109619. Both reportedly carry a CVSS v4.0 score of 9.2, placing them in the critical severity category. The issues involve memory corruption and the reuse of data between requests handled by shared workers.
Setup
The challenge environment was an intentionally vulnerable PHP server with a wallet-related target. According to the challenge's account, early attempts failed because the server was serving static files through PHP's command-line mode, which did not trigger the vulnerable code paths. After the environment was changed to execute a proper PHP page, exploitation became possible.
The published PoC was tested against a local lab environment. The author did not capture the complete successful request against the live challenge server, and the recovered key reportedly did not match the advertised prize address. These limitations matter when reading the result: a published PoC demonstrates a potential exploitation technique, but it does not independently verify every claim about a live compromise.
Finding it
The two flaws are the building blocks of the attack.
- Memory corruption during cleanup. The first vulnerability can corrupt memory during cleanup following an out-of-memory condition. Memory corruption is dangerous because it can disrupt the assumptions a program makes about the contents and structure of its memory. Depending on the circumstances, an attacker may be able to influence program execution or obtain information that should remain inaccessible.
- Reuse of data from earlier requests. The second vulnerability allows data left behind by an earlier request in a shared worker to be reused by a subsequent request. When sensitive or attacker-influenced data remains accessible across requests, it can undermine the isolation expected between separate operations. In certain circumstances, this behaviour can contribute to information disclosure or more serious exploitation.
Together, these flaws can provide the building blocks for an attack that progresses from information disclosure to remote code execution.
Exploitation
The PoC reportedly combines two memory leaks to obtain information about the process's memory layout. At a high level, the exploitation process involves three stages.
Stage 1: Obtaining a heap address
The first leak reveals an address associated with the heap, helping the exploit understand where relevant data resides in memory.
Stage 2: Obtaining a PHP code address
The second leak reveals an address associated with PHP code. Combining these addresses can reduce uncertainty about the process's memory layout.
Stage 3: Triggering code execution
Using the recovered information, the exploit attempts to place a forged structure in memory that causes PHP to invoke a system function. The script reportedly prints a random test marker, the user ID, and a hash associated with the flag program.
The author states that the exploit succeeded in approximately seven out of ten local laboratory runs. This suggests that the technique was not completely reliable, even in the tested environment.
The key takeaway is that information leaks can become significantly more dangerous when combined with memory-corruption vulnerabilities. Individually, a bug may expose limited information; together, multiple weaknesses can create a path toward code execution.
Root cause
The two flaws are memory corruption during cleanup after an out-of-memory condition, and the reuse by a later request of data left behind in a shared worker. The second flaw undermines the isolation expected between separate operations on a shared worker, and the first gives an attacker a way to disturb the program's assumptions about its own memory.
Impact
The challenge demonstrates the potential impact of chaining information leaks with memory corruption. The exploit was tested against a local lab environment and succeeded in roughly seven out of ten runs, and the author did not capture the complete successful request against the live challenge server, so the live result is not independently verified by the PoC itself.
Fix
PHP published fixes on October 21, 2026, in the following releases:
- PHP 8.5.12
- PHP 8.4.27
- PHP 8.3.36
- PHP 8.2.35
According to the reported advisory, the affected range extends from PHP 5.4 through PHP 8.5.11. Older branches, including PHP 8.1 and earlier, no longer receive official security fixes, so applications running those versions should prioritise migration to a supported PHP release. Administrators should verify the official PHP security advisories before planning upgrades and confirm that their specific deployment is running a fixed version.
The report also sets out operational steps for organisations running PHP-powered websites and APIs:
- Upgrade to a patched release. Firewall rules alone cannot repair a vulnerable runtime.
- Restart PHP services and workers. After upgrading, restart the relevant services and verify that the active PHP workers are using the patched build. Old processes, containers, or bundled runtimes may continue running vulnerable versions if they are not updated correctly.
- Audit all runtime environments. Check production servers, staging environments, containers, background workers, and third-party application packages. A server may appear updated while one component continues to use an older PHP runtime.
- Monitor for suspicious activity. Review application, web server, and security logs for unusual requests, unexpected process execution, abnormal worker behaviour, and suspicious outbound connections.
- Retire unsupported PHP versions. Plan migrations to supported releases and maintain a regular patch-management process.
- Validate the upgrade. Confirm the active runtime version, restart services where required, and test the application after deployment. Security teams should also check whether their hosting provider or container image introduces additional upgrade requirements.
The report states that Amazon observed exploitation attempts beginning on October 17, 2026, four days before the fixes were released. Sophos also reportedly blocked attempts to deliver Potassium, a suspected Mirai botnet variant, though the available reporting did not establish that those attempts resulted in a successful compromise.
Variants to test
In cybersecurity, identifying a vulnerability is only the beginning. Reducing the window between disclosure and remediation is what helps prevent an exploitable weakness from becoming a real incident.
What happened, in plain words
A website called stealmybitcoin.com ran a public contest. The people behind it set up a computer server on purpose with known weaknesses in it, put something wallet-related on that server as the prize target, and invited anyone on the internet to break in. Whoever managed to reach the server and run their own commands on it would take the money.
A security researcher known online as killa reportedly won. The prize pot was worth approximately $2,021.22 at the time of the challenge. The winning attempt reportedly took 19.28 hours. The prize started at $500 and grew to more than $2,000 as people donated to it. After winning, the researcher published a proof of concept (PoC) on GitHub so others could study the technique.

A proof of concept is a small demonstration that shows a weakness can actually be used, rather than just described on paper. Think of it as a video of someone opening a supposedly locked door, published so the locksmith can see the problem is real.
The weaknesses used here are two bugs in PHP, a programming language that runs a very large share of the world's websites. Together the two bugs are described as PHP2Shell. The name is a play on words: PHP is the language, and a "shell" is a command prompt, the text interface where you type instructions for a computer to carry out. So the name means "from PHP to a command prompt".
The two bugs have official catalogue numbers, called CVE identifiers: CVE-2026-109618 and CVE-2026-109619. A CVE is a public reference number given to a known security flaw so that everyone, worldwide, can talk about the same bug without confusion. Both reportedly carry a CVSS v4.0 score of 9.2. CVSS is a standard scoring system for how serious a flaw is, running from 0 to 10, and 9.2 places these in the critical category, the most severe band.
One bug is about memory being damaged, and the other is about data from one visitor's request being left behind where the next visitor's request can see it. Both happen inside workers, which are the parts of a web server that handle incoming requests.
Context
The challenge put an intentionally vulnerable PHP server in front of participants. The server contained a wallet-related target, and the goal was to reach the test server and execute commands remotely in order to claim the prize. This challenge is the setting for a PoC that chains two PHP memory-management flaws, collectively described as PHP2Shell, into remote code execution.
"Remote code execution" means exactly what it sounds like: someone sitting at their own computer, far away, gets the target computer to run instructions of their choosing. It is the most serious outcome in this field, because from there an attacker can usually do whatever the target machine is allowed to do.
"Chaining" means using one weakness to set up the next, like using a first key to open a drawer that contains a second key. Neither key alone opens the safe.
A security researcher known online as killa reportedly won the challenge, earning a prize pot valued at approximately $2,021.22 at the time. The winning attempt reportedly took 19.28 hours, and the researcher subsequently published a PoC on GitHub. The prize initially stood at $500 before donations increased the total to more than $2,000.
The two vulnerabilities are identified as CVE-2026-109618 and CVE-2026-109619. Both reportedly carry a CVSS v4.0 score of 9.2, placing them in the critical severity category. The issues involve memory corruption and the reuse of data between requests handled by shared workers.
Setup
The challenge environment was an intentionally vulnerable PHP server with a wallet-related target. According to the challenge's account, early attempts failed because the server was serving static files through PHP's command-line mode, which did not trigger the vulnerable code paths. After the environment was changed to execute a proper PHP page, exploitation became possible.
This part is worth slowing down for, because it explains why the contest was not simply broken from day one.
A web server can hand out two very different kinds of content. Static files are things that already exist on disk exactly as they will be sent: a picture, a stylesheet, a plain HTML page. The server just copies the file to the visitor. PHP pages, by contrast, are recipes. The server reads the file, runs the PHP code inside it, and sends the result. The visitor never sees the recipe, only the finished dish.
The two bugs live in the PHP machinery that runs those recipes. If the server was only ever handing out static files, that machinery was barely involved, so the bugs were never reached. The phrase "command-line mode" refers to PHP being run as a plain command rather than as part of a web request, which did not trigger the vulnerable code paths. Once the organisers changed the setup so that a real PHP page was executed for each request, the vulnerable code paths were reached and exploitation became possible.
The published PoC was tested against a local lab environment. The author did not capture the complete successful request against the live challenge server, and the recovered key reportedly did not match the advertised prize address. These limitations matter when reading the result: a published PoC demonstrates a potential exploitation technique, but it does not independently verify every claim about a live compromise.
In plain terms: the researcher tested the technique in a local lab environment and published that. They did not publish the exact network traffic that won the live contest, and the key they recovered did not match the address the prize was advertised at. So the write-up shows a working method, not a complete, independently checkable record of the live win.
Finding it
The two flaws are the building blocks of the attack.
- Memory corruption during cleanup. The first vulnerability can corrupt memory during cleanup following an out-of-memory condition. Memory corruption is dangerous because it can disrupt the assumptions a program makes about the contents and structure of its memory. Depending on the circumstances, an attacker may be able to influence program execution or obtain information that should remain inaccessible.
- Reuse of data from earlier requests. The second vulnerability allows data left behind by an earlier request in a shared worker to be reused by a subsequent request. When sensitive or attacker-influenced data remains accessible across requests, it can undermine the isolation expected between separate operations. In certain circumstances, this behaviour can contribute to information disclosure or more serious exploitation.
Together, these flaws can provide the building blocks for an attack that progresses from information disclosure to remote code execution.
Some background will make both points concrete.
Memory is the computer's working space, where a running program keeps its data. Programs refer to pieces of memory by addresses, which are numbers, a bit like house numbers on a very long street. A program trusts that the contents at a given address are what it put there.
Memory corruption means that trust is broken: something writes into a place it should not, so the contents no longer match what the program expects. Imagine a form where you write your name in box 3, and someone else's pen starts filling in box 7, which was supposed to hold your address. Everything that later reads box 7 now acts on wrong information.
Out-of-memory is what happens when a program asks for more working space than it is allowed to have. A sensible program then stops what it is doing and tidies up, releasing the space it had claimed. "Cleanup" is that tidying. The first bug is that the tidying itself can go wrong and damage memory.
Information disclosure means the program reveals something it should have kept to itself, such as a memory address. On its own that sounds harmless, but knowing where things sit in memory is exactly what an attacker needs in order to aim the next step.
Isolation is the promise that one visitor's request cannot see another's. A shared worker is a process that handles many requests one after another, to save the cost of starting fresh each time. If the worker does not fully wipe its desk between visitors, the next visitor may find the previous visitor's papers still lying there. That is the second bug.
Neither bug alone gives an attacker a command prompt. One leaks information, the other lets memory be disturbed. Together they can be arranged into a path from information disclosure to remote code execution.
Exploitation
The PoC reportedly combines two memory leaks to obtain information about the process's memory layout. At a high level, the exploitation process involves three stages.
A memory leak, in this context, is a bug that lets an attacker read a value out of memory that they were not meant to see. The memory layout is the map of where things sit: which addresses hold the program's own code, which hold temporary data. Without that map, an attacker is guessing. With it, they can aim.
Stage 1: Obtaining a heap address
The first leak reveals an address associated with the heap, helping the exploit understand where relevant data resides in memory.
The heap is the part of memory a program uses for data it creates while running, as opposed to its own fixed code. Think of the heap as the desk where work in progress is spread out. Knowing where the desk is tells you where to put something down, or where to look for something already there.
Stage 2: Obtaining a PHP code address
The second leak reveals an address associated with PHP code. Combining these addresses can reduce uncertainty about the process's memory layout.
This is the second landmark on the map. The first leak says where the working data lives; this one says where PHP's own instructions live. With both, the attacker can calculate the distance between them and therefore locate other things reliably, instead of hoping a guessed number happens to be right.
Stage 3: Triggering code execution
Using the recovered information, the exploit attempts to place a forged structure in memory that causes PHP to invoke a system function. The script reportedly prints a random test marker, the user ID, and a hash associated with the flag program.
A forged structure is a fake record planted in memory that looks to the program like a genuine one. The everyday comparison is filling in a form with the name of a department that does not exist, so that the internal mail system routes your envelope to a room of your choosing. Here, the fake record is arranged so that PHP calls a system function, meaning a function that runs an operating system command. That call is the moment the weakness turns into a command prompt.
The script reportedly prints three things to show it worked: a random test marker (proof that the output came from the exploit and not from the page), the user ID (which account the command ran as), and a hash associated with the flag program. A hash is a short fingerprint computed from some data; it lets you check that a value is the expected one without printing the value itself.
The author states that the exploit succeeded in approximately seven out of ten local laboratory runs. This suggests that the technique was not completely reliable, even in the tested environment.
Seven out of ten is a useful number to keep in mind. It means the method works often enough to be convincing and not often enough to be a guaranteed tool. Memory layouts shift slightly between runs, so an exploit that depends on exact addresses will sometimes miss.
The key takeaway is that information leaks can become significantly more dangerous when combined with memory-corruption vulnerabilities. Individually, a bug may expose limited information; together, multiple weaknesses can create a path toward code execution.
Root cause
The two flaws are memory corruption during cleanup after an out-of-memory condition, and the reuse by a later request of data left behind in a shared worker. The second flaw undermines the isolation expected between separate operations on a shared worker, and the first gives an attacker a way to disturb the program's assumptions about its own memory.
"Root cause" simply means the underlying mistake, as opposed to its symptoms. Here the underlying mistakes are in how PHP manages memory: the tidying after running out of memory is not careful enough, and the desk is not wiped between visitors. The published material does not go further into which lines of code are responsible or what protections were present, so that question stays open.
Impact
The challenge demonstrates the potential impact of chaining information leaks with memory corruption. The exploit was tested against a local lab environment and succeeded in roughly seven out of ten runs, and the author did not capture the complete successful request against the live challenge server, so the live result is not independently verified by the PoC itself.
For a beginner, the practical reading is this: the worst case is serious, because it ends in remote code execution. The evidence for that worst case, in this particular publication, is a lab demonstration at roughly seven successes in ten attempts, not a recorded live attack.
Fix
PHP published fixes on October 21, 2026, in the following releases:
- PHP 8.5.12
- PHP 8.4.27
- PHP 8.3.36
- PHP 8.2.35
According to the reported advisory, the affected range extends from PHP 5.4 through PHP 8.5.11. Older branches, including PHP 8.1 and earlier, no longer receive official security fixes, so applications running those versions should prioritise migration to a supported PHP release. Administrators should verify the official PHP security advisories before planning upgrades and confirm that their specific deployment is running a fixed version.
A release here is a numbered version of PHP. Version numbers work like editions of a book: 8.5.12 is a later, corrected edition of the 8.5 line. "Affected range" means every version from 5.4 up to and including 8.5.11 has the bugs. "Branch" means a version line, such as 8.1 or 8.2. When a branch is no longer supported, the maintainers stop issuing corrections for it, so staying on it means staying exposed.
The report also sets out operational steps for organisations running PHP-powered websites and APIs.
An API is the part of a website that answers requests from other software rather than from a person clicking in a browser. When a phone app shows you a list of orders, it is usually talking to an API. APIs run on the same PHP runtime as ordinary pages, so the same fixes apply.
- Upgrade to a patched release. Firewall rules alone cannot repair a vulnerable runtime. A firewall filters network traffic, like a doorman checking who comes in. A doorman cannot fix a broken lock inside the building; the runtime, meaning the PHP installation actually executing code, has to be replaced with a corrected one.
- Restart PHP services and workers. After upgrading, restart the relevant services and verify that the active PHP workers are using the patched build. Old processes, containers, or bundled runtimes may continue running vulnerable versions if they are not updated correctly. A process is a running copy of a program. A container is a packaged bundle of software and its settings that runs as a unit. If you install a new version but the old process keeps running, you have fixed nothing yet.
- Audit all runtime environments. Check production servers, staging environments, containers, background workers, and third-party application packages. A server may appear updated while one component continues to use an older PHP runtime. Production is the live system real users touch; staging is a rehearsal copy. Background workers handle jobs away from the browser, such as sending email or processing uploads. Third-party packages are pieces of software written by other people and included in your application; they can bring their own PHP along.
- Monitor for suspicious activity. Review application, web server, and security logs for unusual requests, unexpected process execution, abnormal worker behaviour, and suspicious outbound connections. Logs are the records a system keeps of what happened, like a visitor book. Outbound connections are connections your server makes to somewhere else; a web server suddenly talking to an unfamiliar address is worth a look.
- Retire unsupported PHP versions. Plan migrations to supported releases and maintain a regular patch-management process. Patch management is the routine of applying corrections on a schedule rather than in a panic.
- Validate the upgrade. Confirm the active runtime version, restart services where required, and test the application after deployment. Security teams should also check whether their hosting provider or container image introduces additional upgrade requirements. Deployment is the act of putting new software into service. Hosting provider is the company whose machines your site runs on; container image is the template a container is built from. Either can pin an old version without your knowledge.
The report states that Amazon observed exploitation attempts beginning on October 17, 2026, four days before the fixes were released. Sophos also reportedly blocked attempts to deliver Potassium, a suspected Mirai botnet variant, though the available reporting did not establish that those attempts resulted in a successful compromise.
An exploitation attempt is someone trying the attack, which is not the same as succeeding. Mirai is a well-known family of malicious software that infects devices and uses them together to attack other systems; a variant is a modified version of it. Potassium is the name given to the suspected variant in this reporting. The point of the timeline is that attempts were seen before the corrections existed, so waiting for a patch before paying attention is too late.
Variants to test
These are checks a defender can run to see whether their own systems show the same patterns. Each one describes what a positive result looks like.
In everyday terms: write your name on a whiteboard, walk out, and see whether the next person can still read it. You are deliberately overfilling the desk to see whether the tidying damages anything. Two landmarks are enough to fix your position on a map; one is not. A single success can be luck; a repeatable rate is a technique. This is the least glamorous check and the one that prevents the most incidents.
In cybersecurity, identifying a vulnerability is only the beginning. Reducing the window between disclosure and remediation is what helps prevent an exploitable weakness from becoming a real incident. Disclosure is the moment a flaw becomes publicly known; remediation is the moment it is actually fixed on your systems. The gap between the two is the time an attacker has.
Glossary
- Address: a number identifying a location in a computer's memory, like a house number on a street.
- API: the part of a service that answers requests from other software rather than from a person using a browser.
- Background worker: a process that handles jobs away from the browser, such as sending email or processing uploads.
- Branch: a version line of a piece of software, such as PHP 8.1 or PHP 8.2.
- Chaining: using one weakness to enable the next, so that the combined effect is greater than either alone.
- Container: a packaged bundle of software and its settings that runs as a unit.
- Container image: the template from which a container is built.
- CVE: a public reference number assigned to a known security flaw so everyone can refer to the same bug.
- CVSS: a standard scoring system for the severity of a security flaw, from 0 to 10.
- Deployment: the act of putting new software into service.
- Disclosure: the moment a security flaw becomes publicly known.
- Exploitation attempt: an attempt to use a weakness, which may or may not succeed.
- Firewall: a filter on network traffic that decides what is allowed in or out.
- Forged structure: a fake record planted in memory that a program mistakes for a genuine one.
- Hash: a short fingerprint computed from data, used to check a value without revealing it.
- Heap: the part of memory a program uses for data it creates while running.
- Hosting provider: a company whose machines your website runs on.
- Information disclosure: a flaw that reveals data the program should have kept private.
- Isolation: the expectation that one request or user cannot see another's data.
- Logs: records a system keeps of what happened.
- Memory: a computer's working space where a running program keeps its data.
- Memory corruption: a flaw that causes memory to hold something other than what the program expects.
- Memory layout: the map of where code and data sit in memory.
- Memory leak: here, a flaw that lets an attacker read a value from memory they should not see.
- Mirai: a well-known family of malicious software that infects devices and uses them to attack other systems.
- Out-of-memory: the condition where a program asks for more working space than it is allowed.
- Outbound connection: a connection your server makes to another system.
- Patch management: the routine of applying software corrections on a regular schedule.
- PHP: a programming language used to build a large share of the world's websites.
- PHP2Shell: the name given to the combination of these two PHP flaws, meaning from PHP to a command prompt.
- PoC (proof of concept): a small demonstration showing that a weakness can actually be used.
- Process: a running copy of a program.
- Production: the live system that real users interact with.
- Release: a numbered version of a piece of software.
- Remediation: the act of actually fixing a flaw on your systems.
- Remote code execution: getting a target computer, from a distance, to run instructions of your choosing.
- Root cause: the underlying mistake that produces a problem, as opposed to its symptoms.
- Shared worker: a process that handles many requests one after another and must wipe its state between them.
- Shell: a text interface where you type commands for a computer to carry out.
- Staging: a rehearsal copy of a live system used for testing.
- Static files: files sent to a visitor exactly as stored, without being processed first.
- System function: a function that runs an operating system command.
- Third-party package: software written by other people and included in your application.
- Variant: a modified version of a known piece of software, often malicious.
- Worker: the part of a web server that handles incoming requests.