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

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

  •  1
     
  •   Laurus · 3h 36m ago · 180 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
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1122 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 23:49 · PVG 07:49 · LAX 15:49 · JFK 18:49
    ♥ Do have faith in what you're doing.