非 php.net · 非 NVD · 非 CISA

PHP 漏洞追踪

关于 PHP 安全漏洞的非官方简报

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

安全警报

PHP2Shell:请升级 PHP。这是唯一完整的修复。

CVE-2026-109618 与 CVE-2026-109619 是 PHP 本体中的严重漏洞,未经身份验证即可远程执行代码。PHP 项目已于 2026 年 10 月 21 日为仍受支持的 8.2 至 8.5 分支发布修复。升级后必须重启 PHP。防火墙不能替代升级。

修复步骤

AI Agent 指南

我的产品或网站受影响吗?用 AI Agent 自查

很多网站并不直接用 PHP,而是通过 XAMPP、主机面板、NAS、Docker 镜像或厂商设备间接带上了 PHP。下面的只读提示词让 AI agent 找出每一个 PHP 运行环境,与修复版本对比并给出判定表,全程不改动任何东西。

最近更新

提示词会让 agent 做什么

  1. 盘点系统 PHP、集成环境(XAMPP、MAMP、Laragon)、主机面板、容器、NAS 和设备。
  2. 记录每一项的版本、安装来源和是否对外暴露。
  3. 把厂商管理的产品对应到受影响产品页面。
  4. 输出判定表:已修复 / 有漏洞 / 不确定 / 由厂商负责。

安全使用 Agent

一键复制提示词

提示词用英文写,各家 agent 都能稳定执行;最后一行会要求 agent 用中文汇报。事实均来自本站页面。

只读盘点一台机器上的所有 PHP 运行环境
Audit this machine for PHP2Shell exposure. This is a READ-ONLY audit.

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):
- Read-only: do not install, upgrade, delete, restart or change any file or service. Do not use sudo unless I approve a specific read-only command.
- Do not write, download or run exploit code, and do not probe other hosts.
- Do not print secrets you see; redact them.
- Show each command before you run it.

Find every PHP runtime, including bundled ones:
1. System PHP: php -v, php-fpm*, mod_php, every binary named php* on PATH and under /usr, /opt, /usr/local.
2. Bundled stacks: XAMPP (/opt/lampp, C:\xampp), MAMP (/Applications/MAMP), WampServer, Laragon, Local, Herd, Valet.
3. Hosting panels: cPanel ea-php, Plesk plesk-php, aaPanel/宝塔 /www/server/php, DirectAdmin, CyberPanel lsphp, HestiaCP.
4. Containers: docker ps / docker images / kubectl, and php -v inside each running container.
5. Apps that run on PHP (WordPress, Magento, Drupal, Joomla, Moodle, Nextcloud, phpMyAdmin, GLPI ...) and which PHP each one uses.
6. If this is a NAS or vendor appliance (Synology, QNAP, Unraid, pfSense, OPNsense, FreePBX ...), report the product and firmware version only; such PHP is updated by the vendor firmware.

For each item record: product/location, PHP version, how it is installed (distro package / vendor bundle / container / custom build), whether it is internet-facing, and whether the version is >= the fixed release on its branch or has a distro backport.

Output a verdict table with columns: Item | PHP version | Source | Exposed? | Verdict (Fixed / Vulnerable / Unknown / Vendor-managed) | Next step. Then list the matching product pages from https://phpvulnerabilities.app/affected-products/ for anything vendor-managed.

Write your report in Simplified Chinese.
检查某个具体产品或厂商设备
I run [PRODUCT NAME AND VERSION]. Tell me whether it is affected by PHP2Shell. This is research and a READ-ONLY check.

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: do not write or run exploit code; do not change anything; never ask for or print credentials.

Steps:
1. Find out whether this product bundles its own PHP or uses the system PHP, and which PHP version the version I named ships with.
2. Look for the vendor's official advisory, changelog or knowledge-base article about CVE-2026-109618 / CVE-2026-109619, and the matching page under https://phpvulnerabilities.app/affected-products/. Cite each source with its URL and date; if you find none, say so instead of guessing.
3. If I can give you shell access, list the read-only commands that would confirm the runtime version, and wait for me to run them or approve them.

Output a verdict table: Product | Version | Bundled PHP | Vendor status | Verdict (Fixed / Vulnerable / Unknown) | Fix path (vendor update, upgrade host PHP, or mitigate) | Sources.

Write your report in Simplified Chinese.
批量审计(多台服务器、IaC、CI 配置)
Audit this repository (and any inventory files it contains) for PHP2Shell exposure. READ-ONLY: do not edit files, open pull requests or connect to servers unless I approve.

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: no exploit code, no scanning of hosts, redact secrets.

1. Search Dockerfiles, compose files, Helm charts, Terraform/Ansible/Puppet/Chef code, CI workflows, .tool-versions, composer.json "config.platform.php" and "require.php" for PHP versions and base images.
2. List every place a PHP version or image is pinned, and resolve tags like php:8.3-fpm to the patch level they currently point to if you can.
3. Mark each as Fixed / Vulnerable / Unknown against 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 (or a distro backport), and flag PHP 8.1 or older.

Output a verdict table: File | Line | Image or package | PHP version | Verdict | Suggested change. Do not apply the changes; list them for my review.

Write your report in Simplified Chinese.

常见 AI 编程 Agent

列表不分先后,本站与这些产品均无关联。

OpenAI Codex CLI在项目目录或服务器上运行 codex,粘贴提示词;保持「执行前询问」的审批模式。
Claude Code在终端运行 claude 并粘贴提示词;默认会在执行命令前请求许可。
Cursor (Agent)打开项目或 Remote-SSH 会话,粘贴到 Agent 对话框,逐条审核终端命令。
Cursor Cloud Agents适合 Docker 和代码库类提示词:在分支上改动,你审核 diff;它连不到你的服务器。
Grok Build (xAI CLI)xAI 的终端编程 agent,在项目或服务器上启动后粘贴提示词。没有终端权限时,可贴到 grok.com 对话里,自己执行它给出的只读命令。
GitHub Copilot coding agent把含有 Docker/代码库提示词的 issue 指派给 Copilot,它会提交 PR 供你审核。
Gemini CLI在终端运行 gemini 并粘贴提示词,逐条确认它提出的命令。
Windsurf (Cascade)粘贴到编辑器里的 Cascade;windsurf.com 目前会跳转到 Devin Desktop。
ClineVS Code 插件,粘贴到 Cline 面板,逐条批准命令和文件改动。
Aider最适合 Docker/代码库提示词:在仓库里运行 aider,粘贴提示词并审核它的提交。

常见问题

怎么知道我的网站是否受 PHP2Shell 影响?

找出网站实际使用的 PHP 版本(不只是 php -v),与 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 或发行版的回移包对比。盘点提示词会让 agent 对每个运行环境都做一遍。

审计会改动我的系统吗?

不会。提示词要求 agent 只读,任何需要 sudo 的命令都要先问你。

我的 PHP 在 NAS、面板或设备里怎么办?

这类 PHP 由厂商更新。到受影响产品列表里找对应产品页,安装厂商的更新。