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

SSRF in PHP: what it is and how to fix it

Features such as URL previews, webhooks, image fetchers and PDF generators make the server fetch a URL. If the visitor controls that URL, they can aim your server at places they cannot reach themselves.

Last updated

What it is

Your server usually sits inside a trusted network. A request it makes can reach databases, admin panels, other microservices and cloud instance metadata services that hand out credentials. SSRF turns any fetch-a-URL feature into a proxy into that network. MITRE classifies it as CWE-918, and OWASP keeps a dedicated prevention cheat sheet.

How to detect it

How to fix it

Read-only checks and safe patterns

# Find server-side fetches that may take a user-supplied URL (read-only)
grep -rnE "(curl_setopt.*CURLOPT_URL|file_get_contents\s*\(\s*\$|fopen\s*\(\s*\$)" --include=*.php . | grep -v /vendor/

// Allowlist hosts and schemes before fetching
$u = parse_url($url);
$allowed = ['api.example.com'];
if (($u['scheme'] ?? '') !== 'https' || !in_array($u['host'] ?? '', $allowed, true)) {
    throw new RuntimeException('URL not allowed');
}
curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);

Is a blocklist of 127.0.0.1 enough?

No. Alternative IP notations, IPv6, DNS names that resolve to private addresses and redirects all bypass simple blocklists. OWASP recommends allowlists.

Does a WAF stop SSRF?

It can catch some patterns but cannot know which internal hosts matter to you. Fix it in the code.

Other PHP vulnerability classes

Sources

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

  1. CWE-918: Server-Side Request Forgery (SSRF) — MITRE CWE
  2. Server-Side Request Forgery Prevention Cheat Sheet — OWASP Cheat Sheet Series