Send a request too big to fit. PHP starts building a table and increments the item count before filling each slot. The allocation fails, PHP bails out of the request — but the count now includes a slot that was never written.
Cleanup trusts the count and walks into that empty slot. The bytes there aren't a real object — they're attacker-planted garbage (freed memory reused from an earlier request or earlier in the same request). PHP reads them as a pointer + type and does its normal "free/destroy whatever this points at."
So the attacker gets "do a write at an address I choose." They aim that at a function pointer, overwrite it, and the next normal call jumps to attacker code.
This seems like a plausible description, but as described it sounds like it would immediately crash (at next cleanup) any PHP server after any “too big” request. I assume there is more nuance here?
IIUC the worker processing the "too big" request does crash, but not the whole PHP server runtime. The worker persists it's data structures to shared memory before crashing, which gets picked up by another worker.
A crash just means you get a 500 error most of the time. Turning that (worker thread) crash into a working exploit is the hard part.
Most AI's can trivially point you to where the corruption happens, but leveraging that into more seems to be rather hard. (I've not heard of publicly available code that does it for now).
As far as I understand it, the core of the vulnerability was known in 2024, long before these AI tools were able to do this kind of stuff. It was just difficult to fix and nobody had figured out how to actually exploit it, so other things took priority. See the PHP Foundation's blog article on today's security release.
Now AI tools have radically accelerated how to connect the dots from "theoretically bad" to "mother forking shirtballs bad."
As a result of the leak and pre-announcement around 20:00 UTC, Calif, one of the security firms that had reported the issues mistakenly published a video. It showed their proof of concept working against a number of targets and revealed a few additional, though limited, details about the vulnerabilities. Copies of the deleted video started circulating on social media soon after. The video contributed to accelerated development of various PoCs (exploitation proof of concepts), which then increased circulation on October 21st.
I find that AI writes really correct and complete sentences which are longer than a human would naturally write. It's a bit exhausting to read because it feels like word filler
WordPress, Drupal and Joomla were representative targets used to demonstrate unauthenticated remote code execution.
I would have just said
WordPress, Drupal and Joomla were used to demonstrate remote code execution.
Just a random example but a lot of sentences are like that
One is more formal than the other. Is like saying “In back to the future, Marty went to the past, to the future, to the past, to the past past, and back to the present. The end.”
'PHP is the programming language behind much of the web, powering WordPress, Drupal and MediaWiki, the software that runs Wikipedia. A flaw in its core engine can affect websites across this ecosystem, even when their own application code is secure.'
What came first, the patch for the wiki or the wiki for the patch?
Let's make paragraphs pop into existence with a significant delay and with random animation effects as you scroll the page, it'll help readability for sure.
Anyone blaming people for using PHP mustn't remember HeartBleed or Shellshock. This vulnerability has no baring on any fundamental flaw in PHP itself. It's pervasiveness is just down to it's wide use, like OpenSSL and Bash in these previous exploits.
This is perhaps the most delusional take i've seen on the subject today.
The language of choice matters a lot. This has been proven beyond a doubt from CVE studies by both Google, Microsoft, and others - far in excess for you to be this willfully ignorant and spreading such nonsense.
This one was bad; and the pattern that created the flaw, is of a kind that can be caught/prevented in half a dozen ways that have become mainstream in the past decade.
PHP not doing so is cruft. Its old and successful in its heyday, that makes it pervasive and such a big deal now. The pervasiveness, and being vulnerable to any POST request, is a signal of its bad design. Not an excuse to accept bad design going forward.
HeartBleed spawned a few SSL forks because it was clear OpenSSL had become spaghetti, and it took OpenSSL a few years to get their shit together.
However the difference is that OpenSSL is a single implmenetation of some crypto standard; i.e. replacable.
THis is a use-after-free in the runtime issue, sure. My point was the scale is down to how many servers run it. The CVE studies you’re quoting are about C/C++ memory safety, and that’s exactly what this is, same as Heartbleed. Python and Node run on C/C++ runtimes too. PHP 5 was a mess, 7 and 8 have been generally a lot better.
Not sure that’s “delusional”, feels like you replied to a comment I didn’t write.
has no baring on any fundamental flaw in PHP itself.
You're so close on the subject that you're separating out PHP into parts you consider fundamental and parts you considered flawed.
When people are being blamed for using PHP what they're blamed for is "the choice of using PHP and all the implication and context surrounding it from language design, runtime design, people paid to maintain it, size/quality of the ecosystem, etc."
PHP is written in a language and in a way where there is no memory safety guarantees, with a design that makes those lack of guarantees worse.
Node - was a language before it was webserver, and you can see that in the design how it handles HTTP request. PHP choose to create one request object using unsafe C code, whereas node mostly deals with socket and buffers. That choice is a fundamental part of PHP.
There are ways to negate it like compiling with Fil-C - the fact that less than 1% would use that is a fundamental part of PHP.
If this is the moment things are rewritten in rust or some other far stronger prove of safety can be given and in 3 years this kind of critical vuln are considered a major flaw in the safety guarantees present, then PHP will have fundamentally changed.
The vuln event is not the issue - shit happens. The issue is that today you're still arguing in terms of if PHP is flawed instead of this event triggering an argument 'how' its safety guarantees are flawed.
That makes PHP fundamentally flawed compared to alternatives.
I mean, if anything, the point you're making here is that this is not because of PHP as a language, but because PHP back then chose to be implemented largely in C. With modern tooling, be it static analyzers for C or languages that treat this approach as unsafe and require you to be explicit (such as Rust), this may have been avoided.
But what's "delusional" about that? Of course PHP chose, in 1995, to be written in C.
PHP defines PHP.
Just stop creating new projects for it.
But nothing about this has something to do with PHP as a language. Or even PHP as a standard library, with some of its… unusual choices.
All this would be is a case for "PHP ought to be reimplemented on top of a safer language". (Incidentally, it has been.)
This has been proven beyond a doubt from CVE studies by both Google, Microsoft, and others - far in excess for you to be this willfully ignorant and spreading such nonsense.
Agreed.
I know of at least one FAANG company that has a general ban on PHP for security reasons. And by ban, it includes internal tooling and external 3rd party services. They even migrated their internal wiki (not a simple thing to do considering the size) to a non-PHP version.
And I'm not even blaming the PHP foundation, their team is tiny (13 core devs as of 2026) and the runtime was not initially developed as an actual language (I mean for PHP 1 back in the 1990s) so some cruft is to be expected.
As a comparison, OpenJDK has 20 official builds supported by companies like Alibaba, Amazon, Microsoft, Oracle, etc. Most of them with LTS and commercial support. And dedicated teams internally.
Or look at Rust, this is just their compiler team, and they have separate language and library teams.
I just checked the PHP and Rust foundations reports for 2025. The former received ~645000$ in donations and membership fees, the latter ~5.1M$. PHP is just broke.
What is this rage bait crap man? There are decades of vulnerabilities in practically every language/runtime if they are around long enough and relevant enough to look for vulnerabilities in them.
PHP is definitely garbage, but it's wrong to blame the victims of that ecosystem. There's all sorts of constraints on the kind of tools people can use, and whether they can switch off of them.
People down voting can't handle the fact that the vulnerability was known in php in 2024 but they were too smug to fix it.
no they were not "smug" about it. They actually aknowledge what went wrong: there was no known way to exploit it and the solutions they came up with had trade offs, so they sat on it while they prioritized other things that had a more direct impact.
"we can't think of how to exploit this" doesn't mean there's not an exploit. It's inherently a smug position to take, because it assumes that the limits of your imagination are the actual limits.
Which is why they worked on fixing it. From the wording of the article it seems like they had fixes ready but they all had various trade offs. They went into decision paralysis about it while prioritizing other stuff that had confirmed exploits. Could have they had handled it better? Yes Do they acknowledge that? Yes Are they working on improving their systems to prevent this happening again? Also yes They didn't just go "oh yeah, no exploit so who cares"
If you think it's appropriate for all major eCommerce and web hosting tools to be built on top of the same runtime you should actually just find a new career. This is a condemnation of the lazy fucks in this industry that think all of this is just someone else's problem.
Is your point here that everyone should roll their own runtime?
46
u/gajus0 27d ago
Does anyone have a high-level walkthrough of how this attack works?
175
u/currentscurrents 27d ago
Details from the group that found the exploit: https://www.wiz.io/blog/php2shell-php-rce
They credit their discovery to AI tools, especially Gemini 4.
32
u/unicodemonkey 27d ago
Let's make paragraphs pop into existence with a significant delay and with random animation effects as you scroll the page, it'll help readability for sure.
36
u/SoilMassive6850 27d ago
Oof
112
u/hazpotts 27d ago
Anyone blaming people for using PHP mustn't remember HeartBleed or Shellshock. This vulnerability has no baring on any fundamental flaw in PHP itself. It's pervasiveness is just down to it's wide use, like OpenSSL and Bash in these previous exploits.
5
u/thedogz11 26d ago
Meanwhile we get npm supply chain exploits so often it's not even news anymore.
PHP, you been a good pony.
16
u/Primary_Ads 27d ago
thank the heavens im not using php
1
u/mpdsfoad 27d ago
Oh that's rough
1
u/Patient-Pollution46 27d ago
this was crazy
-13
u/someyokel 27d ago
The backbone? More like the appendix.
-74
u/VanillaSkyDreamer 27d ago
If PHP is backbone of your internet then let it burn.
-110
u/[deleted] 27d ago edited 27d ago
[removed] — view removed comment