Skip to content

Bump urllib3, idna, pygments and virtualenv to fixed versions - #32

Merged
vpetersson merged 1 commit into
sbomify:masterfrom
vpetersson-bot:fix/bump-vulnerable-deps
Oct 21, 2026
Merged

vpetersson merged 1 commit into
sbomify:masterfrom
vpetersson-bot:fix/bump-vulnerable-deps

Conversation

@vpetersson-bot

Copy link
Copy Markdown
Contributor

What

Bumps four packages to the first release that fixes their published advisories:

Package From To Advisories Where
urllib3 2.6.3 2.8.0 GHSA-gh4c-6fx4-qh6g, GHSA-vxq7-64xx-v4gw, GHSA-mf9v-mfxr-j63j, GHSA-8988-9cw3-xx77, GHSA-qccp-gfcp-xxvc runtime: pyproject.toml + uv.lock
idna 3.11 3.15 GHSA-65pc-fj4g-8rjx runtime: pyproject.toml + uv.lock
pygments 2.19.2 2.20.0 GHSA-5239-wwwm-4pmq uv.lock only
virtualenv 20.39.0 21.7.13 GHSA-p58f-9548-mpm2, GHSA-94p9-xgh2-xp45, GHSA-x78j-v8h9-3j2q, GHSA-9h9j-4vrj-gf7g uv.lock only (dev group, via pre-commit)

virtualenv 21 adds python-discovery 1.6.4 to the lockfile. No other packages change, and the lockfile revision stays the same.

Why the two new runtime floors

  • urllib3 >= 2.8.0: _http.py imports urllib3.util.retry.Retry directly, so urllib3 was already a direct dependency that only came in through requests. download_with_hashes() streams artifact bodies with iter_content(), which uses urllib3's stream()/read_chunked(). A malicious or compromised artifact server can use that path to trigger the chunked-Deflate infinite loop (GHSA-gh4c-6fx4-qh6g) and the unbounded chunk-size buffering (GHSA-vxq7-64xx-v4gw).
  • idna >= 3.15: requests calls idna.encode() on non-ASCII hostnames. Endpoint URLs from a domain's .well-known/tea document (TeaEndpoint.url, a plain str) go to probe_endpoint() without hostname validation. With idna 3.11, preparing a request to a host made of 50,000 copies of ٠ took about 146 s of CPU. With 3.15 it took about 0.01 s.

Without these floors, installing libtea from PyPI could leave users on a vulnerable urllib3 or idna, depending on what else is in their environment.

pygments and virtualenv are not in the wheel's Requires-Dist (virtualenv is dev-only; pygments only comes in through rich/pytest), so they only need lockfile bumps. This also keeps the lockfile-based SBOM clean.

How I checked

  • uv sync --extra cli, ruff check ., ruff format --check . all pass.
  • uv run pytest --cov-fail-under=90: 877 passed on Python 3.11, 3.12 and 3.13 (coverage 94.61%).
  • uv build: the wheel metadata now lists Requires-Dist: idna<4,>=3.15 and urllib3<3,>=2.8.0.
  • pre-commit run --all-files: the ruff hooks pass, and their environment builds with virtualenv 21.7.13. The mypy hook reports _cli_fmt.py:635: Unused "type: ignore". It fails the same way on current master, so this change didn't cause it.
  • osv.dev reports no known vulnerabilities for urllib3 2.8.0, idna 3.15, pygments 2.20.0, virtualenv 21.7.13 or python-discovery 1.6.4.

🤖 Generated with Claude Code

urllib3 2.6.3 -> 2.8.0 (GHSA-gh4c-6fx4-qh6g, GHSA-vxq7-64xx-v4gw,
GHSA-mf9v-mfxr-j63j, GHSA-8988-9cw3-xx77, GHSA-qccp-gfcp-xxvc).
libtea imports urllib3 directly (urllib3.util.retry.Retry in _http.py)
and streams responses through it, so declare it as a runtime dependency
with a >=2.8.0 floor.

idna 3.11 -> 3.15 (GHSA-65pc-fj4g-8rjx). requests passes non-ASCII
hosts to idna.encode(), and endpoint URLs from a server's
.well-known/tea document reach requests unvalidated, so add a >=3.15
floor so installs pick up the fix.

pygments 2.19.2 -> 2.20.0 (GHSA-5239-wwwm-4pmq) and virtualenv
20.39.0 -> 21.7.13 (GHSA-p58f-9548-mpm2, GHSA-94p9-xgh2-xp45,
GHSA-x78j-v8h9-3j2q, GHSA-9h9j-4vrj-gf7g) are lockfile-only bumps;
virtualenv is a dev-only dependency (via pre-commit) and pygments is
only pulled in by rich/pytest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 14:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use AI Credits, select a billing entity via the GitHub site, under Settings > Copilot > Features.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@vpetersson
vpetersson merged commit 2547178 into sbomify:master Oct 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants