Pular para o conteúdo
← Back to Skalablog

Published article

What is the PHP flaw AI discovered?

Software Engineering

The PHP flaw AI helped uncover is a request-handling bug in the PHP scripting language that can expose memory from other users' requests. Wiz reported the issue, PHP maintainers shipped fixes, and administrators should update to a current release and rotate secrets that could have leaked before patching.

The PHP flaw AI found, explained

The PHP flaw is a memory-safety defect in how PHP parses multipart form-data uploads, and it can expose live server memory to an unauthenticated requester. Researchers at Wiz, a cloud security vendor, found it with AI-assisted code analysis and reported it to the PHP project in 2026.

PHP, short for PHP: Hypertext Preprocessor, is a server-side scripting language that runs a large share of public websites. The vulnerability sat in PHP's handling of multipart form-data requests, the format that browsers use when uploading files.

Wiz described the impact as unauthenticated disclosure of live worker memory containing data from outside the attacker's request. In practical terms, that memory can hold passwords, authentication tokens, API keys, and certificates, which is why a single bug in a shared language earns emergency treatment across many organizations.

The fix landed in PHP's own release cycle rather than in a framework or web server. Administrators should check the exact version they run and confirm it includes the maintained fix, then apply it wherever PHP is reachable from the internet.

How the bug chains from an upload to leaked memory

The bug becomes dangerous when an attacker overloads memory during a multipart upload and PHP's cleanup runs in an inconsistent state. Wiz's write-up describes a chain of bugs rather than a single flaw: an out-of-memory error aborts a request before cleanup completes, PHP destroys the request heap, and a session identifier can end up pointing at a freed allocation.

The second link is the trust decision. PHP follows that stale pointer and returns data outside the attacker's request, which turns a crash into a disclosure primitive. Exploiting the full chain depends on the PHP version and configuration, so outcomes vary widely across deployments.

The exploit chain matters because it required coordination across several bugs. Wiz noted that the underlying weaknesses had been present for years, and that the combined path only became visible once automated analysis could reason across millions of lines of code.

That sequencing is the interesting part for defenders. Patching the single most headline-grabbing defect is worth doing, but reviewing whether an application runs with memory limits tight enough to trigger cleanup paths under load is equally relevant.

How severe is the PHP flaw, and why do scores differ?

Severity scores for the PHP flaw cluster around the top of the Common Vulnerability Scoring System, with Wiz's assessment reported at 9.2 out of 10 and some vendors scoring it 10. The gap reflects differences in assumptions about attack prerequisites, not different bugs.

The Common Vulnerability Scoring System, or CVSS, is an open framework maintained by FIRST that rates vulnerability severity on a 0 to 10 scale. A score near the top means an attacker needs few or no privileges and can affect confidentiality, integrity, or availability.

Vendor scores are not identical because scoring depends on the assumed deployment. Read the vendor's methodology rather than treating one decimal as an absolute rank.

  • Pre-authentication reachability: scores rise when no credentials are needed.
  • Memory disclosure scope: scores rise when other requests' data is exposed.
  • Configuration dependence: highly configurable exploitation can justify lower scores.
  • Availability impact: crash and denial-of-service paths add to the score.

Which sites and which PHP versions are affected

Any internet-facing service running an unpatched PHP version that handles multipart uploads is exposed, which covers a large share of websites because PHP underpins content management systems and published applications. The PHP project documents supported versions and security releases on php.net.

Popular content platforms built on PHP inherit the risk only when they run an affected PHP runtime. The bug is not a WordPress plugin flaw or a Drupal module flaw, and upgrading those products alone does not replace updating the PHP interpreter underneath them.

The table below separates what each layer actually fixes, because administrators frequently patch the wrong one after a language vulnerability.

Patch and harden: what to do after the PHP update

Updating PHP to a release that contains the fix closes the known chain, but the follow-up work matters as much because memory disclosure can leak credentials before the patch is applied. Treat every secret that could have lived in process memory as potentially exposed.

Work through these steps in order and record what you changed, so an incident review has evidence rather than a reconstructed timeline.

  1. Identify every running PHP version, including containers and build artifacts, then upgrade to a maintained release from php.net.

2. Rotate session signing keys, database passwords, API tokens, and TLS certificates stored in memory or exposed to the process.

3. Review access logs from the period before the patch for unusual multipart uploads, repeated out-of-memory errors, and anomalous request sizes.

4. Restrict or rate-limit file uploads where the application does not need them, and keep memory limits low enough to surface abnormal payloads.

5. Keep the PHP runtime and its extensions on a patch cadence that lets you apply a security release within days rather than quarters.

Why AI found it and what that means for disclosure

The PHP flaw surfaced because a researcher used AI models to analyze a codebase far larger than any human review team could cover, and the underlying weaknesses had reportedly sat unrecognized for years. Wiz's own account describes finding the bug with AI-assisted analysis.

The disclosure process, however, broke down. A proof-of-concept video from a research firm leaked earlier than the coordinated plan allowed, which converted a controlled release into a live race. Defenders who had been patching privately since the summer lost the order they had planned.

The durable lesson is procedural rather than technical. Coordinated disclosure depends on embargoes holding, and once exploitation is public, unpatched instances face automated scanning within hours. Organizations should assume that any publicly known flaw is already being tried against their hosts.

Was PHP an unhackable part of the internet?

PHP was never unhackable, and framing it that way misleads the teams who have to make patch decisions. The transcript's claim that AI hacked an unhackable layer of the internet overstates the finding: the bugs existed for years, and AI accelerated analysis that humans had not completed.

PHP is a widely deployed scripting language with a long security history that includes memory-safety and request-parsing defects. What changed in 2026 is the speed of discovery, not the absence of prior vulnerabilities.

Treating AI-assisted discovery as a new class of attack is also premature. The evidence supports a narrower claim: automated analysis found a chain across millions of lines of code sooner than manual review would have. Whether that rate stays elevated is an open question.

FAQ

  • Do I need to patch every PHP application after this flaw? Yes if it runs an affected PHP version and accepts untrusted requests. Update PHP itself first, then check that your CMS or framework runs on the patched interpreter.
  • Can leaked data include passwords and API keys? Wiz reported that exposed memory may hold passwords, authentication tokens, API keys, and certificates. Rotate credentials after patching if there is any chance an attacker reached the server.
  • Why do severity scores differ between vendors? Scores on the Common Vulnerability Scoring System depend on assumed attack prerequisites and configuration. A gap between 9.2 and 10 usually reflects different deployment assumptions rather than a different vulnerability.
  • Did AI create the PHP flaw? No evidence supports that. AI assisted the discovery of pre-existing bugs in PHP's code, which the report says had been present for years.

Source video