Vault 资讯瀑布官方2026.09.23 07:00 UTC+8

astral-sh/uv 发布 0.12.18

uv 0.12.18 修复 Windows 安装 wheel 时的路径穿越漏洞,并为 pip install/sync 新增 JSON 输出与 --check。

发布说明

发布于 2026-09-22。

本次发布修复了 GHSA-2cv4-cqwr-gwf7,这是 Windows 上安装 wheel 时存在的路径穿越弱点。其他平台不受该公告影响。

增强

  • 为 uv pip install 和 uv pip sync 添加 --output-format json,包括用于 --dry-run 和 --check 时(#21893)
  • 为 uv pip install 和 uv pip sync 添加 --check,在不修改环境的情况下报告计划中的变更(#21844)
  • 在构建错误中正确识别来自 get_requires_for_build_* 钩子的失败(#21881)

预览功能

  • 通过 --preview-features build-dependency-check 为 uv build --no-build-isolation 校验构建依赖;使用 --skip-dependency-check 可退出该检查(#21880)

性能

  • 通过省略临时 wheel 的压缩,加快 uv_build 可编辑 wheel 的创建(#21918)

缺陷修复

  • 为每个 Python 解析分支选择具有兼容 wheel 的包版本,正确解释通用与稳定 ABI 的 wheel 标签(#21835、#21836)
  • 当 uv add、uv remove 或 uv version 失败或被中断时,恢复项目、脚本和锁文件(#21860、#21856)
  • 在检查已安装依赖是否满足时,使用配置的 dependency-metadata(#21843)
  • 拒绝规范化后为绝对 Windows 路径的归档条目(#21923)
  • 当 URL 片段包含 ? 时,正确识别发行版文件名和归档扩展名(#21920)
  • 为 BSD 和 Haiku 发行版生成正确小写的平台标签(#21853)
  • 避免将 Windows 相对路径重建为绝对形式(#21923)

安装 uv 0.12.18

通过 shell 脚本安装预构建二进制文件

curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/uv/releases/download/0.12.18/uv-installer.sh | sh

通过 powershell 脚本安装预构建二进制文件

powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/uv/releases/download/0.12.18/uv-installer.ps1 | iex"

下载 uv 0.12.18

astral-sh/uv released 0.12.18

Release Notes

Released on 2026-09-22.

This release addresses GHSA-2cv4-cqwr-gwf7, which is a path traversal weakness during wheel installation on Windows. No other platforms are affected by this advisory.

Enhancements

  • Add --output-format json to uv pip install and uv pip sync, including for --dry-run and --check (#21893)
  • Add --check to uv pip install and uv pip sync to report planned changes without modifying the environment (#21844)
  • Identify failures from get_requires_for_build_* hooks correctly in build errors (#21881)

Preview features

  • Validate build requirements for uv build --no-build-isolation with --preview-features build-dependency-check; use --skip-dependency-check to opt out (#21880)

Performance

  • Speed up uv_build editable wheel creation by omitting compression from temporary wheels (#21918)

Bug fixes

  • Select package versions with wheels compatible with each Python resolution fork, correctly interpreting generic and stable-ABI wheel tags (#21835, #21836)
  • Restore project, script, and lock files when uv add, uv remove, or uv version fails or is interrupted (#21860, #21856)
  • Use configured dependency-metadata when checking whether installed requirements are satisfied (#21843)
  • Reject archive entries that normalize to absolute Windows paths (#21923)
  • Recognize distribution filenames and archive extensions when URL fragments contain ? (#21920)
  • Generate correctly lowercased platform tags for BSD and Haiku releases (#21853)
  • Avoid rebuilding a Windows relative path into an absolute form (#21923)

Install uv 0.12.18

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/uv/releases/download/0.12.18/uv-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/uv/releases/download/0.12.18/uv-installer.ps1 | iex"

Download uv 0.12.18

FilePlatformChecksum
uv-aarch64-apple-darwin.tar.gzApple Silicon macOSchecksum
uv-x86_64-apple-darwin.tar.gzIntel macOSchecksum
uv-aarch64-pc-windows-msvc.zipARM64 Windowschecksum
uv-i686-pc-windows-msvc.zipx86 Windowschecksum
uv-x86_64-pc-windows-msvc.zipx64 Windowschecksum
uv-aarch64-unknown-linux-gnu.tar.gzARM64 Linuxchecksum
uv-i686-unknown-linux-gnu.tar.gzx86 Linuxchecksum
uv-powerpc64le-unknown-linux-gnu.tar.gzPPC64LE Linuxchecksum
uv-riscv64gc-unknown-linux-gnu.tar.gzRISCV Linuxchecksum
uv-s390x-unknown-linux-gnu.tar.gzS390x Linuxchecksum
uv-x86_64-unknown-linux-gnu.tar.gzx64 Linuxchecksum
uv-armv7-unknown-linux-gnueabihf.tar.gzARMv7 Linuxchecksum
uv-aarch64-unknown-linux-musl.tar.gzARM64 MUSL Linuxchecksum
uv-i686-unknown-linux-musl.tar.gzx86 MUSL Linuxchecksum
uv-riscv64gc-unknown-linux-musl.tar.gzRISCV MUSL Linuxchecksum
uv-x86_64-unknown-linux-musl.tar.gzx64 MUSL Linuxchecksum
uv-arm-unknown-linux-musleabihf.tar.gzARMv6 MUSL Linux (Hardfloat)checksum
uv-armv7-unknown-linux-musleabihf.tar.gzARMv7 MUSL Linuxchecksum

Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:

gh attestation verify <file-path of downloaded artifact> --repo astral-sh/uv

You can also download the attestation from GitHub and verify against that directly:

gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>
查看原始发布