php.net ではありません · NVD ではありません · CISA ではありません

PHP 脆弱性トラッカー

PHP のセキュリティ脆弱性に関する非公式ブリーフィング

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

セキュリティ警報

PHP2Shell:PHP をアップデートしてください。それが唯一の完全な修正です。

CVE-2026-109618 と CVE-2026-109619 は、PHP 本体に存在する認証不要のリモートコード実行(RCE)の深刻な脆弱性です。PHP プロジェクトは 2026 年 10 月 21 日、サポート中の 8.2〜8.5 系に修正版を公開しました。アップデート後は PHP を再起動してください。ファイアウォールは代わりになりません。

対策の手順

AI エージェントガイド

AI コーディングエージェントで PHP2Shell を修正

どの PHP が実際にサイトを動かしているかの特定、ディストリのバックポート確認、パッケージ・イメージ・パネルの更新、プロセス再起動、ログ確認といった手間のかかる作業は AI エージェントに任せられます。以下のプロンプトでは、エージェントが提案し、あなたが承認します。

最終更新

プロンプトがエージェントに指示する内容

  1. 実際に配信している PHP を特定(CLI・PHP-FPM・mod_php、全プールと vhost)。
  2. 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 と比較(ディストリのバックポートを含む)。
  3. 変更案を示し、承認を待つ。
  4. 適用し、PHP-FPM とワーカーを再起動、コンテナを再ビルド。
  5. 本番のバージョンを検証し、JPCERT/CC の兆候を確認:異常な PHPSESSID、multipart リクエスト後の OOM や HTTP 500、想定外の PHP 再起動。
  6. 変更前後の表で報告。

エージェントを安全に使う

コピペ用プロンプト

どのエージェントでも確実に動くようプロンプトは英語です。最後の行で日本語での報告を指示しています。事実は本サイトの各ページに基づきます。

Linux/Windows サーバー・VPS(apt、dnf/yum、apk、Windows)
You are helping me patch the PHP2Shell vulnerability on this server.

Context: PHP2Shell is CVE-2026-109618 and CVE-2026-109619, two critical unauthenticated remote-code-execution bugs in the PHP runtime (advisory published 21 October 2026). Fixed upstream releases: PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12 (or later on the same branch). PHP 8.1 and earlier get no upstream fix. Linux distributions may ship backported fixes under an older version string, so check the distro's security tracker / package changelog for CVE-2026-109618 and CVE-2026-109619, not only "php -v".

Rules for you (the agent):
- Do NOT write, download, run or search for exploit code or proof-of-concept payloads. This is defensive patching only.
- Never ask me for passwords, API keys or tokens, and do not print secrets you come across (.env, wp-config.php, config files). Redact them.
- Show every command before running it. Run read-only commands first. Ask for my explicit approval before any command that changes the system, uses sudo, restarts services or rebuilds images.
- Prefer a staging copy first. Before changing anything, confirm a backup or snapshot exists (or tell me how to make one).

Steps:
0. Identify the OS and package manager (cat /etc/os-release; on Windows, how PHP was installed: windows.php.net zip, IIS, XAMPP, Chocolatey, Scoop).
1. Detect the PHP that actually serves traffic, not just the CLI: compare "php -v" with the PHP-FPM binaries (php-fpm -v, php-fpm8.x -v), Apache mod_php (apachectl -M | grep php, phpinfo via a temporary local-only page that you delete afterwards), web-server config (which socket/handler each vhost uses) and running processes (ps aux | grep -i php). List every version found and which site/vhost uses it.
2. Compare each runtime against the fixed versions. If it is a distro package, check the package version against the distro's security advisory/tracker for both CVEs (backports count as fixed).
3. Propose the minimal change and WAIT for my approval: e.g. apt update && apt install --only-upgrade the php packages (Debian/Ubuntu, including ondrej/php PPA), dnf/yum update php* (RHEL/Alma/Rocky/Amazon Linux, including Remi), apk upgrade php8x* (Alpine), or replacing the PHP folder with the patched windows.php.net build (keep php.ini). Say which repositories provide the fix and the expected version.

