Bump pip to 26.2.1 to clear PYSEC-2026-3721 - #107
Merged
Conversation
The scheduled weekly pip-audit failed on 2026-08-24 with its first real finding. No code changed since the 08-17 green run; the advisory is new. PYSEC-2026-3721 / CVE-2026-13346: pip mishandled doubly-encoded package URLs from an index, allowing files to be written to arbitrary paths on disk even when installing wheels. Fixed upstream in 26.2; pinned to 26.2.1, the current release. Exploiting it requires a malicious index, not merely a malicious package, and pip is in the lock only as a transitive dependency of pip-api and pip-tools under --allow-unsafe -- but README.md publishes the lock as an install path, so the pin is the fix. Bumped in place rather than by rerunning pip-compile. Regenerating with --upgrade-package pip on this machine (Windows, Python 3.14) reproduced the intended pin but also rewrote the Linux/3.12 resolution the file records: it retitled the header, churned two "# via" comments, and added an unmarked colorama==0.4.6, which is required only on win32. Committing that would bake a platform-specific resolution into the lock -- the same mistake as 4fbab87's Windows-only golden hashes, which a71d477 reverted. Both hashes verified against the PyPI JSON API for pip 26.2.1 (sdist and wheel, not yanked, requires-python >=3.10). Verified the fix by querying OSV for all 56 pins in the lock: clean after, and the same query against the pre-change lock reports PYSEC-2026-3721 on pip 26.1.2. pytest: 237 passed. Note that `pip-audit -r requirements.lock.txt` cannot run on Windows against this lock, before or after this change -- pip resolves colorama for win32 and --require-hashes then rejects it as unpinned. CI runs the audit on ubuntu-latest, where it does not apply. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
dependency auditfailure in the 2026-08-24 scheduled run(32700028621).
What broke
Not a regression. Nothing changed since the 08-17 green run — a new advisory
landed against an existing pin:
PYSEC-2026-3721 / CVE-2026-13346,
pip 26.1.2, fixed upstream in 26.2. pipmishandled doubly-encoded package URLs from an index, allowing files to be
written to arbitrary paths on disk even when installing wheels.
Exposure is limited: exploiting it requires a malicious index, not merely a
malicious package, and
pipis in the lock only as a transitive dependency ofpip-apiandpip-toolsunder--allow-unsafe. ButREADME.mdpublishespip install --require-hashes -r requirements.lock.txtas an install path, sothe pin is the fix.
The audit job is schedule/manual only, so this was never blocking PRs.
The change
pip26.1.2 → 26.2.1 inrequirements.lock.txt. Three lines, plus a CHANGELOGentry.
Bumped in place rather than by rerunning
pip-compile, deliberately.Regenerating with
--upgrade-package pipon a Windows / Python 3.14 machineproduced the intended pin but also rewrote the Linux/3.12 resolution the file
records: retitled the header, churned two
# viacomments, and added anunmarked
colorama==0.4.6, which is required only on win32. Committing thatwould bake a platform-specific resolution into the lock — the same mistake as
4fbab87's Windows-only golden hashes, whicha71d477reverted.Verification
not yanked,
requires-python >=3.10matches the project floor. They matchwhat
pip-compileindependently emitted.pre-change lock reports
PYSEC-2026-3721onpip 26.1.2, confirming thecheck works and that this change is what clears it.
pytest -q: 237 passed.Known, pre-existing
pip-audit -r requirements.lock.txtcannot run on Windows against this lock,before or after this change: pip resolves
coloramafor win32 and--require-hashesthen rejects it as unpinned. Confirmed identical on theunmodified lock. CI runs the audit on
ubuntu-latestwhere it does not apply,so nothing is blocked — but the audit is not locally reproducible on Windows.
Worth fixing separately.
🤖 Generated with Claude Code