PHP2Shell Vulnerability Checker

Enter a URL you own or are authorized to test. Review PHP signals, version clues and form responses to assess PHP2Shell exposure and guide remediation.

2

PHP core vulnerabilities

9.2

CVSS v4.0 score (Critical)

4

Fixed upstream branches from 8.2 to 8.5

Vulnerability overview

What is PHP2Shell, and why does it need prompt attention?

PHP2Shell covers two PHP core memory-safety vulnerabilities, CVE-2026-109618 and CVE-2026-109619, both rated CVSS v4.0 9.2. They can allow unauthenticated remote code execution, with impact depending on the version, deployment and attack path.

Read the official PHP advisory

The issue is in PHP itself, not just an application

Review PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, LiteSpeed and other PHP deployments serving web requests. PHP identifies mod_php as the highest-risk setup, with demonstrated exploitation before application code runs. Simple pages and secure application code do not rule out exposure.

Verify the runtime as well as the website software

Updating WordPress, Drupal, a framework or a plugin does not necessarily update the PHP runtime underneath. Review the PHP version assigned to each site, FPM pools, container images, service nodes and PHP embedded in panels or appliances. Official fixed releases were published on 21 October 2026.

What the checker reviews

Review PHP signals, request responses and patch status

How do the seven requests support a review?

Start with a baseline GET, then send a URL-encoded and a multipart form for each of three methods. Inspect each response before the next request. These ordinary requests compare behavior without code-execution or memory-exhaustion payloads.

Seven HTTP requests used in PHP2Shell triage
Order Method Request content What to observe
01GETNo request bodyReachability, redirects, public PHP version banners and response headers.
02POSTapplication/x-www-form-urlencodedOne ordinary text field as the POST control.
03POSTmultipart/form-dataOne text field compared with the POST control, without file parts or upload-progress fields.
04PUTapplication/x-www-form-urlencodedOne ordinary text field to observe how this path handles PUT.
05PUTmultipart/form-dataCompare against the URL-encoded PUT for content-type differences.
06PATCHapplication/x-www-form-urlencodedOne ordinary text field as the PATCH control.
07PATCHmultipart/form-dataCompare with the PATCH control instead of inferring all methods from POST alone.

PHP banners in X-Powered-By or Server, and session cookies such as PHPSESSID, are runtime clues only. They may be hidden, modified or customized. A cookie also does not prove PHP parsed the request body.

These checks cover the supplied URL and path only. Other routes, CDN rules and directly reachable origins may behave differently. Do not generalize a homepage result to the whole site. Check only authorized paths suitable for form requests.

How to interpret findings

Distinguish exposure signals from verified fixes

Public responses provide only part of the evidence. Banners may be hidden or modified, and older versions may include vendor backports. Verify the runtime rather than treating missing evidence as safety.

Review common assessment pitfalls

A fixed-version signal is observed

A public version at or above its branch threshold is useful evidence, but a proxy may alter banners. Confirm on the host that every instance has loaded the fixed code.

An older-version risk is observed

Prioritize versions below the upstream threshold, while checking for distribution or LTS backports. If backport status is unknown, record it as needing verification rather than claiming confirmed remote code execution.

Requests are rejected or respond differently

A successful control and a multipart 4xx may reflect content-type restrictions. Two 405 responses may simply mean the method is unsupported. Status codes alone cannot distinguish CDN, web-server or application-level rejection.

No PHP signals or no usable response

Hidden versions, proxy caches, custom cookies, connection failures and timeouts limit the assessment. Record insufficient evidence or an unavailable assessment instead of presenting a green safety verdict.

Checking process

Start with a URL and review the evidence

1

Enter a target URL

Provide the address of a website you own or are authorized to test, including the path you want to check.

2

Review each check as it completes

Start with a baseline GET, then compare URL-encoded and multipart responses for POST, PUT and PATCH, one request at a time.

3

Review findings and remediation guidance

Interpret status codes and version signals, then verify patch status against the actual PHP runtime and vendor advisories.

Host-side verification

How can you confirm the website is running fixed PHP?

External checks help identify clues, but patch status must be confirmed on the host, in containers or through the hosting panel. Record the runtime, package source, fixed version and process state after updating.

1. Identify the PHP runtime handling requests

Check the PHP version assigned to the site, its web-server module or FPM pool. Inventory coexisting versions, separate sites, containers and load-balanced nodes. php -v reports the current CLI version only, not necessarily the web runtime. Do not expose a public phpinfo page for this check.

php -v

2. Verify the complete package version and advisory

