Skip to content

[Medium} Patch python-virtualenv for CVE-2026-13346 - #18293

Open
Ratiranjan5 wants to merge 1 commit into
microsoft:3.0-devfrom
Kanishk-Bansal:topic_python-virtualenv-3.0-CVE-2026-13346
Open

[Medium} Patch python-virtualenv for CVE-2026-13346#18293
Ratiranjan5 wants to merge 1 commit into
microsoft:3.0-devfrom
Kanishk-Bansal:topic_python-virtualenv-3.0-CVE-2026-13346

Conversation

@Ratiranjan5

@Ratiranjan5 Ratiranjan5 commented Aug 3, 2026

Copy link
Copy Markdown
Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary
Patch python-virtualenv for CVE-2026-13346

  • The python-virtualenv package version 20.36.1 falls within the affected range for CVE-2026-13346, which impacts all pip versions prior to 26.2.

  • CVE affects the pip package in python-virtualenv as pip version 25.0.1 and 25.3 are in affected range of < 26.2.

  • Patch has been backported manually.

  • Patch matches with the upstream patch except that the files tests/unit/test_link.py and news/14110.bugfix.rst are not included as they don't exist in our source code.

  • Note on the download.py change in CVE-2026-13346v0.patch:

    • In the upstream patch, the filename is computed inline inside os.path.join, so the fix removes that single line and adds a multi-line join_within_directory(...) call. In our bundled pip (25.0.1), the same logic is written across two lines, the filename is first stored in a filename variable, then joined on the next line. The result is functionally identical to upstream patch.
  • Upstream Patch Reference: https://github.com/pypa/pip/commit/10dfb6b9005484578b386f64b9f36982e3dc6679.patch

Change Log

  • new file: SPECS/python-virtualenv/CVE-2026-13346v0.patch
  • new file: SPECS/python-virtualenv/CVE-2026-13346v1.patch
  • modified: SPECS/python-virtualenv/python-virtualenv.spec

Does this affect the toolchain?
NO

Links to CVEs
https://nvd.nist.gov/vuln/detail/CVE-2026-13346

Test Methodology

  • Local build was successful.
image
  • Patch applies cleanly
image image
  • Installation and Uninstallation on docker image was successful.
image image image
  • License check script shows no warning.

@Ratiranjan5
Ratiranjan5 requested a review from a team as a code owner August 3, 2026 12:14
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@Ratiranjan5
Ratiranjan5 marked this pull request as draft August 3, 2026 12:15
@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Aug 3, 2026
@Ratiranjan5

Copy link
Copy Markdown
Author

Buddy Build:

@Ratiranjan5

Copy link
Copy Markdown
Author

Buddy Build:

Buddy build has passed.

@Ratiranjan5
Ratiranjan5 force-pushed the topic_python-virtualenv-3.0-CVE-2026-13346 branch from 9c3a37f to 0821e80 Compare August 3, 2026 19:22
@Ratiranjan5

Copy link
Copy Markdown
Author

Latest Buddy Build has passed,

@Ratiranjan5
Ratiranjan5 marked this pull request as ready for review August 4, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants