Not php.net · Not NVD · Not CISA

PHP Vulnerability Tracker

Unofficial briefing on PHP security vulnerabilities

English简体中文日本語DeutschFrançaisNederlandsEspañol

Security alert

PHP2Shell: upgrade PHP. That is the only complete fix.

CVE-2026-109618 and CVE-2026-109619 are critical, unauthenticated remote-code-execution bugs in PHP itself. The PHP project shipped fixes on 21 October 2026 for the supported 8.2–8.5 branches. Restart PHP after you upgrade. A firewall is not a substitute.

Remediation steps

PHP security explainer · defensive

PHP object injection: what it is and how to fix it

Passing user-controlled data to unserialize() lets an attacker choose which objects PHP creates. The PHP manual warns against exactly that.

Last updated

What it is

When PHP unserializes a string it recreates the objects described in it and may call magic methods such as __wakeup() and __destruct(). If the string comes from a cookie, form field or API request, an attacker can pick classes already loaded by the application or its libraries and chain their methods, which can lead to file writes or code execution. MITRE tracks this as CWE-502, deserialization of untrusted data.

How to detect it

How to fix it

Read-only checks and safe patterns

# Find unserialize() calls that may receive request data (read-only)
grep -rnE "unserialize\s*\(" --include=*.php . | grep -vE "/vendor/|/tests?/"

// Safer: exchange data as JSON
$data = json_decode($input, true, 512, JSON_THROW_ON_ERROR);

// If unserialize() is unavoidable for trusted data, forbid objects
$data = unserialize($trusted, ['allowed_classes' => false]);

Is allowed_classes => false enough?

It blocks object creation, which removes the main risk, but the PHP manual still advises against unserializing untrusted input. JSON is the safer default.

Does this relate to PHP2Shell?

No. PHP2Shell is a bug in the PHP runtime. Object injection is a bug in application code and exists on fully patched PHP.

Other PHP vulnerability classes

Sources

Outbound links leave this site. We do not host exploit code.

  1. unserialize() — PHP Manual
  2. json_decode() — PHP Manual
  3. PHP Object Injection — OWASP
  4. CWE-502: Deserialization of Untrusted Data — MITRE CWE