Query the package used by your deployment and compare its full version against the distribution advisory. Ubuntu 24.04 package 8.3.6-0ubuntu0.24.04.13 already includes the fix; PHP 8.3.6 alone omits that backport information. Choose the appropriate package-query example below and adjust the package name.

dpkg-query -W php8.3-fpm
rpm -q php-fpm
Review the official Ubuntu package list

3. Apply a fixed release for the relevant branch

Use a fixed upstream release, a later security release in the same branch or a confirmed vendor backport. Update PHP bundled with panels, appliances and containers through their suppliers. PHP 8.1 and earlier are outside regular upstream support; confirm LTS fixes or migrate. PHP also provided minimal source backports for 7.4, 8.0 and 8.1 for this issue.

4. Restart and verify every instance

Confirm PHP-FPM, Apache or other workers have restarted, and replace containers and nodes as needed. Updated files on disk do not guarantee old serving processes have been replaced. Unusual requests, out-of-memory events and worker crashes can support investigation, but their absence does not establish that a system was unaffected.

DIY: run seven curl checks from your terminal

The script sends one GET followed by URL-encoded and multipart forms for POST, PUT and PATCH, one request at a time. It uses ordinary text fields without files or upload-progress fields. Run it only on authorized paths suitable for test forms; ordinary requests can still trigger application actions.

Bash / curl
#!/usr/bin/env bash
# PHP2Shell HTTP observations: 7 sequential requests, no exploit payload.
set -u

URL="${1:-https://example.com/}"
case "$URL" in
  http://*|https://*) ;;
  *) printf 'ERROR=HTTP(S)_URL_REQUIRED\n' >&2; exit 2 ;;
esac

if ! command -v curl >/dev/null 2>&1 || ! command -v awk >/dev/null 2>&1; then
  printf 'ERROR=CURL_AND_AWK_REQUIRED\n' >&2
  exit 127
fi

probe() {
  printf '\n[%s/7] %s %s\n' "$1" "$2" "$3"
  local method="$2"
  shift 3
  curl -q --globoff --proto '=http,https' --silent --show-error \
    --connect-timeout 5 --max-time 15 --request "$method" \
    --dump-header - --output /dev/null \
    --write-out '\nHTTP_CODE=%{http_code} TOTAL_SECONDS=%{time_total}\n' \
    "$@" --url "$URL" |
  awk '{
    sub(/\r$/, "")
    line = tolower($0)
    if ($0 ~ /^HTTP\// || line ~ /^(server|x-powered-by|content-type):/ || $0 ~ /^HTTP_CODE=/) {
      print
    } else if (line ~ /^set-cookie:[ \t]*phpsessid[ \t]*=/) {
      print "PHPSESSID=present; value hidden"
    }
  }'
  local curl_status="${PIPESTATUS[0]}"
  if [ "$curl_status" -ne 0 ]; then
    printf 'CURL_EXIT=%s\n' "$curl_status"
    FAILED=1
  fi
}

FAILED=0
probe 1 GET baseline
probe 2 POST urlencoded --data-raw 'php2shell_check=1'
probe 3 POST multipart --form-string 'php2shell_check=1'
probe 4 PUT urlencoded --data-raw 'php2shell_check=1'
probe 5 PUT multipart --form-string 'php2shell_check=1'
probe 6 PATCH urlencoded --data-raw 'php2shell_check=1'
probe 7 PATCH multipart --form-string 'php2shell_check=1'
exit "$FAILED"

Use Bash on Linux/macOS, or WSL or Git Bash on Windows. Save it as php2shell-self-check.sh and run the command below with an authorized test URL. Do not paste the Bash script directly into PowerShell.

bash php2shell-self-check.sh https://example.com/test.php

Connection timeout is 5 seconds and each request has a 15-second total limit. The script ignores personal curl configuration, verifies TLS and does not follow redirects or retry. For a 3xx response, verify that the final URL is authorized before running it again there. PHPSESSID is shown only as a presence marker; cookie values and response bodies are omitted.

HTTP_CODE is the response status and TOTAL_SECONDS is elapsed time. A nonzero CURL_EXIT marks a transfer failure; remaining checks still run. A nonzero script exit indicates an input, dependency or transfer problem. HTTP 4xx/5xx responses are recorded normally; the exit code does not assess vulnerabilities or patch status.

How to interpret terminal output

Version headers provide clues

Server or X-Powered-By may be hidden or stale. Verify the PHP runtime actually serving the website: the minimum official fixed releases for the respective branches are 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Confirm vendor backports using the full package version and security advisory.

Compare both encodings for the same method

If urlencoded returns 2xx or 3xx while multipart returns 403 or 406 for the same method, this shows a response difference only. It does not confirm WAF blocking or rejection before the request reached PHP.

