diff --git a/meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-34518.patch b/meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-34518.patch new file mode 100644 index 0000000000..98417f13e9 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-34518.patch @@ -0,0 +1,64 @@ +From 528611956c8ea77e8dddc312b64baa3549697bdf Mon Sep 17 00:00:00 2001 +From: Sam Bull +Date: Fri, 27 Feb 2026 01:31:07 +0000 +Subject: [PATCH] Drop additional headers on redirect (#12146) (#12150) + +CVE: CVE-2026-34518 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/5351c980dcec7ad385730efdf4e1f4338b24fdb6] + +(cherry picked from commit 6e8f393330f9bd6d7b24a146124ebc42eaa727b9) + +(cherry picked from commit 5351c980dcec7ad385730efdf4e1f4338b24fdb6) +Signed-off-by: Darsh Kelaiya +--- + aiohttp/client.py | 2 ++ + tests/test_client_functional.py | 9 ++++++++- + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/aiohttp/client.py b/aiohttp/client.py +index e30b880e9..0b87d7eec 100644 +--- a/aiohttp/client.py ++++ b/aiohttp/client.py +@@ -684,6 +684,8 @@ class ClientSession: + if url.origin() != parsed_url.origin(): + auth = None + headers.pop(hdrs.AUTHORIZATION, None) ++ headers.pop(hdrs.COOKIE, None) ++ headers.pop(hdrs.PROXY_AUTHORIZATION, None) + + url = parsed_url + params = {} +diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py +index c8d4e0aab..3ca1716ba 100644 +--- a/tests/test_client_functional.py ++++ b/tests/test_client_functional.py +@@ -2604,6 +2604,8 @@ async def test_drop_auth_on_redirect_to_other_host( + async def srv_to(request): + assert request.host == url_to.host + assert "Authorization" not in request.headers, "Header wasn't dropped" ++ assert "Proxy-Authorization" not in request.headers ++ assert "Cookie" not in request.headers + return web.Response() + + server_from = await create_server_for_url_and_handler(url_from, srv_from) +@@ -2646,11 +2648,16 @@ async def test_drop_auth_on_redirect_to_other_host( + resp = await client.get( + url_from, + auth=aiohttp.BasicAuth("user", "pass"), ++ headers={"Proxy-Authorization": "Basic dXNlcjpwYXNz", "Cookie": "a=b"}, + ) + assert resp.status == 200 + resp = await client.get( + url_from, +- headers={"Authorization": "Basic dXNlcjpwYXNz"}, ++ headers={ ++ "Authorization": "Basic dXNlcjpwYXNz", ++ "Proxy-Authorization": "Basic dXNlcjpwYXNz", ++ "Cookie": "a=b", ++ }, + ) + assert resp.status == 200 + +-- +2.35.6 + diff --git a/meta-python/recipes-devtools/python/python3-aiohttp_3.9.5.bb b/meta-python/recipes-devtools/python/python3-aiohttp_3.9.5.bb index 750a96287e..7b77b19dcc 100644 --- a/meta-python/recipes-devtools/python/python3-aiohttp_3.9.5.bb +++ b/meta-python/recipes-devtools/python/python3-aiohttp_3.9.5.bb @@ -20,6 +20,7 @@ SRC_URI += "file://CVE-2024-52304.patch \ file://CVE-2026-34514.patch \ file://CVE-2026-34513.patch \ file://CVE-2026-34993.patch \ + file://CVE-2026-34518.patch \ " CVE_STATUS[CVE-2026-34515] = "not-applicable-platform: Vulnerability only affects applications running on Windows"