pip 26.3 安全策略变了:装 wheel 不再默认安全,实测哈希校验漏洞已修
pip 26.3 在 2026 年 11 月 2 日发布。这次没有新功能,是一次安全收紧,三个变化要放在一起读:安全政策改写、安装期的 import 拦截从警告变成报错、修了一个哈希校验漏洞。背景是 10 月份的 eMudhra 弱 CA 密钥事件,整个 Python 打包生态都在补证书和收紧信任链。下面是实测过程和结果,环境是 Python 3.15.2,两个虚拟环境分别装 pip 26.2.2 和 pip 26.3 做对照。 变化一:安全政策改写,“装 wheel 不跑代码”被删了 pip 26.2 的 SECURITY.md 里写过一句话:“Installing a wheel does not run code from it”(装 wheel 不会运行其中的代码)。这句话寿命很短:2026 年 7 月 11 日才随 PR #14164 进入主分支,7 月 29 日随 26.2 首次发布。26.3 把它删了,我拉了 26.3 标签上的 SECURITY.md 原文,现在写的是: Because Python’s import system is dynamic, pip cannot guarantee that installing a wheel will not execute third-party code. ...