非 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。防火墙不能替代升级。

修复步骤

相关事件 · CA 私钥泄露 · 2026 年 10 月 17–21 日

eMudhra 中间 CA 私钥泄露:PHP 服务器需要检查什么

浏览器在几个小时内就得到了保护,PHP 则不同:curl 和 OpenSSL 扩展信任服务器提供的 CA 证书包,一般不会接收浏览器的吊销推送,所以过期的证书包才是问题所在。

最近更新

事件经过

处置时间线(UTC)
时间事件
2026-10-17 18:05报告送达 Chrome 根证书计划
10-17 19:45Chrome 通过 CRLSet 按公钥封锁 6 个 TLS 中间证书
10-17 22:59Firefox 通过 OneCRL 封锁全部 8 个
10-18eMudhra 吊销这 8 个证书
10-19苹果封锁;Sectigo 吊销交叉签名
10-20微软封锁;NSS 3.131.1 移除 emSign ECC Root CA - G3;curl 发布 2026-10-20 版 cacert.pem;composer/ca-bundle 发布 1.4.16 和 1.6.0
10-27(计划)Chrome 根证书库对所有设备移除 emSign ECC Root CA - G3

我的 PHP 服务器受影响吗?

PHP 自己不带 CA 列表。openssl 和 curl 扩展在设置了 openssl.cafile / curl.cainfo 时读取它们,否则使用 OpenSSL 编译进去的默认路径,一般就是发行版的 ca-certificates 证书包。两者都不会接收 Chrome 的 CRLSet 或 Firefox 的 OneCRL。如果这个证书包里还有 emSign ECC Root CA - G3(交叉签名则对应 AAA Certificate Services),又没有其他机制封锁中间证书,你的服务器就仍然信任这条被攻破的链。

第 1 步:找到 PHP 读取的证书包
# Which CA file does PHP use? Run as the same user/SAPI as the site if you can.
php -r 'print_r(openssl_get_cert_locations());'
php -i | grep -E 'openssl.cafile|openssl.capath|curl.cainfo'
第 2 步:用报告者的测试站点检测
# Does PHP still trust the compromised eMudhra intermediates?
# Good result: bool(false) plus a "certificate verify failed" warning.
# Bad result: the page body is printed (the chain was trusted).
php -r 'var_dump(file_get_contents("https://dv-g3b-emudhra.we-have-a-problem.com/"));'
php -r 'var_dump(file_get_contents("https://dv-g3b-aaa-emudhra.we-have-a-problem.com/"));'

# Same check through the curl extension
php -r '$c = curl_init("https://dv-g3b-emudhra.we-have-a-problem.com/");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
var_dump(curl_exec($c), curl_error($c));'
第 3 步:检查证书包里是否还有该根证书
# Is the eMudhra root still in the bundle?
ls /etc/ssl/certs | grep -i emsign            # Debian/Ubuntu symlinks
grep -n "emSign ECC Root CA - G3" /path/to/cacert.pem   # curl/Mozilla-format bundle
# composer/ca-bundle version inside a project
composer show composer/ca-bundle | grep versions

每个用到的 SAPI 都要检查。PHP-FPM 和 Apache mod_php 加载的 php.ini 可能和命令行不同,可以对比 php --ini 和网站上 phpinfo() 的输出。

怎么修复

更新系统证书包和 Composer 的 ca-bundle
# Debian / Ubuntu (and Debian-based php:* Docker images)
sudo apt-get update && sudo apt-get install --only-upgrade ca-certificates
dpkg -l ca-certificates

# RHEL / Fedora / AlmaLinux / Rocky
sudo dnf upgrade ca-certificates

# Alpine (php:*-alpine images)
apk upgrade --no-cache ca-certificates

# Composer projects that ship composer/ca-bundle
composer update composer/ca-bundle    # 1.4.16+ or 1.6.0+

# Restart long-running PHP processes afterwards
sudo systemctl restart php8.3-fpm     # or apache2 / httpd / your queue workers
自带证书包的集成环境(XAMPP、WAMP、老旧面板)
; php.ini — for stacks with their own stale bundle (XAMPP, WAMP, old panels)
; Download a current Mozilla-derived bundle from https://curl.se/ca/cacert.pem
; (the 2026-10-20 release or later), then point both settings at it:
curl.cainfo   = "/path/to/cacert.pem"
openssl.cafile = "/path/to/cacert.pem"
; Restart Apache / PHP-FPM so the new values load.

老旧的一键集成环境和多年没更新的面板,经常把 curl.cainfo 固定指向产品自带、从不更新的文件。请查看厂商的更新说明,或者按上面的方法让 php.ini 指向最新的 cacert.pem。

哪些软件已经修复

