Web Development

When a Vulnerability Sits Hidden for Two Years, We All Have a Problem

A

Adil Sher

Author

Oct 23, 2026
4 min read
1 views
When a Vulnerability Sits Hidden for Two Years, We All Have a Problem

I was debugging a memory leak in one of our microservices last month when a colleague mentioned the PHP security incident casually over coffee. "Yeah, they patched something critical," he said. I nodded and moved on. But then I actually read the details, and something clicked: this wasn't just another CVE with a scary number attached. This was a reminder that even the most widely used language in the world, running on millions of servers, can have fundamental flaws hiding in plain sight for years.

That vulnerability first surfaced in 2024. For two years, nobody could prove it was actually exploitable. Then someone did. And suddenly, government websites were going dark on purpose, releases shipped a day early, and we all got a lesson in why security isn't just a checkbox you mark off during deployment. It's a structural problem that requires constant attention, resources, and honesty about failures.

The Two Bugs That Broke Everything

Let me break down what actually happened here, because the technical details matter if you're running PHP in production.

The first vulnerability lives in PHP's memory management system. When PHP hits its memory limit, it uses a technique called a long jump, essentially a hard abort that leaps back to a safe point and abandons everything in between. The problem is timing. In a few critical moments during request handling, PHP sets up data structures but hasn't finished wiring them together yet. If memory runs out at exactly that moment, the cleanup code that follows gets left with half-built, invalid data. But it treats it as valid anyway.

The second bug is about state persistence between requests. A PHP worker doesn't start fresh for every request, it reuses processes. Between requests, certain internal state is supposed to get wiped. But if a fatal error fires at the wrong moment, that wipe gets skipped. Now you've got a stale pointer sitting there, and the next request reads garbage data before anything gets reset. The confirmed attack used this through PHP's error backtrace feature, which is enabled by default.

Both bugs require no authentication. Both work with default settings. Both have been validated as working remote code execution in real-world environments.

How They Actually Fixed This

The fix is what I found interesting: it touches 389 files. One commit. This isn't a surgical patch; it's a rearchitecture of how PHP handles memory allocation failures.

Instead of jumping out of an out-of-memory error mid-operation, PHP now raises a flag and finishes what it's safely doing before reporting the error. There's also a hard limit backstop, if you somehow exceed that, the process exits immediately rather than risk running over corrupted memory.

For the state corruption issue, global variables get reset earlier, before the next request can reach them. But here's the cost: once an allocation is allowed to fail gracefully instead of bailing out completely, every part of the engine that allocates memory needs to check for that failure and back out cleanly. That's why the change is so massive.

My Take on This

I've been working with PHP for years, and I'm tired of the narrative that says this language is just for beginners or legacy systems. But I'm also not going to pretend this doesn't sting. A vulnerability that sat in the codebase since 2024 without an exploitable proof-of-concept should have triggered more urgency, more resources, or more transparency.

What bothers me most isn't that the bug existed, bugs exist. It's that the Foundation themselves said the delay was "a structural failure, caused by both the security team's decision process and its lack of resources." That's honest, and I respect it. But it also means PHP's infrastructure wasn't built to handle security work at the scale this language actually operates at.

If you're running PHP, here's what matters: update immediately. Not tomorrow. This week. 8.1 and older don't get patches, so if you're there, you're running outdated software with known critical vulnerabilities. There's no excuse for that in 2026.

What This Means for Your Production Systems

Check your PHP version right now. Type php -v. If it's anything before 8.2.35, 8.3.36, 8.4.27, or 8.5.12, you're vulnerable. Not "might be compromised." Vulnerable. With default settings. No credentials needed.

Even if you can't patch immediately, and I understand sometimes you genuinely can't, the PHP Foundation documentation lists stopgaps, but they're clear: these reduce exposure, they don't make you safe.

What's Your Situation?

I want to know: what's your update cycle actually like? Are you on a recent version, or are you managing legacy systems that would take months to upgrade? Drop a thought in the comments. This vulnerability affects all of us, but differently depending on where we operate.

Source: This post was inspired by "This Week in PHP Internals | Oct 22, 2026" by Dev.to. Read the original article

Share this article

Written by Adil Sher

Full stack developer building high-traffic platforms, AI services, and custom web applications. Explore my portfolio, learn about my background, or get in touch.

Related Articles

Why I Finally Stopped Shipping Code and Started Owning Problems
Web Development Oct 22

Why I Finally Stopped Shipping Code and Started Owning Problems

Last year, I handed off a major feature to a client and considered it "done." The code was merged, tests passed, deployment went smooth. Three weeks later, they called me at 2 AM because the feature was creating duplicate records under specific network conditions. I'd shipped cod...