The Day the Patch Shipped, the Attacks Had Already Begun.

On October 21, 2026, at 14:00 UTC, the PHP team disclosed two critical vulnerabilities and released fixed versions. They let a remote attacker take over a server without authenticating.

Four days earlier, on October 17, an attack aimed at these vulnerabilities had already reached an AWS honeypot, a decoy server set up to lure attackers in.

By around 02:00 UTC on disclosure day, exploit code was already circulating. That was about twelve hours before the disclosure. And within hours of the disclosure, new exploits kept appearing and were put to use almost immediately.

AWS writes that it is unclear how the attacker got the exploit information before disclosure. Nor do we know yet whether any of these attempts succeeded against real systems.

Only one thing is certain. The day the patch shipped, the attacks had already begun.

Time as a defense

When I was in elementary school, I made cheats for online games with a memory editor called Usami-mimi Hurricane.

I would look into a running game's memory to find where my HP or my money was stored. Change a value, search again. Finding a single hole took me days. I would come home from school and stare at the numbers on the screen until night.

For me back then, finding a hole was a contest of time and obsession.

And for defenders, I think that very fact, that it took time, was itself a kind of defense.

That assumption is coming to an end.

A 14-year-old hole, found by AI

The vulnerabilities disclosed on October 21 are CVE-2026-109618 and CVE-2026-109619. Together they are called "PHP2Shell."

Unauthenticated remote code execution. CVSS 9.2. The next day, Japan's IPA (Information-technology Promotion Agency) issued its own alert.

Affected are PHP-FPM, Apache's mod_php, php-cgi, FrankenPHP, and LiteSpeed. Nearly every PHP that handles web requests. With mod_php in particular, an exploit has been demonstrated that works before a single line of application code runs.

According to Wiz, every version since PHP 5.4 is affected by at least one of the two. PHP 5.4 came out in 2012. For almost fourteen years, this hole sat in code that anyone in the world could read.

It was found by Wiz, Calif, OpenAI, and Quarkslab. Here is the title of Wiz's post:

"AI uncovers critical RCE vulnerabilities affecting 70% of the Internet"

AI found a hole that affects 70% of the internet.

Finding bugs is not a contest of compute

In April 2026, antirez, the creator of Redis, wrote a post called "AI cybersecurity is not proof of work."

Hunting for vulnerabilities with AI is not like Bitcoin mining, where piling up enough compute guarantees a hit eventually. Have the same model read the same code again and again, and it plateaus. A weak model just traces the shape of a likely bug class without understanding the real hole.

So what will decide security from here is not the number of GPUs, but access to better models, sooner.

PHP2Shell happened exactly as he said. A hole that human eyes had missed for fourteen years was found by a model smart enough to see it.

For defenders, that is both good news and bad news.

The time between discovery and exploitation is disappearing

The good news is that defenders can use the same AI.

PHP is open source, so anyone can read its code. That is why defensive teams like Wiz and OpenAI could point their AI at it. If it were a product whose insides nobody outside can inspect, the only ones reading it with AI would be the vendor and the attackers analyzing its binaries.

The hole was reported to the PHP security team, fixed, and published, down to where it broke and why. Minimal fixes were even released for PHP 7.4, 8.0, and 8.1, which are past end of life. Cloudflare rolled out WAF protections on the day of disclosure.

In the age of AI, open code is not a weakness. It is what lets defenders fight at all.

The bad news is that attackers can use the same AI.

What AWS saw at the start of this post is exactly that. An attack arrived four days before disclosure, and exploits multiplied within hours of it. AWS now writes that PHP2Shell is "being broadly exploited in the wild."

From the moment a hole is found, to a patch, to that patch landing on servers around the world. Until now, there were weeks or months of slack in between. Attackers, too, needed time to find holes.

AI shrinks that time. Finding holes gets faster, and so does building exploits. The day the patch ships, the attacks have already begun. That is becoming normal.

Patching alone won't make it in time

Of course, there is no way around patching. PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35. Update now.

But in reality, some systems can't be updated right away. Plenty of them still run PHP 8.1 or older, which gets no official fix at all.

The php.net advisory does list mitigations, but it says plainly that they "do not make an installation safe."

IPA's alert puts it this way: until updates or migrations are done, decide whether to block external access or temporarily stop the service.

Go and Node.js, the same week

And PHP was not the only thing that needed updating.

On October 19, two days before PHP2Shell was disclosed, Go released 1.26.10 and 1.27.3. The fix was in crypto/x509, the standard library package that verifies certificates (CVE-2026-111943). It stops trusting a handful of intermediate certificates over concerns about how they were operated. Under certain conditions, an attacker could impersonate a legitimate server and read or alter its traffic.

On October 21, the same day as PHP2Shell, Node.js fixed ten vulnerabilities. Two of them let attackers bypass TLS certificate hostname validation.

These are separate from PHP2Shell. But to the people running the systems, it is all one week. Update the PHP on the web servers, update the services written in Go and Node.js, and make sure each one is actually fixed.

And Go has a trap of its own.

A Go program carries its entire crypto library inside itself.

With PHP or OpenSSL, updating the server's packages fixes every program that uses them. A Go program, though, has the crypto/x509 from build time baked into its binary. No matter how many OS packages you update, what is inside that binary stays old.

The only fix is to rebuild with a new Go and ship it again. If it's your own code, fine. But what about the agents and monitoring tools written in Go that sit inside your company, the CLIs, the binaries you got from vendors? Do you know which Go version each of them was built with?

Looking at our own code

While writing this post, I checked our own code.

Runetale has a client written in Go, and runetale-zig, which we are now rewriting in Zig.

The Go client: rebuild or nothing

