-
Notifications
You must be signed in to change notification settings - Fork 603
[AutoPR- Security] Patch python-urllib3 for CVE-2025-66418, CVE-2026-21441 [HIGH] #15472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AutoPR- Security] Patch python-urllib3 for CVE-2025-66418, CVE-2026-21441 [HIGH] #15472
Conversation
2b90566 to
669fa65
Compare
|
CVE-2025-66418.patch: |
|
CVE-2025-21441.patch |
|
ptest failure is not a regression. Same failure occurring before and after applying patch. |
|
/azurepipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
No ptests are running for this package, test harness is broken (not related to this PR) |
|
Can we try this patch to fix the ptests? %check
-pip3 install --user --upgrade nox
+pip3 install --user --upgrade "nox<2024.0" "setuptools<70"
PATH="$PATH:/root/.local/bin/"
nox --reuse-existing-virtualenvs --sessions test-%{python3_version} |
|
Try this patch (worked locally), there was an issue with the previous patch as well: diff --git a/SPECS/python-urllib3/CVE-2025-50181.patch b/SPECS/python-urllib3/CVE-2025-50181.patch
index dd849d027..b03e8b332 100644
--- a/SPECS/python-urllib3/CVE-2025-50181.patch
+++ b/SPECS/python-urllib3/CVE-2025-50181.patch
@@ -74,7 +74,7 @@ index 61715e9..ded7b38 100644
+ p = PoolManager(retries=retries)
merged = p._merge_pool_kwargs({"new_key": "value"})
- assert {"strict": True, "new_key": "value"} == merged
-+ assert {"strict": retries, "new_key": "value"} == merged
++ assert {"retries": retries, "new_key": "value"} == merged
def test_merge_pool_kwargs_none(self):
"""Assert false-y values to _merge_pool_kwargs result in defaults"""
diff --git a/SPECS/python-urllib3/python-urllib3.spec b/SPECS/python-urllib3/python-urllib3.spec
index dc9180fc4..ba77aefef 100644
--- a/SPECS/python-urllib3/python-urllib3.spec
+++ b/SPECS/python-urllib3/python-urllib3.spec
@@ -1,7 +1,7 @@
Summary: A powerful, sanity-friendly HTTP client for Python.
Name: python-urllib3
Version: 1.26.19
-Release: 2%{?dist}
+Release: 3%{?dist}
License: MIT
Vendor: Microsoft Corporation
Distribution: Mariner
@@ -22,6 +22,8 @@ BuildRequires: python3-setuptools
BuildRequires: python3-xml
%if %{with_check}
BuildRequires: python3-pip
+BuildRequires: python3-pytest
+BuildRequires: python3-mock
%endif
Requires: python3
@@ -43,9 +45,20 @@ rm -rf test/contrib/
%py3_install
%check
-pip3 install --user --upgrade nox
-PATH="$PATH:/root/.local/bin/"
-nox --reuse-existing-virtualenvs --sessions test-%{python3_version}
+# Install nox to handle test environment setup
+pip3 install nox
+
+# Patch dev-requirements.txt to use compatible versions with setuptools 69.x:
+# - pytest 7.x+ is compatible with newer setuptools
+# - flaky 3.8.0+ is compatible with pytest 7.x+
+sed -i 's/pytest==4.6.9.*/pytest>=7.0.0/' dev-requirements.txt
+sed -i 's/pytest==6.2.4.*/pytest>=7.0.0/' dev-requirements.txt
+sed -i 's/flaky==3.7.0/flaky>=3.8.0/' dev-requirements.txt
+
+# Run the test session for Python 3.9
+# Skip test_recent_date which uses hardcoded date that is now in the past
+# Note: test/with_dummyserver and test/contrib are removed in %prep
+nox -s test-3.9 -- -k "not test_recent_date"
%files -n python3-urllib3
%defattr(-,root,root,-) |
|
Added suggested patch to fix ptest failures. |
|
/azurepipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
realsdx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Patch applies cleanly
- Security tag exists
- Release bump & Changelog
- Buddy Build
- Ptests harness fixed
Signed-off-by: @realsdx
|
Auto cherry-pick results: Auto cherry-pick pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1030993&view=results |

Auto Patch python-urllib3 for CVE-2025-66418, CVE-2026-21441.
Autosec pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1022838&view=results
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
What does the PR accomplish, why was it needed?
Change Log
Does this affect the toolchain?
YES/NO
Associated issues
Links to CVEs
Test Methodology