报告者测试站点列出的已修复版本(截至 2026 年 10 月 21–22 日)
软件修复版本
Mozilla NSS3.131.1 (Bug 2084101)
curl CA bundle (cacert.pem)2026-10-20
composer/ca-bundle1.4.16, 1.6.0 (2026-10-20)
Debian ca-certificates20250419~deb12u2, 20250419+deb13u1, 20260816+nmu1
Ubuntu ca-certificates20260816ubuntu0.22.04.1, 0.24.04.1, 0.26.04.1, 0.26.10.1
Fedora ca-certificates2026.2.92_v9.0.319
Alpine ca-certificates20261020-r0
Arch ca-certificates-mozilla3.131.1-1
FreeBSD ca_root_nss1.131.1

NSS 3.131.1 移除了 emSign ECC Root CA - G3。我们下载了 curl 线上的 cacert.pem(Last-Modified 为 2026 年 10 月 20 日),里面已经没有 emSign ECC Root CA - G3 和 AAA Certificate Services。composer/ca-bundle 1.4.16 和 1.6.0 还新增了 CaBundle::findDistrustedCertificate,可以识别证书链里的问题中间证书。

没在列表里的版本,包括 Ubuntu 20.04、Debian 11 等老发行版,在我们查阅的来源里没有显示已修复。请以厂商的安全追踪页面为准,不要想当然。

常见问题

集成环境与主机面板

XAMPP 和各类主机面板自带 PHP 构建,它们的 CA 证书包未必会跟随操作系统的 ca-certificates 更新。请查看 XAMPP、cPanel、Plesk、DirectAdmin、CloudLinux、aaPanel 和 宝塔面板 的产品页,或完整的产品列表。

我网站的证书受影响吗?

可能性很小。eMudhra 表示这 8 个中间证书没有签发过任何终端证书,Chrome 也表示封锁前证书透明度日志里没有链到它们的 TLS 证书。不过证书链到 eMudhra emSign ECC Root CA - G3 根证书的网站需要换证书,因为这个根正在被各信任库移除。

真的有几千万张证书不安全了吗?

没有。流传的大数字是 eMudhra 历史上签发证书的总量,不是被泄露私钥签发的证书数量。eMudhra 称根证书被取消信任只影响美国的一个客户体系。

浏览器已经安全了,PHP 服务器为什么还要管?

浏览器强制检查证书透明度,并接收 CRLSet 或 OneCRL 推送。PHP 的 curl 和 OpenSSL 调用通常两者都没有,只有当它读取的证书包不再信任 eMudhra 这条链时才算安全。这涉及支付接口、Webhook、SMTP over TLS、Composer 下载等对外请求。

PHP 实际用的是哪个证书包?

如果 php.ini 设置了 curl.cainfo 和 openssl.cafile,就用它们;否则用 OpenSSL 编译时的默认路径,通常是发行版 ca-certificates 的文件。Composer 和很多库使用 composer/ca-bundle,它优先用系统证书包,找不到时才用自带的 cacert.pem。

要不要手动删除根证书?

只能作为最后手段。报告者的测试站点为高级用户写了手动移除方法,但这会让链到这些根的所有正常证书都失效。正常做法是更新厂商的软件包。

本站有可以利用的代码吗?

没有。本页不含任何私钥还原或漏洞利用代码。上面的测试站点由报告者运营,只用于检查客户端是否仍信任这条证书链。

来源

出站链接将离开本站。本站不托管利用代码。

  1. Protecting Firefox users following the compromise of eMudhra intermediate certificates (20 October 2026) — Mozilla Security Blog
  2. Protecting Chrome and Android users from compromised eMudhra intermediate CA certificates — Google (Chrome and Android Security)
  3. eMudhra statement on recent certificate security incident (updated 21 October 2026) — eMudhra
  4. eMudhra Intermediate CA Compromise: client check and patched-software list — we-have-a-problem.com (reporter’s test site)
  5. Bug 2083449 — eMudhra: Private key compromise of Intermediate Certificates — Mozilla Bugzilla
  6. Bug 2084101 — Remove eMudhra emSign Root CA - G3 from NSS — Mozilla Bugzilla
  7. Compromised eMudhra Intermediate Certificates (guidance for trust store operators) — Mozilla dev-security-policy
  8. Indian certification authority eMudhra’s private keys compromised – one of them was the number 4 (20 October 2026) — The Register
  9. eMudhra’s weak P-384 CA keys: testing curl, Node.js and uv (21 October 2026) — lilting channel
  10. CA certificates extracted from Mozilla (cacert.pem) — curl project
  11. composer/ca-bundle 1.6.0 and 1.4.16: distrust compromised eMudhra intermediates — Composer (GitHub)
  12. OpenSSL runtime configuration (openssl.cafile, openssl.capath) — PHP manual
  13. cURL runtime configuration (curl.cainfo) — PHP manual