• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Laurus
V2EX  ›  程序员

提醒:macOS 更新不会升级 Python 的 certifi

  •  1
     
  •   Laurus · 17h 9m ago · 1035 views
    eMudhra 中间 CA 私钥泄露后,Apple 在系统更新里移除了相关根证书,brew 也更新了 ca-certificates。但 Python 的 certifi 是另一份独立的 CA 清单,装在用户 site-packages 里,只有 pip 升级才动它,系统更新和 brew 都够不着。

    目前受影响的根证书是 AAA Certificate Services 和 emSign ECC Root CA - G3。certifi 版本低于 2026.10.19 的仍信任它们,拿这份 bundle 做 TLS 校验的 Python 程序可能接受伪造证书;浏览器和走系统证书框架的 App 不受影响。

    自查:

    python -c "import certifi; print(certifi.__version__, certifi.where())"

    修复:

    python -m pip install --user --upgrade certifi

    几点注意:

    - 升 brew 的 ca-certificates 不解决这个报错,那是另一份清单。
    - 有几个 Python 环境就查几次,uv / pyenv / venv / conda 的 certifi 各自独立。
    - pip 不会顺带升级已满足依赖条件的传递依赖,升 requests 不会带上 certifi,要显式点名。

    参考:

    https://support.apple.com/en-us/149555

    https://paretosecurity.com/mac/checks/compromised-ca
    3 replies  •  2026-11-23 20:19:27 +08:00
    V2Try
    V2Try
    12h 2m ago via iPhone
    1
    那哈基米的 neon 很聪明了,我让它升级 yt-dlp,它也顺手把 certifi 升级了。
    alvin7an
    alvin7an
    4h 43m ago
    2
    感谢提醒,这种坑不说还真想不到,回头查一下自己的 certifi 版本。
    ffalex
    ffalex
    1h 2m ago
    3
    交给哈基米了,不过它查出有好几个应用都还是用的旧证书,比如度盘
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2338 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 13:22 · PVG 21:22 · LAX 05:22 · JFK 08:22
    ♥ Do have faith in what you're doing.