相关事件 · CA 私钥泄露 · 2026 年 10 月 17–21 日
eMudhra 中间 CA 私钥泄露:PHP 服务器需要检查什么
浏览器在几个小时内就得到了保护,PHP 则不同:curl 和 OpenSSL 扩展信任服务器提供的 CA 证书包,一般不会接收浏览器的吊销推送,所以过期的证书包才是问题所在。
最近更新
事件经过
- 2026 年 10 月 17 日,一名研究人员报告 eMudhra 的 8 个中间 CA 证书(6 个 TLS,2 个代码签名)的 P-384 私钥是小于 256 的整数:4、56、66、115、155、156、230 和 237。Mozilla 确认每个私钥除最后一个字节外全是 0(Bugzilla 2083449)。
- eMudhra 称这些密钥来自 2025 年 4 月 30 日在 FIPS 140-2 Level 3 硬件安全模块上进行的密钥生成仪式,其中一个 wrap/unwrap 步骤额外生成了一组弱密钥,随后被误用并发布。
- 6 个 TLS 中间证书链到 emSign ECC Root CA - G3。Sectigo 的 AAA Certificate Services 根也对同样的密钥做过交叉签名,Sectigo 已于 10 月 19 日吊销。
| 时间 | 事件 |
|---|---|
| 2026-10-17 18:05 | 报告送达 Chrome 根证书计划 |
| 10-17 19:45 | Chrome 通过 CRLSet 按公钥封锁 6 个 TLS 中间证书 |
| 10-17 22:59 | Firefox 通过 OneCRL 封锁全部 8 个 |
| 10-18 | eMudhra 吊销这 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),又没有其他机制封锁中间证书,你的服务器就仍然信任这条被攻破的链。
# 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'# 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));'# 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() 的输出。
怎么修复
# 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; 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。
哪些软件已经修复
| 软件 | 修复版本 |
|---|---|
| Mozilla NSS | 3.131.1 (Bug 2084101) |
| curl CA bundle (cacert.pem) | 2026-10-20 |
| composer/ca-bundle | 1.4.16, 1.6.0 (2026-10-20) |
| Debian ca-certificates | 20250419~deb12u2, 20250419+deb13u1, 20260816+nmu1 |
| Ubuntu ca-certificates | 20260816ubuntu0.22.04.1, 0.24.04.1, 0.26.04.1, 0.26.10.1 |
| Fedora ca-certificates | 2026.2.92_v9.0.319 |
| Alpine ca-certificates | 20261020-r0 |
| Arch ca-certificates-mozilla | 3.131.1-1 |
| FreeBSD ca_root_nss | 1.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。
要不要手动删除根证书?
只能作为最后手段。报告者的测试站点为高级用户写了手动移除方法,但这会让链到这些根的所有正常证书都失效。正常做法是更新厂商的软件包。
本站有可以利用的代码吗?
没有。本页不含任何私钥还原或漏洞利用代码。上面的测试站点由报告者运营,只用于检查客户端是否仍信任这条证书链。
来源
出站链接将离开本站。本站不托管利用代码。
- Protecting Firefox users following the compromise of eMudhra intermediate certificates (20 October 2026) — Mozilla Security Blog
- Protecting Chrome and Android users from compromised eMudhra intermediate CA certificates — Google (Chrome and Android Security)
- eMudhra statement on recent certificate security incident (updated 21 October 2026) — eMudhra
- eMudhra Intermediate CA Compromise: client check and patched-software list — we-have-a-problem.com (reporter’s test site)
- Bug 2083449 — eMudhra: Private key compromise of Intermediate Certificates — Mozilla Bugzilla
- Bug 2084101 — Remove eMudhra emSign Root CA - G3 from NSS — Mozilla Bugzilla
- Compromised eMudhra Intermediate Certificates (guidance for trust store operators) — Mozilla dev-security-policy
- Indian certification authority eMudhra’s private keys compromised – one of them was the number 4 (20 October 2026) — The Register
- eMudhra’s weak P-384 CA keys: testing curl, Node.js and uv (21 October 2026) — lilting channel
- CA certificates extracted from Mozilla (cacert.pem) — curl project
- composer/ca-bundle 1.6.0 and 1.4.16: distrust compromised eMudhra intermediates — Composer (GitHub)
- OpenSSL runtime configuration (openssl.cafile, openssl.capath) — PHP manual
- cURL runtime configuration (curl.cainfo) — PHP manual