From patchwork Mon Nov 30 07:49:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sana Kazi X-Patchwork-Id: 106374 X-Patchwork-Delegate: yoann.congal@smile.fr Received: from PNZPR01CU001.outbound.protection.outlook.com (PNZPR01CU001.outbound.protection.outlook.com [40.107.51.29]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.28049.1796025855858748140 for ; Mon, 30 Nov 2026 00:04:16 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bmwtechworks.in header.s=selector1 header.b=nizawZqs; spf=pass (domain: bmwtechworks.in, ip: 40.107.51.29, mailfrom: upstream_ip-sk@bmwtechworks.in) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ocuWo0DGwNiuaNfWsL9QnYK1w7X716ShWJwjkmRWe0ZaJ4aFlkqyb/hS2IAw6xhsulyPSegqnkPMCJZB7m72FsIlpED14ApsWcDmocqB9lswmnBZuPRUvj3KM7whoYAB778RaF3jTRRyCnq+UgFrJdkpK58Wy1HmwwKxIDnisncQIHcvfsTOEeh1vfA6KO/wTgUH1DpScfrtIpM/4YXUKLw5aH0j2K431TaAyk1PVVCSMF5a+GyPDIZz+Y8oC6UGdahwEPf6jZIksuJfiVTZ1C+jG9EBYHYhPsfcTukq/EKtV9JuqME+pNYP+D2JzyWGlR6UeKkcJXMfXN9c3qwUlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jIXv7muCa/wFem3rn1/RwSoDLfvnt4xgF7cM+6/+us4=; b=e2yzPQAzg9ctBHmzwb3Nso9zgu6p3bT9YtocNTQG0bSIBFwzqwhB/7hAGOGj1fsAgzppR645hE3DXP5gsatheoh87SMyzlVW8Nu/tF8UGGzw/Qepd6lM/vOkgaVxhDwTqhR0uvzyiAiAp40QXRt4uEVa2wZZIzPcjEuePZnmVy8FKTpg1k3MgkFbhUZGQENKrR7b4MjD/o9WJJyaIuEXHl797mfeShpNjx3dO1G9mEwLrs8zOSA641UQPH5ryAv8z7CQpZQt7Piym1MBZzG9pruj6PKvDoy4r8aIUhLY/OtG0R1tfFZajs+goezhKjNTtiI0DWjPV8xW4VXTFuaRlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bmwtechworks.in; dmarc=pass action=none header.from=bmwtechworks.in; dkim=pass header.d=bmwtechworks.in; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bmwtechworks.in; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jIXv7muCa/wFem3rn1/RwSoDLfvnt4xgF7cM+6/+us4=; b=nizawZqsK/GhJMKEkwF5GkOUs92ytiHOzjoZmGtST9Nt9v7orcOftkqt2W8B8pgcZZ9O9VZhg10rrlEFmU9L6BUaC1u7wVTXRgiE8ynBXpAttmX3A06oZ0vTJaBUcLxt6JU/I9vu21aL8iQgm0A75JKitK6cwMGcoXn1bDa6NW11i2SzK2BqHU7kfpaMV4FOhvI5Eorc1bSynl49ug2dLjih12jpx1j+btorpNW549bBllbFYaHNk9K8qp1bpBX5jO9Fm+cje0yOosxdBPJ1w2BnrytDkZ0rLQhW1KO47Bf3Nl5vp0gZTeZmJgfPhOPzJXoOJss5rmXd3/1EIVHAzw== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bmwtechworks.in; Received: from MAYP287MB3754.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:148::9) by PN3P287MB0386.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:d7::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.12; Mon, 30 Nov 2026 07:49:54 +0000 Received: from MAYP287MB3754.INDP287.PROD.OUTLOOK.COM ([fe80::ef09:5a67:49d7:9504]) by MAYP287MB3754.INDP287.PROD.OUTLOOK.COM ([fe80::ef09:5a67:49d7:9504%5]) with mapi id 15.21.0662.007; Mon, 30 Nov 2026 07:49:54 +0000 From: Sana Kazi To: openembedded-core@lists.openembedded.org CC: Yogita Urade , Steve Sakoman , Sana Kazi Subject: [poky][scarthgap][PATCH] python3-urllib3: fix CVE-2025-50182 Date: Mon, 30 Nov 2026 13:19:46 +0530 Message-ID: <20261130074946.1088788-1-UpStream_IP-SK@bmwtechworks.in> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: PN4PR01CA0123.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:275::11) To MAYP287MB3754.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:148::9) Return-Path: UpStream_IP-SK@bmwtechworks.in MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MAYP287MB3754:EE_|PN3P287MB0386:EE_ X-MS-Office365-Filtering-Correlation-Id: 10efe4b2-1c52-40f0-1c3c-08df4eb685b7 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024|23010399003|11063799006|6133799003|261009223027099003|55112099003|18002099003|3023799007|13003099007|10067099003|56012099006|261102123227099003|261028144727099003|261026135527099003|261026121527099003|261026140227099003|261026130827099003|261022113327099003|261022105027099003|261022075727099003|261022115727099003|261021135927099003|261021123027099003|261021133027099003|261021121427099003|261021130227099003|38350700014; X-Microsoft-Antispam-Message-Info: SXY5WC7nnihZ8T5Da/NUEbXakFyjOjuOJ0E0JWCtb71TKLa9IM0QW6wXDbqygABlOZjUIrr6Ykb/aK9FMJPBDLc4opOFwYE+jl3LPgKbLwSVv+MedjokpIG5ScZQe/mas5Ptv6NaHV+mLiKjkNkzo4+UWYR2WaQd1NFyGrGhC4ULTKgro4nn5CYreL0gbPodTxQ5grHTOJKd493sHGcr0w6YUk0tp5RI1wnA+yeEIsTnxFjkX9OE2hvf/cU2LgabLz6pGS+0Da0plnzZzniGlTDBYboULgJ9OYb7C/mNrBu1lnZMdd8JTMq3JKBBGoB1iqK03hfMbbRsG5TwifQC7AXsoiP3U5ipNE49Zp/h/h7W0rJyR1SCLfyEHeNUHXj25dz9HpzYsp/z9guQjw2ybJeUYU/R+PGgWeKsiwkHV5XwHSRBy4hOmBk0Z/3GWg3NS2xRkYdtHYUhlkgluvPdD2RDX54lLb4HX7anzlxQ4VRFl91FQfINmt2pzsPKUUK51+vPWqqEvNaVakbcRNmHDMhSOH8wqgtKR9Cu4eeHUdJ1bKMhi2Bo4Furaj6kWDeWRaUP28nplVj3ld9PgzJIGT28SwyZ9ngU040vGImCp8W5PuVINJ/OJpRVnztXa2aj7ClTKR044jVK0O6xAgzpxTf5rBaJKvTmQ1YqmPhSd5NYdzHghrDgXjq6k6Ohq3pp7wIPU+C37KHZKghmOGtnkvxrPMyhXGZBUcd5P7PXsc4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MAYP287MB3754.INDP287.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(366016)(1800799024)(23010399003)(11063799006)(6133799003)(261009223027099003)(55112099003)(18002099003)(3023799007)(13003099007)(10067099003)(56012099006)(261102123227099003)(261028144727099003)(261026135527099003)(261026121527099003)(261026140227099003)(261026130827099003)(261022113327099003)(261022105027099003)(261022075727099003)(261022115727099003)(261021135927099003)(261021123027099003)(261021133027099003)(261021121427099003)(261021130227099003)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: g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3MuGQbg0ZSViMmI4K5mulmNvf2LohKsVFsWS4esZ+m8zU0IBCb/uYXXdtBZRuYBWsA4KqkNBDSt8+LmBiGyR/jjmhNWjP03py+nccoiiv8/08dbgM/woDJZq6CJUNgj60wioErOvcLWqsSfEJQMHc/vvp/9tFos13OtQBQ28p9dcESCeJ+IIpCJ1z8xV6GjoWkegNYwGEXliMoZDheZndV2IQ0VyqjXzDbQI1izew5e/hAi7f4nm1QlxkQOaqcNWztBg6kT8Q38t4vt8IvQkSH+3r+uYaZ82m6B/JQLpc8LPcWboQU2AXms7lN2ILsus9PTwkXdoGjG1F6WWNIUdVSFkcF9Zg7+V8DO1G0tFPr1unIp4I4nGdM6vdgVYAqz86nLkAi8Yn5zxK1xxnofIYCKht7ESioIbyyx3sLvQpEmqgWADYXkjY8GRBtlJltM3O51o0y/OWz8YFIy7Rxxz7lc2cRnI5l15pFZSdV6pYDoSeen0sWCPiUgo0PCImB2HOIIcow4pBcTpdHTd6wxBDhjvxffmKV/oNmc/oAf9B7rFtSNQwHfRo1/OmH7sDiI+7y1EoxmfSJmF6Jxmr8OXABGA3mTVsU6R/CShWEwuv3z4tldOeWDFlWDv9Nifj7AQ9bA5gWYkExZWhjtZGpiCpTbkwWG5X1Xul6E+w1QqNNqlZKbJCs= X-OriginatorOrg: bmwtechworks.in X-MS-Exchange-CrossTenant-Network-Message-Id: 10efe4b2-1c52-40f0-1c3c-08df4eb685b7 X-MS-Exchange-CrossTenant-AuthSource: MAYP287MB3754.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2026 07:49:54.5912 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 970fa6fd-1031-4cc6-8c56-488f3c61cd05 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /4S9bZlhhgs1PmpO0JgT81vvwm9aavBIUKOFXa+XC0Q3UYr2xK1G+UT7tTQncyCzQ2AegC1dJk6EcSgQh9QA5wZzhxeLSD+bmHhLQA5LPf8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN3P287MB0386 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Mon, 30 Nov 2026 08:18:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251583 From: Yogita Urade urllib3 is a user-friendly HTTP client library for Python. Prior to 2.5.0, urllib3 does not control redirects in browsers and Node.js. urllib3 supports being used in a Pyodide runtime utilizing the JavaScript Fetch API or falling back on XMLHttpRequest. This means Python libraries can be used to make HTTP requests from a browser or Node.js. Additionally, urllib3 provides a mechanism to control redirects, but the retries and redirect parameters are ignored with Pyodide; the runtime itself determines redirect behavior. This issue has been patched in version 2.5.0. Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-50182 Upstream patch: https://github.com/urllib3/urllib3/commit/7eb4a2aafe49a279c29b6d1f0ed0f42e9736194f Signed-off-by: Yogita Urade Signed-off-by: Steve Sakoman (cherry picked from commit 082b865d9814e7e7aca4466551a035199aa8b563) Signed-off-by: Sana Kazi --- .../python3-urllib3/CVE-2025-50182.patch | 112 ++++++++++++++++++ .../python/python3-urllib3_2.2.2.bb | 1 + 2 files changed, 113 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-urllib3/CVE-2025-50182.patch diff --git a/meta/recipes-devtools/python/python3-urllib3/CVE-2025-50182.patch b/meta/recipes-devtools/python/python3-urllib3/CVE-2025-50182.patch new file mode 100644 index 00000000000..3c0efec1196 --- /dev/null +++ b/meta/recipes-devtools/python/python3-urllib3/CVE-2025-50182.patch @@ -0,0 +1,112 @@ +From 7eb4a2aafe49a279c29b6d1f0ed0f42e9736194f Mon Sep 17 00:00:00 2001 +From: Illia Volochii +Date: Wed, 18 Jun 2025 16:30:35 +0300 +Subject: [PATCH] Merge commit from fork + +CVE: CVE-2025-50182 +Upstream-Status: Backport [https://github.com/urllib3/urllib3/commit/7eb4a2aafe49a279c29b6d1f0ed0f42e9736194f] + +Signed-off-by: Yogita Urade +--- + docs/reference/contrib/emscripten.rst | 2 +- + src/urllib3/contrib/emscripten/fetch.py | 20 ++++++++++ + test/contrib/emscripten/test_emscripten.py | 46 ++++++++++++++++++++++ + 3 files changed, 67 insertions(+), 1 deletion(-) + +diff --git a/docs/reference/contrib/emscripten.rst b/docs/reference/contrib/emscripten.rst +index a8f1cda..4670757 100644 +--- a/docs/reference/contrib/emscripten.rst ++++ b/docs/reference/contrib/emscripten.rst +@@ -68,7 +68,7 @@ Features which are usable with Emscripte + * Timeouts + * Retries + * Streaming (with Web Workers and Cross-Origin Isolation) +-* Redirects (determined by browser/runtime, not restrictable with urllib3) ++* Redirects (urllib3 controls redirects in Node.js but not in browsers where behavior is determined by runtime) + * Decompressing response bodies + + Features which don't work with Emscripten: +diff --git a/src/urllib3/contrib/emscripten/fetch.py b/src/urllib3/contrib/emscripten/fetch.py +index a514306..6695821 100644 +--- a/src/urllib3/contrib/emscripten/fetch.py ++++ b/src/urllib3/contrib/emscripten/fetch.py +@@ -403,6 +403,21 @@ def send_request(request: EmscriptenRequ + raise _RequestError(err.message, request=request) + + ++def _is_node_js() -> bool: ++ """ ++ Check if we are in Node.js. ++ ++ :return: True if we are in Node.js. ++ :rtype: bool ++ """ ++ return ( ++ hasattr(js, "process") ++ and hasattr(js.process, "release") ++ # According to the Node.js documentation, the release name is always "node". ++ and js.process.release.name == "node" ++ ) ++ ++ + def streaming_ready() -> bool | None: + if _fetcher: + return _fetcher.streaming_ready +diff --git a/test/contrib/emscripten/test_emscripten.py b/test/contrib/emscripten/test_emscripten.py +index 5eaa674..fbf89fc 100644 +--- a/test/contrib/emscripten/test_emscripten.py ++++ b/test/contrib/emscripten/test_emscripten.py +@@ -964,6 +964,51 @@ def test_redirects( + selenium_coverage, testserver_http.http_host, testserver_http.http_port + ) + ++@pytest.mark.with_jspi ++def test_disabled_redirects( ++ selenium_coverage: typing.Any, testserver_http: PyodideServerInfo ++) -> None: ++ """ ++ Test that urllib3 can control redirects in Node.js. ++ """ ++ ++ @run_in_pyodide # type: ignore[misc] ++ def pyodide_test(selenium_coverage: typing.Any, host: str, port: int) -> None: ++ import pytest ++ ++ from urllib3 import PoolManager, request ++ from urllib3.contrib.emscripten.fetch import _is_node_js ++ from urllib3.exceptions import MaxRetryError ++ ++ if not _is_node_js(): ++ pytest.skip("urllib3 does not control redirects in browsers.") ++ ++ redirect_url = f"http://{host}:{port}/redirect" ++ ++ with PoolManager(retries=0) as http: ++ with pytest.raises(MaxRetryError): ++ http.request("GET", redirect_url) ++ ++ response = http.request("GET", redirect_url, redirect=False) ++ assert response.status == 303 ++ ++ with PoolManager(retries=False) as http: ++ response = http.request("GET", redirect_url) ++ assert response.status == 303 ++ ++ with pytest.raises(MaxRetryError): ++ request("GET", redirect_url, retries=0) ++ ++ response = request("GET", redirect_url, redirect=False) ++ assert response.status == 303 ++ ++ response = request("GET", redirect_url, retries=0, redirect=False) ++ assert response.status == 303 ++ ++ pyodide_test( ++ selenium_coverage, testserver_http.http_host, testserver_http.http_port ++ ) ++ + + @install_urllib3_wheel() + def test_insecure_requests_warning( +-- +2.40.0 diff --git a/meta/recipes-devtools/python/python3-urllib3_2.2.2.bb b/meta/recipes-devtools/python/python3-urllib3_2.2.2.bb index 95667d3fd85..498c4709948 100644 --- a/meta/recipes-devtools/python/python3-urllib3_2.2.2.bb +++ b/meta/recipes-devtools/python/python3-urllib3_2.2.2.bb @@ -15,6 +15,7 @@ SRC_URI += "file://CVE-2025-50181.patch \ file://CVE-2026-97689.patch \ file://CVE-2026-97687_p1.patch \ file://CVE-2026-97687_p2.patch \ + file://CVE-2025-50182.patch \ " RDEPENDS:${PN} += "\