The Go client uses both crypto/tls and crypto/x509. Updating the OS does not fix the binary on your machine. So on October 22, we rebuilt it with Go 1.27.3 and released v1.0.8 the same day.

The other side of a single binary

In my last post, I wrote that runetale-zig "runs from a single file." It is a single, fully statically linked binary, crypto library included.

That is a strength when you ship it. But when you need to fix it, it behaves exactly like Go. The TLS implementation is baked into the binary too. Even when Zig's standard library gets a fix, it won't reach users until we rebuild.

On top of that, runetale-zig replaces exactly one file of Zig's standard library, the TLS client (std/crypto/tls/Client.zig), with our own modified copy. We added an extension called ALPN so it can speak gRPC to the Runetale server (Conductor).

Which means that if upstream Zig puts a security fix into that file, it won't come in automatically. Until we merge the diff ourselves, our TLS stays old.

On the other hand, which certificate authorities to trust is not baked into the binary.

var bundle: Certificate.Bundle = .empty;
const now = Io.Timestamp.now(io, .real);
bundle.rescan(self.allocator, io, now) catch {
    self.debug_stage = "ca_bundle";
    return null;
};

rescan rereads the OS certificate store on every connection. If an OS update removes a root certificate, runetale-zig follows along.

But Zig's standard library has no way to do what Go just did: keep trusting a root while rejecting specific intermediate certificates under it. That part, we need to own ourselves.

Put everything in a single binary, and the responsibility ends up in one place too. That's what it comes down to.

A bug with the same shape as PHP2Shell

The first PHP2Shell vulnerability was about cleaning up after running out of memory.

In Zig, allocating memory comes back as an operation that can fail. If you don't write what to clean up when it fails, it doesn't compile.

const conn = self.allocator.create(TlsConn) catch {
    self.debug_stage = "alloc";
    _ = std.c.close(fd);
    bundle.deinit(self.allocator);
    return null;
};

The other one (CVE-2026-109619), in php.net's words, is about request-owned internal state that survives after its backing memory is freed.

Our code had a bug with the same shape.

runetale-zig has a function called disconnect() that closes the connection to the relay server, which forwards traffic when two devices can't connect directly. Before we fixed it in a review in September 2026, it looked like this (comments added for this post):

if (self.tls_conn) |conn| {
    conn.tls_client.writer.flush() catch {};
    _ = std.c.close(conn.fd);
    conn.bundle.deinit(conn.allocator);
    conn.allocator.destroy(conn);   // frees the memory first
    self.tls_conn = null;           // and only then clears the pointer
    self.fd = null;
}

It frees the memory, then clears the pointer. If another thread reads self.tls_conn in that tiny window, it touches freed memory. The fix reversed the order.

if (self.tls_conn) |conn| {
    conn.tls_client.writer.flush() catch {};
    _ = std.c.close(conn.fd);
    self.tls_conn = null;           // clear the pointer first
    self.fd = null;
    conn.bundle.deinit(conn.allocator);
    conn.allocator.destroy(conn);   // then free the memory
}

The current code goes further: it waits on a lock for any thread still writing to leave before freeing anything.

Zig is not a memory-safe language. It is a language that makes you write down where memory is allocated and where it is freed. That is why you can find bugs like this by reading. But it doesn't stop you from writing them in the first place.

PHP's code and our code make the same kinds of mistakes. The only difference is who finds them first.

Even so, keep them out of reach

As AI finds vulnerabilities faster, weeks like this one will become more common. Patches across different languages, libraries, and layers will land all at once. No organization can apply every one of them before the attacks arrive.

Holes are being found faster than patches can be applied. Then the only option is to have a second line of defense in place from the start.

If the patch can't make it in time, make sure the attack can't reach you.

A network that doesn't answer

PHP2Shell works before any application code runs. The login screen and the app's authentication don't matter. The only line of defense left is whether a packet can reach that server at all.

PHP that only makes sense on the public internet, like an online store or a media site, can only be protected by patching and monitoring.

But there is probably more PHP that doesn't need to be public than you think. phpMyAdmin. The Zabbix web console. WordPress's /wp-admin. Internal timesheet and approval systems. Internal tools someone built years ago that are still running.

What matters here is how you hide them.

In recent years, the way into companies in Japan has often been the VPN appliance itself. Its login page faces the internet so people can connect from outside. Attackers exploited holes in that page, and the device meant to protect the network became the way in.

WireGuard is fundamentally different here. To a packet that isn't encrypted with the right key, it doesn't answer at all. No login page, no error message. Scan it, and you can't even tell anything is there.

No matter how smart AI gets, it can't find holes in something that never answers.

There is one more thing. WireGuard uses no certificate authorities and no certificate chains. You register the public key of each peer you connect to, one by one. Even if some intermediate certificate becomes untrustworthy, as with Go this week, WireGuard's data path itself is unaffected. You decide who to trust yourself.

Runetale uses WireGuard to connect only the devices that are allowed to talk to each other, directly. Only administrators' devices can reach phpMyAdmin. Only employees' devices can reach the internal tools. Who can reach what is decided by identity, not by IP address.

Of course, this doesn't fix PHP's bugs. If a device on the inside is compromised, it can still reach them. Even so, being reachable by anyone on the internet and being reachable only by a few devices that hold the key are very different in how much there is for an AI to search.

Search first, with our own AI

In an earlier post, I wrote: "If we're going to get hacked anyway, let's hack it ourselves."

In the age of AI, those words become more literal.

What I spent days doing as a kid, AI now does. Attackers use it too. So defenders should point AI at their own systems first. With open source, we can.

And until the holes we find are closed, make sure no one can reach them.

Finding holes no longer takes time. So keep them out of reach.

If you want to cut your internal systems off from the internet but don't know where to start, let's talk.

hello@runetale.com


References