Technologies

The Vulnerability of the Decade: How a Single PHP Bug Put Three-Quarters of the World Wide Web at Risk

The Vulnerability of the Decade: How a Single PHP Bug Put Three-Quarters of the World Wide Web at Risk

The global web has been hit by its biggest security crisis in a decade. Artificial intelligence helped researchers uncover critical bugs in the PHP core that had existed there for more than ten years. Dubbed PHP2Shell, the issue affected nearly 70 percent of all websites worldwide and triggered millions of automated attacks. We examine how these vulnerabilities work, why the failure occurs before any user code is executed, and how to protect web servers.

What PHP2Shell Is and Why It Is So Dangerous

The vulnerability chain was assigned the identifiers CVE-2026-109618 and CVE-2026-109619 and received a CVSS severity score of 9.2 out of 10. The issue affected virtually every version of PHP starting with the 5.4 branch. The main danger is that the flaw lies deep within the interpreter itself and is triggered while processing an incoming HTTP or HTTPS request, even before control reaches the first line of the script.

The bugs were discovered by specialists from Calif and Wiz using the GPT-5.6 Sol and Google Gemini neural networks. The defective code had been present in the language engine for years, but artificial intelligence was instrumental in developing a working exploit.

Technical Details of CVE-2026-109618 and CVE-2026-109619

The first vulnerability, CVE-2026-109618, stems from improper handling of an out-of-memory (OOM) condition. When the server receives a massive POST request, such as one containing deeply nested form parameters or numerous files, the Zend memory manager exceeds the memory_limit and triggers an interruption via the longjmp() function. At this point, the request's internal structures remain only partially initialized. During the subsequent cleanup procedure, the interpreter mistakenly treats corrupted pointers as valid addresses and attempts to free them. If an attacker has first arranged the memory using the Heap Feng Shui technique, they can redirect these pointers to the desired function and achieve arbitrary code execution.

The second vulnerability, CVE-2026-109619, involves stale Use-After-Free pointers. When a fatal error occurs or the max_execution_time limit is exceeded, the process's global state retains a reference to a memory region that has already been freed. When the next HTTP or HTTPS request reaches the same worker process, PHP accesses this pointer during initialization.

How an Attack over HTTPS Works

The most common attack chain uses the standard session.upload_progress file upload tracking mechanism. The attacker sends a specially crafted multipart request over a secure HTTPS connection.

The following steps occur while this request is being processed.

  • Sending an enormous dataset triggers an OOM crash.
  • The pointer to the session structure remains active but points to a block of memory that has already been freed.
  • A second request to the same worker allows the attacker to read the contents of the server's RAM.
  • By leaking data through the Set-Cookie response header containing the PHPSESSID parameter, the attacker bypasses ASLR protection and determines the exact addresses of system functions.
  • The final payload is then sent to the server, executing arbitrary commands with the web server's privileges.

Global Response and Mitigation Measures

Immediately after information about the vulnerability was published, Cloudflare's security services detected millions of attempts to exploit it worldwide. As a precaution, government agencies and major organizations in Europe and the United States temporarily took their web portals offline until updates could be installed. These included government resources in Finland, France, and the Netherlands, as well as Wikimedia Foundation services. The U.S. National Security Agency and the European CERT-EU center officially recommended temporarily removing vulnerable websites from public access if immediate patching was unavailable.

The threat can only be fully eliminated by updating PHP to the patched versions 8.5.12, 8.4.27, 8.3.36, or 8.2.35.

If the interpreter cannot be updated immediately, experts recommend making temporary changes to the php.ini configuration file.

  • Disable session upload progress tracking by setting session.upload_progress.enabled=0.
  • Disable OPcache class caching by setting opcache.enable=0.
  • Disable fatal error backtrace generation by setting fatal_error_backtraces=0.

Although WAFs can block typical suspicious HTTPS requests containing the session.upload_progress parameter, they cannot guarantee complete protection against every method of delivering malicious code. Only a full system update closes the server security hole.

Comments0

Enter the code

Code sent to . If the email doesn't arrive within a few minutes, check your Spam and Promotions folders.

I want a comment system like this for my website

Read also

Have an idea for a project?

Tell me what you want to create. I'll help you shape the idea and launch it.

Message me