mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-09-08 18:30:16 +00:00
python3-aiohttp: fix CVE-2026-34518
This patch applies the reviewed upstream fix commits shown in [1] and [2]. The advisory identifying the fix is referenced in [3]. [1] https://github.com/aio-libs/aiohttp/commit/5351c980dcec7ad385730efdf4e1f4338b24fdb6 [2] https://github.com/aio-libs/aiohttp/commit/6e8f393330f9bd6d7b24a146124ebc42eaa727b9 [3] https://nvd.nist.gov/vuln/detail/CVE-2026-34518 Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
From 528611956c8ea77e8dddc312b64baa3549697bdf Mon Sep 17 00:00:00 2001
|
||||
From: Sam Bull <git@sambull.org>
|
||||
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 <dkelaiya@cisco.com>
|
||||
---
|
||||
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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user