Skip to content

fix: require urllib3 2.8.0 for security fixes - #456

Merged
vinitkumar merged 1 commit into
masterfrom
fix/urllib3-2.8.0-security
Oct 15, 2026
Merged

vinitkumar merged 1 commit into
masterfrom
fix/urllib3-2.8.0-security

Conversation

@vinitkumar

@vinitkumar vinitkumar commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Why

The runtime requirement and root lockfile allowed urllib3 2.7.0, which is affected by all three advisories in the October 14 Dependabot digest. Verified against the upstream advisories on October 15, 2026:

Advisory Severity Affected versions Fix
CVE-2026-97687 / GHSA-8988-9cw3-xx77: HTTPS proxy TLS settings High >=1.26.0, <2.8.0 2.8.0
CVE-2026-97688 / GHSA-gh4c-6fx4-qh6g: Deflate streaming loop Moderate >=2.6.2, <2.8.0 2.8.0
CVE-2026-97689 / GHSA-vxq7-64xx-v4gw: unbounded chunk-size buffering High >=1.10.3, <2.8.0 2.8.0

PyPI lists 2.8.0 as the latest stable release, published September 15, 2026. The upstream changelog documents the three fixes.

Changes

  • Raise the direct runtime floor to urllib3>=2.8.0 so new installs cannot select the affected versions.
  • Regenerate uv.lock with uv lock --upgrade-package urllib3==2.8.0, including verified distribution hashes. urllib3 is the only package version changed; uv 0.12.23 also updates the lock format revision from 3 to 5.
  • Align the two standalone benchmark commands with the new floor and record the security rationale in lat.md/architecture.md. The documentation requirements already pin urllib3 2.8.0.

Compatibility

urllib3 2.8.0 requires Python >=3.10, so json2xml's Python >=3.11 requirement stays valid. Reviewed the URL reader: it uses PoolManager, bounded read(..., decode_content=False), and its own limited decompression; it does not configure an HTTPS proxy or call the affected streaming methods. No application code changes are needed for the upgrade. Upstream's HTTPS proxy TLS behavior correction remains relevant to downstream users who configure their own proxy clients.

Validation

  • make check-all on CPython 3.12.14: Ruff and ty pass; 509 passed, 149 skipped, 100% statement coverage.
  • Locked make test runs on CPython 3.11.17, 3.13.16, 3.14.8, 3.14.8 free-threaded, and PyPy Python 3.11.16: 509 passed, 149 skipped on each.
  • uv lock --check: pass.
  • uv audit --locked: no known vulnerabilities or adverse project statuses in 17 packages.
  • uv pip check --python .venv/bin/python: all installed packages compatible.
  • uv build: wheel and sdist build successfully; inspected both distributions to confirm Requires-Python: >=3.11 and Requires-Dist: urllib3>=2.8.0.
  • lat check (via npx) and git diff --check: pass.

The 149 skipped tests require the optional Rust extension. make test-rust was attempted but Cargo is not installed locally. Stable CPython 3.15.0 is not available in the local uv download catalog, and local testing was Linux-only; the existing PR CI matrix covers the broader runtime/platform set.

No version bump, tag, package upload, or release is included.

Summary by Sourcery

Require urllib3 2.8.0 across runtime and locked dependency paths to prevent installation of vulnerable releases.

Bug Fixes:

  • Raise the urllib3 runtime requirement to 2.8.0 to exclude versions affected by three security vulnerabilities.

Enhancements:

  • Align benchmark dependency requirements and architecture documentation with the secure urllib3 version floor.

Build:

  • Regenerate the lockfile with urllib3 2.8.0 and updated distribution hashes.

@sourcery-ai

sourcery-ai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR prevents installation of vulnerable urllib3 releases by consistently requiring 2.8.0 in project metadata, the lockfile, benchmark commands, and dependency architecture documentation. No application code changes are needed because the existing Python compatibility range and URL-reader behavior remain compatible; validation covers linting, typing, tests across supported interpreters, lock and package integrity, auditing, builds, and documentation checks.

Flow diagram for excluding vulnerable urllib3 releases

flowchart LR
    Request[Dependency resolution] --> Constraint[urllib3 >= 2.8.0]
    Constraint --> Safe[urllib3 2.8.0 or newer]
    Constraint -. excludes .-> Vulnerable[urllib3 < 2.8.0]
    Safe --> Validation[uv audit and package checks]
Loading

File-Level Changes

Change Details Files
Raise the urllib3 minimum version to 2.8.0 across runtime metadata, lock resolution, benchmarks, and architecture documentation to exclude three documented security vulnerabilities.
  • Update the direct dependency floor from 2.7.0 to 2.8.0.
  • Regenerate the lockfile with urllib3 2.8.0 and its distribution hashes; account for the uv lock-format revision update.
  • Align standalone benchmark requirements with the runtime floor.
  • Document the affected advisories, compatibility rationale, and consistency requirements.
pyproject.toml
uv.lock
BENCHMARKS.md
docs/benchmarks.rst
lat.md/architecture.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T08:29:54.064844Z 4556581 PR opened
🔒 Security Review ✅ Completed 2026-10-15T08:31:28.342998Z 4556581 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e401fd6) to head (4556581).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #456   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines         1032      1032           
=========================================
  Hits          1032      1032           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Fixed security issues:


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@vinitkumar
vinitkumar merged commit a7adcaa into master Oct 15, 2026
39 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.

1 participant