After I approve and you apply the change:
- Restart every PHP-FPM pool / Apache / worker process (queue workers, Octane/RoadRunner/Swoole, supervisor jobs) so no old binary stays in memory. Rebuild and redeploy containers instead of patching them in place.
- Verify: re-run the version checks against the live runtime (FPM and CLI), confirm the package changelog lists the CVEs, and check the sites still respond.
- Check the compromise indicators listed by JPCERT/CC (JPCERT-AT-2026-0033) in recent web-server and PHP logs: unusually long or malformed PHPSESSID values; suspicious multipart/upload requests followed by memory exhaustion (OOM) errors or HTTP 500; unexpected PHP process crashes or restarts. Also look for recently modified .php files in web roots. Report what you find; do not delete evidence.
- Report back: a table of runtime → old version → new version → fixed (yes/no/backport), the commands you ran, anything you could not fix, and recommended next steps.

Write your report in Japanese.
Docker イメージと Dockerfile
You are helping me patch the PHP2Shell vulnerability in my containers.

Context: PHP2Shell is CVE-2026-109618 and CVE-2026-109619, two critical unauthenticated remote-code-execution bugs in the PHP runtime (advisory published 21 October 2026). Fixed upstream releases: PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12 (or later on the same branch). PHP 8.1 and earlier get no upstream fix. Linux distributions may ship backported fixes under an older version string, so check the distro's security tracker / package changelog for CVE-2026-109618 and CVE-2026-109619, not only "php -v".

Rules for you (the agent):
- Do NOT write, download, run or search for exploit code or proof-of-concept payloads. This is defensive patching only.
- Never ask me for passwords, API keys or tokens, and do not print secrets you come across (.env, wp-config.php, config files). Redact them.
- Show every command before running it. Run read-only commands first. Ask for my explicit approval before any command that changes the system, uses sudo, restarts services or rebuilds images.
- Prefer a staging copy first. Before changing anything, confirm a backup or snapshot exists (or tell me how to make one).

Steps:
1. Find every Dockerfile, compose file, Helm chart and CI config in this repository that uses PHP (FROM php:..., bitnami/php-fpm, alpine + php8x packages, serversideup/php, custom base images). List each image and tag.
2. For running containers (docker ps / kubectl get pods), run "php -v" and "php-fpm -v" inside each one to get the real runtime version. Pinned digests or old tags may still be vulnerable even if the Dockerfile looks fine.
3. Compare against the fixed versions (8.2.35 / 8.3.36 / 8.4.27 / 8.5.12; for distro-package images check the distro advisory for backports).
4. Propose the change and WAIT for my approval: bump tags to a patched release, update pinned digests, add --pull to builds so the base image is refreshed, and note images that are on PHP 8.1 or earlier (no upstream fix).

After I approve and you apply the change:
- Restart every PHP-FPM pool / Apache / worker process (queue workers, Octane/RoadRunner/Swoole, supervisor jobs) so no old binary stays in memory. Rebuild and redeploy containers instead of patching them in place.
- Verify: re-run the version checks against the live runtime (FPM and CLI), confirm the package changelog lists the CVEs, and check the sites still respond.
- Check the compromise indicators listed by JPCERT/CC (JPCERT-AT-2026-0033) in recent web-server and PHP logs: unusually long or malformed PHPSESSID values; suspicious multipart/upload requests followed by memory exhaustion (OOM) errors or HTTP 500; unexpected PHP process crashes or restarts. Also look for recently modified .php files in web roots. Report what you find; do not delete evidence.
- Report back: a table of runtime → old version → new version → fixed (yes/no/backport), the commands you ran, anything you could not fix, and recommended next steps.

Write your report in Japanese.
コントロールパネル(cPanel、Plesk、aaPanel/宝塔、DirectAdmin、CyberPanel、HestiaCP)
You are helping me patch the PHP2Shell vulnerability on a server managed by a hosting control panel.

Context: PHP2Shell is CVE-2026-109618 and CVE-2026-109619, two critical unauthenticated remote-code-execution bugs in the PHP runtime (advisory published 21 October 2026). Fixed upstream releases: PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12 (or later on the same branch). PHP 8.1 and earlier get no upstream fix. Linux distributions may ship backported fixes under an older version string, so check the distro's security tracker / package changelog for CVE-2026-109618 and CVE-2026-109619, not only "php -v".

Rules for you (the agent):
- Do NOT write, download, run or search for exploit code or proof-of-concept payloads. This is defensive patching only.
- Never ask me for passwords, API keys or tokens, and do not print secrets you come across (.env, wp-config.php, config files). Redact them.
- Show every command before running it. Run read-only commands first. Ask for my explicit approval before any command that changes the system, uses sudo, restarts services or rebuilds images.
- Prefer a staging copy first. Before changing anything, confirm a backup or snapshot exists (or tell me how to make one).
- Use the panel's own update mechanism for its PHP builds; do not install a second PHP from another repository on top of it unless I approve.

Steps:
0. Detect which panel is installed (cPanel/WHM with EasyApache 4 ea-php, Plesk with plesk-php, aaPanel/BT Panel 宝塔 under /www/server/php, DirectAdmin CustomBuild, CyberPanel/LiteSpeed lsphp, HestiaCP) and its version.
1. Detect the PHP that actually serves traffic, not just the CLI: compare "php -v" with the PHP-FPM binaries (php-fpm -v, php-fpm8.x -v), Apache mod_php (apachectl -M | grep php, phpinfo via a temporary local-only page that you delete afterwards), web-server config (which socket/handler each vhost uses) and running processes (ps aux | grep -i php). List every version found and which site/vhost uses it.
2. Compare each runtime against the fixed versions. If it is a distro package, check the package version against the distro's security advisory/tracker for both CVEs (backports count as fixed).
   Panels usually install several PHP versions side by side (e.g. /opt/cpanel/ea-php*/, /opt/plesk/php/*/, /www/server/php/*/, /usr/local/lsws/lsphp*/). Check every one and which domains use it.
3. Look up the panel vendor's own PHP2Shell notice/changelog and tell me which panel PHP builds include the fix. Propose the update (e.g. WHM/EasyApache update, Plesk updater, 宝塔 software store / reinstall of the PHP version, DirectAdmin CustomBuild "./build update && ./build php", CyberPanel lsphp package upgrade) and WAIT for my approval. Flag versions the vendor has not patched yet and sites that must be moved to a patched version.

After I approve and you apply the change:
- Restart every PHP-FPM pool / Apache / worker process (queue workers, Octane/RoadRunner/Swoole, supervisor jobs) so no old binary stays in memory. Rebuild and redeploy containers instead of patching them in place.
- Verify: re-run the version checks against the live runtime (FPM and CLI), confirm the package changelog lists the CVEs, and check the sites still respond.
- Check the compromise indicators listed by JPCERT/CC (JPCERT-AT-2026-0033) in recent web-server and PHP logs: unusually long or malformed PHPSESSID values; suspicious multipart/upload requests followed by memory exhaustion (OOM) errors or HTTP 500; unexpected PHP process crashes or restarts. Also look for recently modified .php files in web roots. Report what you find; do not delete evidence.
- Report back: a table of runtime → old version → new version → fixed (yes/no/backport), the commands you ran, anything you could not fix, and recommended next steps.

Write your report in Japanese.
PHP 8.1 以前の旧バージョン(移行計画と緩和策)
You are helping me deal with PHP2Shell on an application that runs PHP 8.1 or older (no upstream fix exists for these branches).

Context: PHP2Shell is CVE-2026-109618 and CVE-2026-109619, two critical unauthenticated remote-code-execution bugs in the PHP runtime (advisory published 21 October 2026). Fixed upstream releases: PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12 (or later on the same branch). PHP 8.1 and earlier get no upstream fix. Linux distributions may ship backported fixes under an older version string, so check the distro's security tracker / package changelog for CVE-2026-109618 and CVE-2026-109619, not only "php -v".

Rules for you (the agent):
- Do NOT write, download, run or search for exploit code or proof-of-concept payloads. This is defensive patching only.
- Never ask me for passwords, API keys or tokens, and do not print secrets you come across (.env, wp-config.php, config files). Redact them.
- Show every command before running it. Run read-only commands first. Ask for my explicit approval before any command that changes the system, uses sudo, restarts services or rebuilds images.
- Prefer a staging copy first. Before changing anything, confirm a backup or snapshot exists (or tell me how to make one).