A successful response does not prove PHP parsing

A multipart response of 2xx or 3xx means only that a success or redirect response was received. It does not prove the body reached PHP and was parsed, or establish whether the vulnerability is present.

405 and PHP indicators are not conclusive alone

Uniform 405 responses do not prove a fix. Missing PHP indicators do not prove PHP is absent. A PHPSESSID cookie does not establish that multipart was parsed or which layer produced the response.

See official fixed releases and upgrade guidance
What can temporary mitigations do while an update is pending?

PHP states that an update is the complete fix. The following settings reduce exposure to specific known paths; they do not make an unpatched runtime safe. Assess application requirements and official guidance before changing settings.

  • Disable session.upload_progress.enabled and restart every worker. Apply it before request parsing through php.ini, the FPM pool or server configuration, rather than ini_set() or FPM .user.ini. This blocks the confirmed session paths only.
  • For PHP 8.5, official guidance includes disabling fatal_error_backtraces and restarting workers. This covers the confirmed fatal-backtrace path only, not other variants.
  • Review body-size, field-count and multipart-part limits at the web server or proxy, and check for origins reachable without the CDN. Hiding errors, blocking a single method or checking one path does not replace a fix.

Official fixed releases

Check the fix thresholds for PHP 8.2–8.5

Compare versions within each branch: the 8.3 threshold does not determine 8.4 status. Do not assume prereleases or unknown branches are fixed. Verify distribution backports and custom builds against complete package versions, build records and vendor advisories.

Read the official update guidance

Using BaoTa Panel? Update PHP from the software store

According to BaoTa’s announcement dated 2026-10-21, some PHP security releases are available in the panel. Check the software store in your BaoTa Panel for the versions currently offered.

Read the BaoTa upgrade announcement

Back up your website, databases and relevant configuration before upgrading, and choose a suitable maintenance window.

  1. Find the PHP runtime used by your site

    Sign in to BaoTa Panel, open Software Store → Installed, locate the PHP version actually used by your website and open its management page.

  2. Install the security release for that branch

    Check for updates on that PHP management page and follow the prompts to install the fixed release listed above for the same branch, or a later security release in that branch.

  3. Restart PHP and verify your website

    After upgrading, restart the corresponding PHP service and confirm that all workers have reloaded. Verify the PHP version actually serving the site, then test page access, uploads, database connections and other business functions.

If multiple PHP versions are installed, check every version still in use. If you install another version, also confirm that the website has been switched to the patched PHP runtime.

FAQ

PHP2Shell detection and patching FAQ

Understand the differences between version signals, status codes and vendor backports to avoid overinterpreting findings.

What is PHP2Shell, and which websites need review?

PHP2Shell refers to two PHP core vulnerabilities, CVE-2026-109618 and CVE-2026-109619, that can allow unauthenticated remote code execution. Review all unpatched PHP runtimes serving web requests, even when the application code itself is secure.

Does a 403, 405 or 413 response prove protection?

No. Authentication, unsupported methods, size limits or proxies can produce these status codes. Even a rejected multipart request describes only the current path; it does not prove a PHP fix or complete protection.

Do missing PHP headers mean a website is unaffected?

Not necessarily. Version disclosure may be disabled, and a CDN, reverse proxy or static homepage may conceal the backend. Missing signals mean insufficient information, so verify the actual server runtime.

Which versions include fixes, and are older versions always unpatched?

Upstream fixes are available in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Use a fixed or later security release in the relevant branch. Older versions may include vendor backports, so verify the full package version against vendor advisories. PHP 8.1 and earlier are outside regular upstream support. Restart the relevant workers after updating.

Why review PUT and PATCH as well as POST?

Methods may pass through different routes and filtering rules. Since PHP 8.4, applications can use request_parse_body() to parse multipart requests on methods other than POST. This does not mean every application parses PUT or PATCH automatically. POST behavior alone cannot establish protection for other methods or paths.

What if POST returns 200, PUT/PATCH return 405 and no PHP signals are visible?

Record the PHP runtime and patch status as unconfirmed. A POST 200 shows that the path responded, while 405 indicates method rejection at some layer. Static pages, other runtimes and PHP with hidden signals may all produce this pattern. Verify the runtime on the host rather than declaring safety or a confirmed vulnerability.

Vulnerability and remediation references were checked on 2026-10-22. External observations have limits; follow current PHP and vendor advisories for operational decisions.

Get a clearer view of your PHP2Shell exposure

Review public responses one check at a time, interpret the evidence, and verify patches against the actual server environment.

Explore the checks