Steps:
1. Detect the PHP that actually serves traffic, not just the CLI: compare "php -v" with the PHP-FPM binaries (php-fpm -v, php-fpm8.x -v), Apache mod_php (apachectl -M | grep php, phpinfo via a temporary local-only page that you delete afterwards), web-server config (which socket/handler each vhost uses) and running processes (ps aux | grep -i php). List every version found and which site/vhost uses it.
2. Compare each runtime against the fixed versions. If it is a distro package, check the package version against the distro's security advisory/tracker for both CVEs (backports count as fixed).
3. Check whether my OS vendor or an extended-support provider ships a backported fix for this old branch (e.g. distro LTS/ELS security trackers). If yes, propose installing it.
4. Otherwise produce an upgrade plan to a fixed branch (8.2.35+ / 8.3.36+ / 8.4.27+ / 8.5.12+): scan the code and composer.json for incompatibilities (deprecated functions, removed extensions, framework/CMS minimum versions), suggest tools such as PHPCompatibility for PHP_CodeSniffer or Rector, estimate effort, and propose doing it on a staging copy first.
5. Propose interim risk reduction while the upgrade happens and say clearly that it is incomplete: restrict or remove internet exposure (VPN/IP allow-list, maintenance page), put a WAF in front, and apply the interim php.ini settings from the PHP advisory only as a stopgap. WAIT for my approval before changing anything.

After I approve and you apply the change:
- Restart every PHP-FPM pool / Apache / worker process (queue workers, Octane/RoadRunner/Swoole, supervisor jobs) so no old binary stays in memory. Rebuild and redeploy containers instead of patching them in place.
- Verify: re-run the version checks against the live runtime (FPM and CLI), confirm the package changelog lists the CVEs, and check the sites still respond.
- Check the compromise indicators listed by JPCERT/CC (JPCERT-AT-2026-0033) in recent web-server and PHP logs: unusually long or malformed PHPSESSID values; suspicious multipart/upload requests followed by memory exhaustion (OOM) errors or HTTP 500; unexpected PHP process crashes or restarts. Also look for recently modified .php files in web roots. Report what you find; do not delete evidence.
- Report back: a table of runtime → old version → new version → fixed (yes/no/backport), the commands you ran, anything you could not fix, and recommended next steps.

Write your report in Japanese.

主な AI コーディングエージェント

順不同。本サイトはいずれとも提携していません。

OpenAI Codex CLIプロジェクトまたはサーバーで codex を起動してプロンプトを貼り付け。コマンド実行前に確認する承認モードのままにします。
Claude Codeターミナルで claude を起動して貼り付け。設定を変えない限りコマンド実行前に許可を求めます。
Cursor (Agent)リポジトリまたは Remote-SSH を開き、Agent チャットに貼り付け、各ターミナルコマンドを確認します。
Cursor Cloud AgentsDocker・リポジトリ向け。ブランチ上で作業し差分をレビューします。サーバーには接続しません。
Grok Build (xAI CLI)xAI のターミナル型コーディングエージェント。プロジェクトかサーバーで起動して貼り付け。シェルがない場合は grok.com のチャットに貼り、提示された読み取り専用コマンドを自分で実行します。
GitHub Copilot coding agentDocker・リポジトリ用プロンプトを書いた Issue を Copilot に割り当てると、レビュー用のプルリクエストを作成します。
Gemini CLIターミナルで gemini を起動して貼り付け、提案されたコマンドを一つずつ確認します。
Windsurf (Cascade)エディターの Cascade に貼り付けます。windsurf.com は現在 Devin Desktop にリダイレクトされます。
ClineVS Code 拡張機能。Cline パネルに貼り付け、コマンドと編集を一つずつ承認します。
AiderDocker・リポジトリ向け。リポジトリで aider を起動して貼り付け、作成されたコミットを確認します。

よくある質問

AI エージェントで PHP2Shell を修正できますか?

定型的な作業なら可能です。ディストリのパッケージ更新、Docker ベースイメージの更新、パネルの PHP 更新など。承認モードを維持し、ステージングで試し、本番が 8.2.35・8.3.36・8.4.27・8.5.12 またはバックポート版であることを確認してください。

本番でエージェントに sudo を与えても安全ですか?

無人では与えないでください。読み取り専用の確認をさせ、バックアップ後に特権コマンドを一つずつ承認します。

PHP 8.1 以前の場合は?

公式の修正はありません。旧バージョン用プロンプトで移行計画と、外部公開の停止などの暫定策を作らせてください。php.ini の暫定設定は不完全です。