python3-aiohttp: fix multiple CVEs
cover python3-aiohttp: fix multiple CVEs
From: Darsh Kelaiya <[email protected]>
Backport ten upstream aiohttp security fixes to the 3.13.5 recipe on wrynose.
The corresponding fixes are available in aiohttp 3.14.0 and 3.14.1. Carry them as focused backports instead of upgrading the recipe because the 3.14 release also introduces new APIs, deprecations, and backward-incompatible behavior outside the security scope.
The individual commits retain the upstream fix provenance and public advisory references for each CVE.
Testing:
- Applied the ten layer commits to the upstream wrynose baseline.
- Applied all ten embedded patches to aiohttp 3.13.5 in series order with no conflicts or fuzz.
- Package build and image build validation completed successfully.
Darsh Kelaiya (10):
python3-aiohttp: fix CVE-2026-34993
python3-aiohttp: fix CVE-2026-47265
python3-aiohttp: fix CVE-2026-50269
python3-aiohttp: fix CVE-2026-54274
python3-aiohttp: fix CVE-2026-54275
python3-aiohttp: fix CVE-2026-54276
python3-aiohttp: fix CVE-2026-54277
python3-aiohttp: fix CVE-2026-54278
python3-aiohttp: fix CVE-2026-54279
python3-aiohttp: fix CVE-2026-54280
.../python3-aiohttp/CVE-2026-34993.patch | 478 ++++++++++++++++++ .../python3-aiohttp/CVE-2026-47265.patch | 64 +++ .../python3-aiohttp/CVE-2026-50269.patch | 81 +++ .../python3-aiohttp/CVE-2026-54274.patch | 182 +++++++ .../python3-aiohttp/CVE-2026-54275.patch | 115 +++++ .../python3-aiohttp/CVE-2026-54276.patch | 287 +++++++++++ .../python3-aiohttp/CVE-2026-54277.patch | 249 +++++++++ .../python3-aiohttp/CVE-2026-54278.patch | 182 +++++++ .../python3-aiohttp/CVE-2026-54279.patch | 295 +++++++++++ .../python3-aiohttp/CVE-2026-54280.patch | 138 +++++ .../python/python3-aiohttp_3.13.5.bb | 13 + 11 files changed, 2084 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-34993.patch create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-47265.patch create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-50269.patch create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54274.patch create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54275.patch create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54276.patch create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54277.patch create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54278.patch create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54279.patch create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54280.patch
Signature · 1 line
2.35.6
PATCH 1/10 python3-aiohttp: fix CVE-2026-34993
From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/dcf40f30637e8752c76781cf6703b5a236749a00
[2] https://github.com/advisories/GHSA-jg22-mg44-37j8
--- .../python3-aiohttp/CVE-2026-34993.patch | 478 ++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 4 + 2 files changed, 482 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-34993.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-34993.patch new file +478 -0
@@ -0,0 +1,478 @@ +From 9a92d1c1caacbb3244526d2ef9c197978f701c76 Mon Sep 17 00:00:00 2001 +From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> +Date: Sun, 22 Feb 2026 15:53:43 +0000 +Subject: [PATCH] [PR #12091/8a631e74 backport][3.14] Restrict pickle + deserialization in CookieJar.load() (#12105) + +**This is a backport of PR #12091 as merged into master +(8a631e74c1d266499dbc6bcdbc83c60f4ea3ee3c).** + +--------- + +CVE: CVE-2026-34993 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/dcf40f30637e8752c76781cf6703b5a236749a00] + +Co-authored-by: Yuval Elbar <[email protected]> +Co-authored-by: Sam Bull <[email protected]> +(cherry picked from commit dcf40f30637e8752c76781cf6703b5a236749a00) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12091.bugfix.rst | 6 ++ + aiohttp/cookiejar.py | 114 +++++++++++++++++++++- + docs/client_reference.rst | 18 +++- + docs/spelling_wordlist.txt | 7 +- + tests/conftest.py | 5 + + tests/test_cookiejar.py | 189 +++++++++++++++++++++++++++++++++++++ + 6 files changed, 331 insertions(+), 8 deletions(-) + create mode 100644 CHANGES/12091.bugfix.rst + +diff --git a/CHANGES/12091.bugfix.rst b/CHANGES/12091.bugfix.rst +new file mode 100644 +index 000000000..45ffbc355 +--- /dev/null ++++ b/CHANGES/12091.bugfix.rst +@@ -0,0 +1,6 @@ ++Switched :py:meth:`~aiohttp.CookieJar.save` to use JSON format and ++:py:meth:`~aiohttp.CookieJar.load` to try JSON first with a fallback to ++a restricted pickle unpickler that only allows cookie-related types ++(``SimpleCookie``, ``Morsel``, ``defaultdict``, etc.), preventing ++arbitrary code execution via malicious pickle payloads ++(CWE-502) -- by :user:`YuvalElbar6`. +diff --git a/aiohttp/cookiejar.py b/aiohttp/cookiejar.py +index 193648d43..757cc10e8 100644 +--- a/aiohttp/cookiejar.py ++++ b/aiohttp/cookiejar.py +@@ -4,6 +4,7 @@ import contextlib + import datetime + import heapq + import itertools ++import json + import os # noqa + import pathlib + import pickle +@@ -48,6 +49,41 @@ _MIN_SCHEDULED_COOKIE_EXPIRATION = 100 + _SIMPLE_COOKIE = SimpleCookie() + + ++class _RestrictedCookieUnpickler(pickle.Unpickler): ++ """A restricted unpickler that only allows cookie-related types. ++ ++ This prevents arbitrary code execution when loading pickled cookie data ++ from untrusted sources. Only types that are expected in a serialized ++ CookieJar are permitted. ++ ++ See: https://docs.python.org/3/library/pickle.html#restricting-globals ++ """ ++ ++ _ALLOWED_CLASSES: frozenset[tuple[str, str]] = frozenset( ++ { ++ # Core cookie types ++ ("http.cookies", "SimpleCookie"), ++ ("http.cookies", "Morsel"), ++ # Container types used by CookieJar._cookies ++ ("collections", "defaultdict"), ++ # builtins that pickle uses for reconstruction ++ ("builtins", "tuple"), ++ ("builtins", "set"), ++ ("builtins", "frozenset"), ++ ("builtins", "dict"), ++ } ++ ) ++ ++ def find_class(self, module: str, name: str) -> type: ++ if (module, name) not in self._ALLOWED_CLASSES: ++ raise pickle.UnpicklingError( ++ f"Forbidden class: {module}.{name}. " ++ "CookieJar.load() only allows cookie-related types for security. " ++ "See https://docs.python.org/3/library/pickle.html#restricting-globals" ++ ) ++ return super().find_class(module, name) # type: ignore[no-any-return] ++ ++ + class CookieJar(AbstractCookieJar): + """Implements cookie storage adhering to RFC 6265.""" + +@@ -123,14 +159,84 @@ class CookieJar(AbstractCookieJar): + return self._quote_cookie + + def save(self, file_path: PathLike) -> None: ++ """Save cookies to a file using JSON format. ++ ++ :param file_path: Path to file where cookies will be serialized, ++ :class:`str` or :class:`pathlib.Path` instance. ++ """ + file_path = pathlib.Path(file_path) +- with file_path.open(mode="wb") as f: +- pickle.dump(self._cookies, f, pickle.HIGHEST_PROTOCOL) ++ data: dict[str, dict[str, dict[str, str | bool]]] = {} ++ for (domain, path), cookie in self._cookies.items(): ++ key = f"{domain}|{path}" ++ data[key] = {} ++ for name, morsel in cookie.items(): ++ morsel_data: dict[str, str | bool] = { ++ "key": morsel.key, ++ "value": morsel.value, ++ "coded_value": morsel.coded_value, ++ } ++ # Save all morsel attributes that have values ++ for attr in morsel._reserved: # type: ignore[attr-defined] ++ attr_val = morsel[attr] ++ if attr_val: ++ morsel_data[attr] = attr_val ++ data[key][name] = morsel_data ++ with file_path.open(mode="w", encoding="utf-8") as f: ++ json.dump(data, f, indent=2) + + def load(self, file_path: PathLike) -> None: ++ """Load cookies from a file. ++ ++ Tries to load JSON format first. Falls back to loading legacy ++ pickle format (using a restricted unpickler) for backward ++ compatibility with existing cookie files. ++ ++ :param file_path: Path to file from where cookies will be ++ imported, :class:`str` or :class:`pathlib.Path` instance. ++ """ + file_path = pathlib.Path(file_path) +- with file_path.open(mode="rb") as f: +- self._cookies = pickle.load(f) ++ # Try JSON format first ++ try: ++ with file_path.open(mode="r", encoding="utf-8") as f: ++ data = json.load(f) ++ self._cookies = self._load_json_data(data) ++ except (json.JSONDecodeError, UnicodeDecodeError, ValueError): ++ # Fall back to legacy pickle format with restricted unpickler ++ with file_path.open(mode="rb") as f: ++ self._cookies = _RestrictedCookieUnpickler(f).load() ++ ++ def _load_json_data( ++ self, data: dict[str, dict[str, dict[str, str | bool]]] ++ ) -> defaultdict[tuple[str, str], SimpleCookie]: ++ """Load cookies from parsed JSON data.""" ++ cookies: defaultdict[tuple[str, str], SimpleCookie] = defaultdict(SimpleCookie) ++ for compound_key, cookie_data in data.items(): ++ domain, path = compound_key.split("|", 1) ++ key = (domain, path) ++ for name, morsel_data in cookie_data.items(): ++ morsel: Morsel[str] = Morsel() ++ morsel_key = morsel_data["key"] ++ morsel_value = morsel_data["value"] ++ morsel_coded_value = morsel_data["coded_value"] ++ # Use __setstate__ to bypass validation, same pattern ++ # used in _build_morsel and _cookie_helpers. ++ morsel.__setstate__( # type: ignore[attr-defined] ++ { ++ "key": morsel_key, ++ "value": morsel_value, ++ "coded_value": morsel_coded_value, ++ } ++ ) ++ # Restore morsel attributes ++ for attr in morsel._reserved: # type: ignore[attr-defined] ++ if attr in morsel_data and attr not in ( ++ "key", ++ "value", ++ "coded_value", ++ ): ++ morsel[attr] = morsel_data[attr] ++ cookies[key][name] = morsel ++ return cookies + + def clear(self, predicate: Optional[ClearCookiePredicate] = None) -> None: + if predicate is None: +diff --git a/docs/client_reference.rst b/docs/client_reference.rst +index a1fc98b3c..374796f40 100644 +--- a/docs/client_reference.rst ++++ b/docs/client_reference.rst +@@ -2464,16 +2464,28 @@ Utilities + + .. method:: save(file_path) + +- Write a pickled representation of cookies into the file ++ Write a JSON representation of cookies into the file + at provided path. + ++ .. versionchanged:: 3.14 ++ ++ Previously used pickle format. Now uses JSON for safe ++ serialization. ++ + :param file_path: Path to file where cookies will be serialized, + :class:`str` or :class:`pathlib.Path` instance. + + .. method:: load(file_path) + +- Load a pickled representation of cookies from the file +- at provided path. ++ Load cookies from the file at provided path. Tries JSON format ++ first, then falls back to legacy pickle format (using a restricted ++ unpickler that only allows cookie-related types) for backward ++ compatibility with existing cookie files. ++ ++ .. versionchanged:: 3.14 ++ ++ Now loads JSON format by default. Falls back to restricted ++ pickle for files saved by older versions. + + :param file_path: Path to file from where cookies will be + imported, :class:`str` or :class:`pathlib.Path` instance. +diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt +index 7dc09edb1..382ad414e 100644 +--- a/docs/spelling_wordlist.txt ++++ b/docs/spelling_wordlist.txt +@@ -98,6 +98,7 @@ deduplicate + defs + Dependabot + deprecations ++deserialization + DER + dev + Dev +@@ -210,7 +211,8 @@ Multipart + musllinux + mypy + Nagle +-Nagle’s ++Nagle's ++NFS + namedtuple + nameservers + namespace +@@ -232,6 +234,7 @@ param + params + parsers + pathlib ++payloads + peername + performant + pickleable +@@ -351,6 +354,8 @@ unhandled + unicode + unittest + Unittest ++unpickler ++untrusted + unix + unsets + unstripped +diff --git a/tests/conftest.py b/tests/conftest.py +index c299df5aa..bfaa26680 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -95,6 +95,11 @@ def blockbuster(request: pytest.FixtureRequest) -> Iterator[None]: + bb.functions[func].can_block_in( + "aiohttp/web_urldispatcher.py", "add_static" + ) ++ # save/load is not async, so we must allow this: ++ for func in ("io.TextIOWrapper.read", "io.BufferedReader.read"): ++ bb.functions[func].can_block_in("aiohttp/cookiejar.py", "load") ++ for func in ("io.TextIOWrapper.write", "io.BufferedWriter.write"): ++ bb.functions[func].can_block_in("aiohttp/cookiejar.py", "save") + # Note: coverage.py uses locking internally which can cause false positives + # in blockbuster when it instruments code. This is particularly problematic + # on Windows where it can lead to flaky test failures. +diff --git a/tests/test_cookiejar.py b/tests/test_cookiejar.py +index 17e27e8f7..694514067 100644 +--- a/tests/test_cookiejar.py ++++ b/tests/test_cookiejar.py +@@ -9,6 +9,7 @@ import sys + import unittest + from http.cookies import BaseCookie, Morsel, SimpleCookie + from operator import not_ ++from pathlib import Path + from typing import List, Set + from unittest import mock + +@@ -1621,3 +1622,191 @@ async def test_shared_cookie_with_multiple_domains() -> None: + # Verify cache is reused efficiently + assert ("", "") in jar._morsel_cache + assert "universal" in jar._morsel_cache[("", "")] ++ ++ ++# === Security tests for restricted unpickler and JSON save/load === ++ ++ ++async def test_load_rejects_malicious_pickle(tmp_path: Path) -> None: ++ """Verify CookieJar.load() blocks arbitrary code execution via pickle. ++ ++ A crafted pickle payload using os.system (or any non-cookie class) ++ must be rejected by the restricted unpickler. ++ """ ++ import os ++ ++ file_path = tmp_path / "malicious.pkl" ++ ++ class RCEPayload: ++ def __reduce__(self) -> tuple[object, ...]: ++ return (os.system, ("echo PWNED",)) ++ ++ with open(file_path, "wb") as f: ++ pickle.dump(RCEPayload(), f, pickle.HIGHEST_PROTOCOL) ++ ++ jar = CookieJar() ++ with pytest.raises(pickle.UnpicklingError, match="Forbidden class"): ++ jar.load(file_path) ++ ++ ++async def test_load_rejects_eval_payload(tmp_path: Path) -> None: ++ """Verify CookieJar.load() blocks eval-based pickle payloads.""" ++ file_path = tmp_path / "eval_payload.pkl" ++ ++ class EvalPayload: ++ def __reduce__(self) -> tuple[object, ...]: ++ return (eval, ("__import__('os').system('echo PWNED')",)) ++ ++ with open(file_path, "wb") as f: ++ pickle.dump(EvalPayload(), f, pickle.HIGHEST_PROTOCOL) ++ ++ jar = CookieJar() ++ with pytest.raises(pickle.UnpicklingError, match="Forbidden class"): ++ jar.load(file_path) ++ ++ ++async def test_load_rejects_subprocess_payload(tmp_path: Path) -> None: ++ """Verify CookieJar.load() blocks subprocess-based pickle payloads.""" ++ import subprocess ++ ++ file_path = tmp_path / "subprocess_payload.pkl" ++ ++ class SubprocessPayload: ++ def __reduce__(self) -> tuple[object, ...]: ++ return (subprocess.call, (["echo", "PWNED"],)) ++ ++ with open(file_path, "wb") as f: ++ pickle.dump(SubprocessPayload(), f, pickle.HIGHEST_PROTOCOL) ++ ++ jar = CookieJar() ++ with pytest.raises(pickle.UnpicklingError, match="Forbidden class"): ++ jar.load(file_path) ++ ++ ++async def test_load_falls_back_to_pickle( ++ tmp_path: Path, ++ cookies_to_receive: SimpleCookie, ++) -> None: ++ """Verify load() falls back to restricted pickle for legacy cookie files. ++ ++ Existing cookie files saved with older versions of aiohttp used pickle. ++ load() should detect that the file is not JSON and fall back to the ++ restricted pickle unpickler for backward compatibility. ++ """ ++ file_path = tmp_path / "legit.pkl" ++ ++ # Write a legacy pickle file directly (as old aiohttp save() would) ++ jar_save = CookieJar() ++ jar_save.update_cookies(cookies_to_receive) ++ with file_path.open(mode="wb") as f: ++ pickle.dump(jar_save._cookies, f, pickle.HIGHEST_PROTOCOL) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ jar_test = SimpleCookie() ++ for cookie in jar_load: ++ jar_test[cookie.key] = cookie ++ ++ assert jar_test == cookies_to_receive ++ ++ ++async def test_save_load_json_roundtrip( ++ tmp_path: Path, ++ cookies_to_receive: SimpleCookie, ++) -> None: ++ """Verify save/load roundtrip preserves cookies via JSON format.""" ++ file_path = tmp_path / "cookies.json" ++ ++ jar_save = CookieJar() ++ jar_save.update_cookies(cookies_to_receive) ++ jar_save.save(file_path=file_path) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ saved_cookies = SimpleCookie() ++ for cookie in jar_save: ++ saved_cookies[cookie.key] = cookie ++ ++ loaded_cookies = SimpleCookie() ++ for cookie in jar_load: ++ loaded_cookies[cookie.key] = cookie ++ ++ assert saved_cookies == loaded_cookies ++ ++ ++async def test_save_load_json_partitioned_cookies(tmp_path: Path) -> None: ++ """Verify save/load roundtrip works with partitioned cookies.""" ++ file_path = tmp_path / "partitioned.json" ++ ++ jar_save = CookieJar() ++ jar_save.update_cookies_from_headers( ++ ["session=cookie; Partitioned"], URL("https://example.com/") ++ ) ++ jar_save.save(file_path=file_path) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ # Compare individual cookie values (same approach as test_save_load_partitioned_cookies) ++ saved = list(jar_save) ++ loaded = list(jar_load) ++ assert len(saved) == len(loaded) ++ for s, lo in zip(saved, loaded): ++ assert s.key == lo.key ++ assert s.value == lo.value ++ assert s["domain"] == lo["domain"] ++ assert s["path"] == lo["path"] ++ ++ ++async def test_json_format_is_safe(tmp_path: Path) -> None: ++ """Verify the JSON file format cannot execute code on load.""" ++ import json ++ ++ file_path = tmp_path / "safe.json" ++ ++ # Write something that might look dangerous but is just data ++ malicious_data = { ++ "evil.com|/": { ++ "session": { ++ "key": "session", ++ "value": "__import__('os').system('echo PWNED')", ++ "coded_value": "__import__('os').system('echo PWNED')", ++ } ++ } ++ } ++ with open(file_path, "w") as f: ++ json.dump(malicious_data, f) ++ ++ jar = CookieJar() ++ jar.load(file_path=file_path) ++ ++ # The "malicious" string is just a cookie value, not executed code ++ cookies = list(jar) ++ assert len(cookies) == 1 ++ assert cookies[0].value == "__import__('os').system('echo PWNED')" ++ ++ ++async def test_save_load_json_secure_cookies(tmp_path: Path) -> None: ++ """Verify save/load preserves Secure and HttpOnly flags.""" ++ file_path = tmp_path / "secure.json" ++ ++ jar_save = CookieJar() ++ jar_save.update_cookies_from_headers( ++ ["token=abc123; Secure; HttpOnly; Path=/; Domain=example.com"], ++ URL("https://example.com/"), ++ ) ++ jar_save.save(file_path=file_path) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ loaded_cookies = list(jar_load) ++ assert len(loaded_cookies) == 1 ++ cookie = loaded_cookies[0] ++ assert cookie.key == "token" ++ assert cookie.value == "abc123" ++ assert cookie["secure"] is True ++ assert cookie["httponly"] is True ++ assert cookie["domain"] == "example.com"
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +4 -0
@@ -6,6 +6,10 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=748073912af33aa59430d3702aa32d41" SRC_URI[sha256sum] = "9d98cc980ecc96be6eb4c1994ce35d28d8b1f5e5208a23b421187d1209dbb7d1" +SRC_URI += " \ + file://CVE-2026-34993.patch \ +" + CVE_PRODUCT = "aiohttp" CVE_STATUS_GROUPS = "CVE_AIOHTTP_FIX_3_13_4" CVE_AIOHTTP_FIX_3_13_4[status] = "fixed-version: fixed in 3.13.4"
Signature · 1 line
2.35.6
PATCH 2/10 python3-aiohttp: fix CVE-2026-47265
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/f54c40851b0d6c4bbdab97ba518a223adda32478
[2] https://github.com/advisories/GHSA-hg6j-4rv6-33pg
--- .../python3-aiohttp/CVE-2026-47265.patch | 64 +++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 65 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-47265.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-47265.patch new file +64 -0
@@ -0,0 +1,64 @@ +From 54aaf333cfe59f62d01ed06c8951da268ab2fb18 Mon Sep 17 00:00:00 2001 +From: Sam Bull <[email protected]> +Date: Tue, 19 May 2026 01:23:00 +0100 +Subject: [PATCH] Drop cookies on redirect (#12550) (#12640) + +CVE: CVE-2026-47265 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/f54c40851b0d6c4bbdab97ba518a223adda32478] + +(cherry picked from commit d57efb05f5073071ceb2d3b35d72d9d0bc4512a2) +(cherry picked from commit f54c40851b0d6c4bbdab97ba518a223adda32478) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12540.bugfix.rst | 1 + + aiohttp/client.py | 1 + + tests/test_client_functional.py | 16 ++++++++++++++-- + 3 files changed, 16 insertions(+), 2 deletions(-) + create mode 100644 CHANGES/12540.bugfix.rst + +diff --git a/CHANGES/12540.bugfix.rst b/CHANGES/12540.bugfix.rst +new file mode 100644 +index 000000000..dfd98129e +--- /dev/null ++++ b/CHANGES/12540.bugfix.rst +@@ -0,0 +1 @@ ++Fixed per-request ``cookies`` not being dropped on cross-origin redirects -- by :user:`Dreamsorcerer`. +diff --git a/aiohttp/client.py b/aiohttp/client.py +index 5d10d3e43..0637eff6b 100644 +--- a/aiohttp/client.py ++++ b/aiohttp/client.py +@@ -892,6 +892,7 @@ class ClientSession: + + if url.origin() != redirect_origin: + auth = None ++ cookies = None + headers.pop(hdrs.AUTHORIZATION, None) + headers.pop(hdrs.COOKIE, None) + headers.pop(hdrs.PROXY_AUTHORIZATION, None) +diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py +index 118ce19ca..ea31567c4 100644 +--- a/tests/test_client_functional.py ++++ b/tests/test_client_functional.py +@@ -3564,8 +3564,20 @@ async def test_auth_persist_on_redirect_to_other_host_with_global_auth( + async with aiohttp.ClientSession( + connector=connector, auth=aiohttp.BasicAuth("user", "pass") + ) as client: +- resp = await client.get(url_from) +- assert resp.status == 200 ++ async with client.get( ++ url_from, ++ headers={ ++ "Proxy-Authorization": "Basic dXNlcjpwYXNz", ++ "Cookie": "a=b", ++ }, ++ ) as resp: ++ assert resp.status == 200 ++ async with client.get( ++ url_from, ++ headers={"Proxy-Authorization": "Basic dXNlcjpwYXNz"}, ++ cookies={"a": "b"}, ++ ) as resp: ++ assert resp.status == 200 + + + async def test_drop_auth_on_redirect_to_other_host_with_global_auth_and_base_url(
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -8,6 +8,7 @@ SRC_URI[sha256sum] = "9d98cc980ecc96be6eb4c1994ce35d28d8b1f5e5208a23b421187d1209 SRC_URI += " \ file://CVE-2026-34993.patch \ + file://CVE-2026-47265.patch \ " CVE_PRODUCT = "aiohttp"
Signature · 1 line
2.35.6
PATCH 3/10 python3-aiohttp: fix CVE-2026-50269
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/bf88077ebb14f4c29924b8e8904cba20c55c28b8
[2] https://github.com/advisories/GHSA-m6qw-4cw2-hm4m
--- .../python3-aiohttp/CVE-2026-50269.patch | 81 +++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 82 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-50269.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-50269.patch new file +81 -0
@@ -0,0 +1,81 @@ +From 7fb9ddce2c1a376ef46f9ec2195e5d75db60c227 Mon Sep 17 00:00:00 2001 +From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> +Date: Thu, 28 May 2026 23:57:41 +0100 +Subject: [PATCH] [PR #12719/879d48d1 backport][3.14] Reject invalid bytes in + multipart/payload headers (#12720) + +**This is a backport of PR #12719 as merged into master +(879d48d1619b9bc3662037afcb8bfa790a205e9b).** + +CVE: CVE-2026-50269 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/bf88077ebb14f4c29924b8e8904cba20c55c28b8] + +Co-authored-by: Sam Bull <[email protected]> +(cherry picked from commit bf88077ebb14f4c29924b8e8904cba20c55c28b8) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12706.bugfix.rst | 1 + + aiohttp/payload.py | 8 +++++--- + tests/test_payload.py | 15 +++++++++++++++ + 3 files changed, 21 insertions(+), 3 deletions(-) + create mode 100644 CHANGES/12706.bugfix.rst + +diff --git a/CHANGES/12706.bugfix.rst b/CHANGES/12706.bugfix.rst +new file mode 100644 +index 000000000..9248585f9 +--- /dev/null ++++ b/CHANGES/12706.bugfix.rst +@@ -0,0 +1 @@ ++Fixed invalid bytes being allowed in multipart/payload headers -- by :user:`Dreamsorcerer`. +diff --git a/aiohttp/payload.py b/aiohttp/payload.py +index 5b88fa094..23d127056 100644 +--- a/aiohttp/payload.py ++++ b/aiohttp/payload.py +@@ -35,6 +35,7 @@ from .helpers import ( + parse_mimetype, + sentinel, + ) ++from .http_writer import _safe_header + from .streams import StreamReader + from .typedefs import JSONEncoder, _CIMultiDict + +@@ -209,9 +210,10 @@ class Payload(ABC): + @property + def _binary_headers(self) -> bytes: + return ( +- "".join([k + ": " + v + "\r\n" for k, v in self.headers.items()]).encode( +- "utf-8" +- ) ++ "".join( ++ _safe_header(k) + ": " + _safe_header(v) + "\r\n" ++ for k, v in self.headers.items() ++ ).encode("utf-8") + + b"\r\n" + ) + +diff --git a/tests/test_payload.py b/tests/test_payload.py +index 9aa97b20d..b60aa7e7c 100644 +--- a/tests/test_payload.py ++++ b/tests/test_payload.py +@@ -101,6 +101,21 @@ def test_payload_content_type() -> None: + assert p.content_type == "application/json" + + [email protected]("bad_byte", ("\r", "\n", "\x00")) ++def test_binary_headers_reject_injection_in_value(bad_byte: str) -> None: ++ p = Payload("test", headers={"X-Custom": f"value{bad_byte}Injected: bad"}) ++ with pytest.raises(ValueError, match="header injection"): ++ p._binary_headers ++ ++ [email protected]("bad_byte", ("\r", "\n", "\x00")) ++def test_binary_headers_reject_injection_in_name(bad_byte: str) -> None: ++ p = Payload("test") ++ p.headers[f"X-Custom{bad_byte}Injected"] = "value" ++ with pytest.raises(ValueError, match="header injection"): ++ p._binary_headers ++ ++ + def test_bytes_payload_default_content_type() -> None: + p = payload.BytesPayload(b"data") + assert p.content_type == "application/octet-stream"
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -9,6 +9,7 @@ SRC_URI[sha256sum] = "9d98cc980ecc96be6eb4c1994ce35d28d8b1f5e5208a23b421187d1209 SRC_URI += " \ file://CVE-2026-34993.patch \ file://CVE-2026-47265.patch \ + file://CVE-2026-50269.patch \ " CVE_PRODUCT = "aiohttp"
Signature · 1 line
2.35.6
PATCH 4/10 python3-aiohttp: fix CVE-2026-54274
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/14b6ee851fb16ec199acb950de0c82d476799e7d
[2] https://github.com/advisories/GHSA-xcgm-r5h9-7989
--- .../python3-aiohttp/CVE-2026-54274.patch | 182 ++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 183 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54274.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54274.patch new file +182 -0
@@ -0,0 +1,182 @@ +From f971aaedd8dc9cab84f09b97a412744084115113 Mon Sep 17 00:00:00 2001 +From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> +Date: Sat, 6 Jun 2026 00:05:19 +0100 +Subject: [PATCH] [PR #12817/69344c6e backport][3.14] Improve websocket checks + (#12818) + +**This is a backport of PR #12817 as merged into master +(69344c6efa3e5dd80b1c88079fa06d4e902a3b83).** + +CVE: CVE-2026-54274 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/14b6ee851fb16ec199acb950de0c82d476799e7d] + +Co-authored-by: Sam Bull <[email protected]> +(cherry picked from commit 14b6ee851fb16ec199acb950de0c82d476799e7d) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12817.bugfix.rst | 1 + + aiohttp/_websocket/reader_py.py | 42 +++++++++++++------- + tests/test_websocket_parser.py | 68 +++++++++++++++++++++++++++++++++ + 3 files changed, 98 insertions(+), 13 deletions(-) + create mode 100644 CHANGES/12817.bugfix.rst + +diff --git a/CHANGES/12817.bugfix.rst b/CHANGES/12817.bugfix.rst +new file mode 100644 +index 000000000..c8a35e309 +--- /dev/null ++++ b/CHANGES/12817.bugfix.rst +@@ -0,0 +1 @@ ++Tightened up some websocket parser checks -- by :user:`Dreamsorcerer`. +diff --git a/aiohttp/_websocket/reader_py.py b/aiohttp/_websocket/reader_py.py +index 5166d7ec2..16c5f3be6 100644 +--- a/aiohttp/_websocket/reader_py.py ++++ b/aiohttp/_websocket/reader_py.py +@@ -202,12 +202,6 @@ class WebSocketReader: + if opcode != OP_CODE_CONTINUATION: + self._opcode = opcode + self._partial += payload +- if self._max_msg_size and len(self._partial) >= self._max_msg_size: +- raise WebSocketError( +- WSCloseCode.MESSAGE_TOO_BIG, +- f"Message size {len(self._partial)} " +- f"exceeds limit {self._max_msg_size}", +- ) + return + + has_partial = bool(self._partial) +@@ -230,13 +224,6 @@ class WebSocketReader: + else: + assembled_payload = payload + +- if self._max_msg_size and len(assembled_payload) >= self._max_msg_size: +- raise WebSocketError( +- WSCloseCode.MESSAGE_TOO_BIG, +- f"Message size {len(assembled_payload)} " +- f"exceeds limit {self._max_msg_size}", +- ) +- + # Decompress process must to be done after all packets + # received. + if compressed: +@@ -361,6 +348,19 @@ class WebSocketReader: + "Received frame with non-zero reserved bits", + ) + ++ if opcode not in { ++ OP_CODE_CONTINUATION, ++ OP_CODE_TEXT, ++ OP_CODE_BINARY, ++ OP_CODE_CLOSE, ++ OP_CODE_PING, ++ OP_CODE_PONG, ++ }: ++ raise WebSocketError( ++ WSCloseCode.PROTOCOL_ERROR, ++ f"Unexpected opcode={opcode!r}", ++ ) ++ + if opcode > 0x7 and fin == 0: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, +@@ -413,6 +413,22 @@ class WebSocketReader: + else: + self._payload_bytes_to_read = len_flag + ++ # Reject oversized data frames before buffering any payload ++ # bytes. Control frames are capped at 125 bytes (checked in ++ # READ_HEADER) so only text/binary/continuation need this. ++ if self._max_msg_size and self._frame_opcode in { ++ OP_CODE_TEXT, ++ OP_CODE_BINARY, ++ OP_CODE_CONTINUATION, ++ }: ++ projected_size = self._payload_bytes_to_read + len(self._partial) ++ if projected_size >= self._max_msg_size: ++ raise WebSocketError( ++ WSCloseCode.MESSAGE_TOO_BIG, ++ f"Message size {projected_size} " ++ f"exceeds limit {self._max_msg_size}", ++ ) ++ + self._state = READ_PAYLOAD_MASK if self._has_mask else READ_PAYLOAD + + # read payload mask +diff --git a/tests/test_websocket_parser.py b/tests/test_websocket_parser.py +index 603310958..3a283e0a3 100644 +--- a/tests/test_websocket_parser.py ++++ b/tests/test_websocket_parser.py +@@ -643,6 +643,74 @@ def test_compressed_msg_too_large(out) -> None: + assert ctx.value.code == WSCloseCode.MESSAGE_TOO_BIG + + [email protected]("fin", (0x80, 0x00), ids=("fin", "non-fin")) ++def test_msg_too_large_at_header(out: WebSocketDataQueue, fin: int) -> None: ++ max_msg_size = 256 ++ parser = WebSocketReader(out, max_msg_size, compress=False) ++ ++ # Header alone: TEXT, 64-bit length, declares 1 MiB of payload. ++ header = PACK_LEN3(fin | WSMsgType.TEXT, 127, 1024 * 1024) ++ with pytest.raises( ++ WebSocketError, match=r"^Message size 1048576 exceeds limit 256$" ++ ) as ctx: ++ parser._feed_data(header) ++ assert ctx.value.code == WSCloseCode.MESSAGE_TOO_BIG ++ ++ ++def test_msg_too_large_across_fragments(out: WebSocketDataQueue) -> None: ++ # Individual fragments fit under max_msg_size but accumulate past it. ++ max_msg_size = 256 ++ parser = WebSocketReader(out, max_msg_size, compress=False) ++ ++ first = build_frame(b"a" * 100, WSMsgType.TEXT, is_fin=False) ++ parser._feed_data(first) ++ middle = build_frame(b"b" * 100, WSMsgType.CONTINUATION, is_fin=False) ++ parser._feed_data(middle) ++ ++ # Third 100-byte fragment would push the accumulated total to 300. ++ last = build_frame(b"c" * 100, WSMsgType.CONTINUATION, is_fin=False) ++ with pytest.raises( ++ WebSocketError, match=r"^Message size 300 exceeds limit 256$" ++ ) as ctx: ++ parser._feed_data(last) ++ assert ctx.value.code == WSCloseCode.MESSAGE_TOO_BIG ++ ++ ++def test_msg_too_large_text_after_non_fin_text(out: WebSocketDataQueue) -> None: ++ # Protocol-violating sequence: a fresh TEXT arrives while a fragmented ++ # message is still open. ++ max_msg_size = 256 ++ parser = WebSocketReader(out, max_msg_size, compress=False) ++ ++ first = build_frame(b"a" * 200, WSMsgType.TEXT, is_fin=False) ++ parser._feed_data(first) ++ ++ # Second TEXT header alone announces 100 bytes; 100 + 200 partial = 300. ++ second_header = PACK_LEN1(WSMsgType.TEXT, 100) ++ with pytest.raises( ++ WebSocketError, match=r"^Message size 300 exceeds limit 256$" ++ ) as ctx: ++ parser._feed_data(second_header) ++ assert ctx.value.code == WSCloseCode.MESSAGE_TOO_BIG ++ ++ [email protected]( ++ "opcode", ++ (0x3, 0x4, 0x5, 0x6, 0x7, 0xB, 0xC, 0xD, 0xE, 0xF), ++ ids=lambda v: f"0x{v:x}", ++) ++def test_reserved_opcode_rejected_at_header( ++ out: WebSocketDataQueue, opcode: int ++) -> None: ++ # RFC 6455 reserves opcodes 0x3-0x7 (non-control) and 0xB-0xF (control). ++ parser = WebSocketReader(out, max_msg_size=256, compress=False) ++ ++ header = PACK_LEN3(0x80 | opcode, 127, 1024 * 1024) ++ with pytest.raises(WebSocketError, match=rf"^Unexpected opcode={opcode}$") as ctx: ++ parser._feed_data(header) ++ assert ctx.value.code == WSCloseCode.PROTOCOL_ERROR ++ ++ + class TestWebSocketError: + def test_ctor(self) -> None: + err = WebSocketError(WSCloseCode.PROTOCOL_ERROR, "Something invalid")
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -10,6 +10,7 @@ SRC_URI += " \ file://CVE-2026-34993.patch \ file://CVE-2026-47265.patch \ file://CVE-2026-50269.patch \ + file://CVE-2026-54274.patch \ " CVE_PRODUCT = "aiohttp"
Signature · 1 line
2.35.6
PATCH 5/10 python3-aiohttp: fix CVE-2026-54275
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/0ca2b6c28a25726527a8b60f25960262a91ed0e0
[2] https://github.com/advisories/GHSA-4m7w-qmgq-4wj5
--- .../python3-aiohttp/CVE-2026-54275.patch | 115 ++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 116 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54275.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54275.patch new file +115 -0
@@ -0,0 +1,115 @@ +From 23328dc1950071dd1e05ac6aeb631874ef94afe3 Mon Sep 17 00:00:00 2001 +From: "J. Nick Koston" <[email protected]> +Date: Sun, 7 Jun 2026 00:30:30 -0500 +Subject: [PATCH] [PR #12835/1e94b3e8 backport][3.14] Tls server hostname pool + key (#12847) + +CVE: CVE-2026-54275 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/0ca2b6c28a25726527a8b60f25960262a91ed0e0] + +(cherry picked from commit 0ca2b6c28a25726527a8b60f25960262a91ed0e0) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12835.bugfix.rst | 1 + + aiohttp/client_reqrep.py | 2 ++ + tests/test_client_functional.py | 31 +++++++++++++++++++++++++++++++ + tests/test_client_request.py | 16 ++++++++++++++++ + 4 files changed, 50 insertions(+) + create mode 100644 CHANGES/12835.bugfix.rst + +diff --git a/CHANGES/12835.bugfix.rst b/CHANGES/12835.bugfix.rst +new file mode 100644 +index 000000000..84a8ae006 +--- /dev/null ++++ b/CHANGES/12835.bugfix.rst +@@ -0,0 +1 @@ ++Included the per-request ``server_hostname`` override in the :class:`~aiohttp.TCPConnector` connection pool key, so a pooled TLS connection is no longer reused for a request that sets ``server_hostname`` to a different value -- by :user:`bdraco`. +diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py +index a9e079589..5fe83fa88 100644 +--- a/aiohttp/client_reqrep.py ++++ b/aiohttp/client_reqrep.py +@@ -255,6 +255,7 @@ class ConnectionKey(NamedTuple): + proxy: Optional[URL] + proxy_auth: Optional[BasicAuth] + proxy_headers_hash: Optional[int] # hash(CIMultiDict) ++ server_hostname: str | None = None + + + def _is_expected_content_type( +@@ -964,6 +965,7 @@ class ClientRequest: + self.proxy, + self.proxy_auth, + h, ++ self.server_hostname, + ), + ) + +diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py +index ea31567c4..60caf6e2a 100644 +--- a/tests/test_client_functional.py ++++ b/tests/test_client_functional.py +@@ -720,6 +720,37 @@ async def test_ssl_client( + assert txt == "Test message" + + ++async def test_server_hostname_override_not_reused( ++ aiohttp_server: AiohttpServer, ++) -> None: ++ """A pooled TLS connection must not be reused for a different server_hostname.""" ++ trustme = pytest.importorskip("trustme") ++ ++ ca = trustme.CA() ++ cert = ca.issue_cert("first.example") ++ server_ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) ++ cert.configure_cert(server_ctx) ++ client_ctx = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH) ++ ca.configure_trust(client_ctx) ++ ++ async def handler(request: web.Request) -> web.Response: ++ return web.Response(text="ok") ++ ++ app = web.Application() ++ app.router.add_route("GET", "/", handler) ++ server = await aiohttp_server(app, ssl=server_ctx) ++ url = server.make_url("/") ++ ++ connector = aiohttp.TCPConnector(ssl=client_ctx, limit=1, limit_per_host=1) ++ async with aiohttp.ClientSession(connector=connector) as session: ++ async with session.get(url, server_hostname="first.example") as resp: ++ assert resp.status == 200 ++ await resp.read() ++ ++ with pytest.raises(aiohttp.ClientConnectorCertificateError): ++ await session.get(url, server_hostname="second.example") ++ ++ + @pytest.mark.skipif( + sys.version_info < (3, 11), reason="ssl_shutdown_timeout requires Python 3.11+" + ) +diff --git a/tests/test_client_request.py b/tests/test_client_request.py +index e3cdc1c62..4c91245a5 100644 +--- a/tests/test_client_request.py ++++ b/tests/test_client_request.py +@@ -1611,6 +1611,22 @@ async def test_connection_key_without_proxy() -> None: + await req.close() + + ++async def test_connection_key_includes_server_hostname( ++ make_request: _RequestMaker, ++) -> None: ++ """A server_hostname override must be part of the connection reuse key.""" ++ url = URL("https://127.0.0.1:8443/") ++ none_req = make_request("GET", url) ++ first = make_request("GET", url, server_hostname="first.example") ++ first_again = make_request("GET", url, server_hostname="first.example") ++ second = make_request("GET", url, server_hostname="second.example") ++ ++ assert first.connection_key.server_hostname == "first.example" ++ assert first.connection_key != none_req.connection_key ++ assert first.connection_key != second.connection_key ++ assert first.connection_key == first_again.connection_key ++ ++ + def test_request_info_back_compat() -> None: + """Test RequestInfo can be created without real_url.""" + url = URL("http://example.com")
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -11,6 +11,7 @@ SRC_URI += " \ file://CVE-2026-47265.patch \ file://CVE-2026-50269.patch \ file://CVE-2026-54274.patch \ + file://CVE-2026-54275.patch \ " CVE_PRODUCT = "aiohttp"
Signature · 1 line
2.35.6
PATCH 6/10 python3-aiohttp: fix CVE-2026-54276
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/38d16060037e1bfcd6d677abababa3c2a4bb58fa
[2] https://github.com/advisories/GHSA-hpj7-wq8m-9hgp
--- .../python3-aiohttp/CVE-2026-54276.patch | 287 ++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 288 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54276.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54276.patch new file +287 -0
@@ -0,0 +1,287 @@ +From cc464f0ffe7ac8054f3992f8f53bb78b66632aca Mon Sep 17 00:00:00 2001 +From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> +Date: Sun, 7 Jun 2026 00:30:39 -0500 +Subject: [PATCH] [PR #12825/cb1d6a53 backport][3.14] Scope + DigestAuthMiddleware credentials to the request origin (#12839) + +CVE: CVE-2026-54276 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/38d16060037e1bfcd6d677abababa3c2a4bb58fa] + +Co-authored-by: J. Nick Koston <[email protected]> +Co-authored-by: J. Nick Koston <[email protected]> +(cherry picked from commit 38d16060037e1bfcd6d677abababa3c2a4bb58fa) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12825.bugfix.rst | 1 + + aiohttp/client_middleware_digest_auth.py | 21 +++ + docs/client_reference.rst | 14 ++ + tests/test_client_middleware_digest_auth.py | 170 ++++++++++++++++++++ + 4 files changed, 206 insertions(+) + create mode 100644 CHANGES/12825.bugfix.rst + +diff --git a/CHANGES/12825.bugfix.rst b/CHANGES/12825.bugfix.rst +new file mode 100644 +index 000000000..88d1bfe8c +--- /dev/null ++++ b/CHANGES/12825.bugfix.rst +@@ -0,0 +1 @@ ++Scoped :class:`~aiohttp.DigestAuthMiddleware` credentials to the origin of the first request it handles, so a redirect to a different origin no longer triggers a digest response computed from the configured credentials; a challenge from another origin is only answered when that origin falls within a protection space advertised by the anchor origin through the RFC 7616 ``domain`` directive -- by :user:`bdraco`. +diff --git a/aiohttp/client_middleware_digest_auth.py b/aiohttp/client_middleware_digest_auth.py +index d7f2f1eb9..a818e57cd 100644 +--- a/aiohttp/client_middleware_digest_auth.py ++++ b/aiohttp/client_middleware_digest_auth.py +@@ -171,6 +171,15 @@ class DigestAuthMiddleware: + - Includes replay attack protection with client nonce count tracking + - Supports preemptive authentication per RFC 7616 Section 3.6 + ++ Origin scoping: ++ The credentials are scoped to the origin of the first request the ++ middleware handles. A request to a different origin is passed through ++ untouched, so it never receives a digest response computed from those ++ credentials, unless that origin falls within a protection space the ++ anchor origin advertised through the RFC 7616 ``domain`` directive. Make ++ the first request through the middleware against the intended origin, as ++ the anchor is pinned to it and not reset for the life of the instance. ++ + Standards compliance: + - RFC 7616: HTTP Digest Access Authentication (primary reference) + - RFC 2617: HTTP Authentication (deprecated by RFC 7616) +@@ -207,6 +216,8 @@ class DigestAuthMiddleware: + self._preemptive: bool = preemptive + # Set of URLs defining the protection space + self._protection_space: List[str] = [] ++ # Origin the credentials are scoped to; set on the first request. ++ self._origin: URL | None = None + + async def _encode( + self, method: str, url: URL, body: Union[Payload, Literal[b""]] +@@ -454,6 +465,16 @@ class DigestAuthMiddleware: + self, request: ClientRequest, handler: ClientHandlerType + ) -> ClientResponse: + """Run the digest auth middleware.""" ++ # Credentials are scoped to the first request's origin. Other origins ++ # pass through untouched unless a challenge from the anchor origin ++ # advertised them via RFC 7616 domain; mirrors aiohttp stripping ++ # Authorization on cross-origin redirects. ++ origin = request.url.origin() ++ if self._origin is None: ++ self._origin = origin ++ elif origin != self._origin and not self._in_protection_space(request.url): ++ return await handler(request) ++ + response = None + for retry_count in range(2): + # Apply authorization header if: +diff --git a/docs/client_reference.rst b/docs/client_reference.rst +index 374796f40..63ee375ca 100644 +--- a/docs/client_reference.rst ++++ b/docs/client_reference.rst +@@ -2367,6 +2367,16 @@ Utilities + The server may still respond with a 401 status and ``stale=true`` if the nonce + has expired, in which case the middleware will automatically retry with the new nonce. + ++ **Origin scoping** ++ ++ The credentials are scoped to the origin of the first request the middleware ++ handles. A request to a different origin is passed through untouched, so it ++ never receives a digest response computed from those credentials, unless that ++ origin falls within a protection space the anchor origin advertised through ++ the RFC 7616 ``domain`` directive. Make the first request through the ++ middleware against the intended origin, as the anchor is pinned to it and not ++ reset for the life of the instance. ++ + To disable preemptive authentication and require a 401 challenge for every request, + set ``preemptive=False``:: + +@@ -2392,6 +2402,10 @@ Utilities + .. versionadded:: 3.12 + .. versionchanged:: 3.12.8 + Added ``preemptive`` parameter to enable/disable preemptive authentication. ++ .. versionchanged:: 3.14.1 ++ Credentials are scoped to the origin of the first request the middleware ++ handles; other origins are passed through untouched unless covered by an ++ RFC 7616 ``domain`` directive from the anchor origin. + + + .. class:: CookieJar(*, unsafe=False, quote_cookie=True, treat_as_secure_origin = []) +diff --git a/tests/test_client_middleware_digest_auth.py b/tests/test_client_middleware_digest_auth.py +index 65e7d667e..03fab2691 100644 +--- a/tests/test_client_middleware_digest_auth.py ++++ b/tests/test_client_middleware_digest_auth.py +@@ -1156,6 +1156,176 @@ async def test_preemptive_auth_without_domain_uses_origin( + ) # Second request - preemptive auth (entire origin) + + ++async def test_does_not_answer_cross_origin_redirect_challenge( ++ aiohttp_server: AiohttpServer, ++) -> None: ++ """A cross-origin redirect target must not receive a digest response. ++ ++ aiohttp strips the Authorization header on cross-origin redirects; the ++ digest middleware must not re-add one for the redirect target, otherwise ++ the configured credentials leak to an origin the caller never targeted. ++ """ ++ target_auth_headers: list[str | None] = [] ++ ++ async def target_handler(request: Request) -> Response: ++ auth_header = request.headers.get(hdrs.AUTHORIZATION) ++ target_auth_headers.append(auth_header) ++ assert auth_header is None ++ return Response( ++ status=401, ++ headers={ ++ hdrs.WWW_AUTHENTICATE: 'Digest realm="evil", nonce="cross-origin"' ++ }, ++ ) ++ ++ target_app = Application() ++ target_app.router.add_get("/", target_handler) ++ target_server = await aiohttp_server(target_app) ++ ++ async def source_handler(request: Request) -> Response: ++ return Response( ++ status=302, headers={hdrs.LOCATION: str(target_server.make_url("/"))} ++ ) ++ ++ source_app = Application() ++ source_app.router.add_get("/", source_handler) ++ source_server = await aiohttp_server(source_app) ++ ++ digest_auth = DigestAuthMiddleware("victim", "secret") ++ async with ( ++ ClientSession(middlewares=(digest_auth,)) as session, ++ session.get(source_server.make_url("/")) as response, ++ ): ++ await response.text() ++ ++ assert target_auth_headers == [None] ++ ++ ++async def test_answers_same_origin_redirect_challenge( ++ aiohttp_server: AiohttpServer, ++) -> None: ++ """A same-origin redirect that issues a challenge must still authenticate.""" ++ auth_headers: list[str | None] = [] ++ ++ async def handler(request: Request) -> Response: ++ if request.path == "/start": ++ return Response(status=302, headers={hdrs.LOCATION: "/protected"}) ++ auth_header = request.headers.get(hdrs.AUTHORIZATION) ++ auth_headers.append(auth_header) ++ if auth_header is None: ++ return Response( ++ status=401, ++ headers={hdrs.WWW_AUTHENTICATE: 'Digest realm="good", nonce="abc"'}, ++ ) ++ return Response(text="OK") ++ ++ app = Application() ++ app.router.add_get("/start", handler) ++ app.router.add_get("/protected", handler) ++ server = await aiohttp_server(app) ++ ++ digest_auth = DigestAuthMiddleware("user", "pass") ++ async with ( ++ ClientSession(middlewares=(digest_auth,)) as session, ++ session.get(server.make_url("/start")) as response, ++ ): ++ assert response.status == 200 ++ assert await response.text() == "OK" ++ ++ assert auth_headers[0] is None ++ assert auth_headers[1] is not None ++ assert auth_headers[1].startswith("Digest") ++ ++ ++async def test_answers_cross_origin_within_domain_protection_space( ++ aiohttp_server: AiohttpServer, ++) -> None: ++ """A different origin advertised via the ``domain`` directive is honored. ++ ++ RFC 7616 allows a challenge to define a protection space spanning other ++ servers through the ``domain`` directive. The anchor origin vouches for ++ those URIs, so preemptive auth to them is expected. ++ """ ++ other_auth_headers: list[str | None] = [] ++ ++ async def other_handler(request: Request) -> Response: ++ other_auth_headers.append(request.headers.get(hdrs.AUTHORIZATION)) ++ return Response(text="other") ++ ++ other_app = Application() ++ other_app.router.add_get("/", other_handler) ++ other_server = await aiohttp_server(other_app) ++ other_origin = str(other_server.make_url("/").origin()) ++ ++ async def anchor_handler(request: Request) -> Response: ++ if request.headers.get(hdrs.AUTHORIZATION) is None: ++ challenge = f'Digest realm="anchor", nonce="n1", domain="{other_origin}/"' ++ return Response(status=401, headers={hdrs.WWW_AUTHENTICATE: challenge}) ++ return Response(text="anchor") ++ ++ anchor_app = Application() ++ anchor_app.router.add_get("/", anchor_handler) ++ anchor_server = await aiohttp_server(anchor_app) ++ ++ digest_auth = DigestAuthMiddleware("user", "pass") ++ async with ClientSession(middlewares=(digest_auth,)) as session: ++ async with session.get(anchor_server.make_url("/")) as response: ++ assert response.status == 200 ++ async with session.get(other_server.make_url("/")) as response: ++ assert response.status == 200 ++ ++ assert other_auth_headers[0] is not None ++ assert other_auth_headers[0].startswith("Digest") ++ ++ ++async def test_does_not_answer_cross_origin_challenge_without_redirect( ++ aiohttp_server: AiohttpServer, ++) -> None: ++ """Origin scoping applies to any cross-origin request, not just redirects. ++ ++ After authenticating against the anchor origin, a direct request to a ++ different origin that issues its own challenge must not be answered with a ++ digest response computed from the configured credentials. ++ """ ++ other_auth_headers: list[str | None] = [] ++ ++ async def other_handler(request: Request) -> Response: ++ auth_header = request.headers.get(hdrs.AUTHORIZATION) ++ other_auth_headers.append(auth_header) ++ assert auth_header is None ++ return Response( ++ status=401, ++ headers={hdrs.WWW_AUTHENTICATE: 'Digest realm="evil", nonce="x"'}, ++ ) ++ ++ other_app = Application() ++ other_app.router.add_get("/", other_handler) ++ other_server = await aiohttp_server(other_app) ++ ++ async def anchor_handler(request: Request) -> Response: ++ if request.headers.get(hdrs.AUTHORIZATION) is None: ++ return Response( ++ status=401, ++ headers={hdrs.WWW_AUTHENTICATE: 'Digest realm="anchor", nonce="n1"'}, ++ ) ++ return Response(text="anchor") ++ ++ anchor_app = Application() ++ anchor_app.router.add_get("/", anchor_handler) ++ anchor_server = await aiohttp_server(anchor_app) ++ ++ digest_auth = DigestAuthMiddleware("user", "pass") ++ async with ClientSession(middlewares=(digest_auth,)) as session: ++ async with session.get(anchor_server.make_url("/")) as response: ++ assert response.status == 200 ++ async with session.get(other_server.make_url("/")) as response: ++ assert response.status == 401 ++ ++ # The other origin only ever saw the unauthenticated request; the ++ # middleware never answered its challenge. ++ assert other_auth_headers == [None] ++ ++ + @pytest.mark.parametrize( + ("status", "headers", "expected"), + [
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI += " \ file://CVE-2026-50269.patch \ file://CVE-2026-54274.patch \ file://CVE-2026-54275.patch \ + file://CVE-2026-54276.patch \ " CVE_PRODUCT = "aiohttp"
Signature · 1 line
2.35.6
PATCH 7/10 python3-aiohttp: fix CVE-2026-54277
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/5ab61bb4cd88f19b712f12c7c9295fe262bf804d
[2] https://github.com/advisories/GHSA-63hw-fmq6-xxg2
---
Changes in v2
- Added the corresponding generated aiohttp/_http_parser.c changes.
- Updated cb_on_url() and cb_on_status() in the generated C parser to enforce max_line_size against the accumulated parser buffer.
- Ensured the security fix is included when Wrynose builds the generated C parser without regenerating it from the patched .pyx.
- Documented the Wrynose-specific backport changes in the patch metadata.
--- .../python3-aiohttp/CVE-2026-54277.patch | 249 ++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 250 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54277.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54277.patch new file +249 -0
@@ -0,0 +1,249 @@ +From f61e8949f10a0e77ceba28a6639627e6e57bf167 Mon Sep 17 00:00:00 2001 +From: "J. Nick Koston" <[email protected]> +Date: Sun, 7 Jun 2026 00:33:03 -0500 +Subject: [PATCH] [PR #12826/36df6c13 backport][3.14] Enforce max_line_size on + fragmented request target and reason in C parser (#12837) + +CVE: CVE-2026-54277 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/5ab61bb4cd88f19b712f12c7c9295fe262bf804d] + +Backport Changes: +- Added aiohttp/_http_parser.c because Wrynose builds the + pre-generated C parser without running Cython. +- Updated cb_on_url() and cb_on_status() to enforce max_line_size + against the accumulated parser buffer. + +(cherry picked from commit 5ab61bb4cd88f19b712f12c7c9295fe262bf804d) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12826.bugfix.rst | 1 + + aiohttp/_http_parser.c | 36 ++++++++++++++++++------------------ + aiohttp/_http_parser.pyx | 4 ++-- + tests/test_http_parser.py | 22 ++++++++++++++++++++++ + 4 files changed, 43 insertions(+), 20 deletions(-) + create mode 100644 CHANGES/12826.bugfix.rst + +diff --git a/CHANGES/12826.bugfix.rst b/CHANGES/12826.bugfix.rst +new file mode 100644 +index 000000000..7e095615d +--- /dev/null ++++ b/CHANGES/12826.bugfix.rst +@@ -0,0 +1 @@ ++Fixed the C HTTP parser not enforcing ``max_line_size`` on a request target or response reason phrase that is split across multiple reads; each fragment was checked on its own, so an accumulated line could exceed the limit without raising ``LineTooLong``. The accumulated length is now checked, matching the pure-Python parser -- by :user:`bdraco`. +diff --git a/aiohttp/_http_parser.c b/aiohttp/_http_parser.c +index 911c9aa65..14c5b3350 100644 +--- a/aiohttp/_http_parser.c ++++ b/aiohttp/_http_parser.c +@@ -14760,7 +14760,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<< + * try: +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + */ + __pyx_t_1 = ((PyObject *)__pyx_v_parser->data); + __Pyx_INCREF(__pyx_t_1); +@@ -14771,7 +14771,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] + */ + { +@@ -14786,16 +14786,16 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + /* "aiohttp/_http_parser.pyx":721 + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: +- * if length > pyparser._max_line_size: # <<<<<<<<<<<<<< ++ * if len(pyparser._buf) + length > pyparser._max_line_size: # <<<<<<<<<<<<<< + * status = pyparser._buf + at[:length] + * raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) + */ +- __pyx_t_5 = (__pyx_v_length > __pyx_v_pyparser->_max_line_size); ++ __pyx_t_5 = ((__Pyx_PyByteArray_GET_SIZE(__pyx_v_pyparser->_buf) + __pyx_v_length) > __pyx_v_pyparser->_max_line_size); + if (unlikely(__pyx_t_5)) { + + /* "aiohttp/_http_parser.pyx":722 + * try: +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] # <<<<<<<<<<<<<< + * raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) + * extend(pyparser._buf, at, length) +@@ -14809,7 +14809,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + __pyx_t_6 = 0; + + /* "aiohttp/_http_parser.pyx":723 +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] + * raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) # <<<<<<<<<<<<<< + * extend(pyparser._buf, at, length) +@@ -14854,7 +14854,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + /* "aiohttp/_http_parser.pyx":721 + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: +- * if length > pyparser._max_line_size: # <<<<<<<<<<<<<< ++ * if len(pyparser._buf) + length > pyparser._max_line_size: # <<<<<<<<<<<<<< + * status = pyparser._buf + at[:length] + * raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) + */ +@@ -14878,7 +14878,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] + */ + } +@@ -14968,7 +14968,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] + */ + __pyx_L5_except_error:; +@@ -15045,7 +15045,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<< + * try: +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + */ + __pyx_t_1 = ((PyObject *)__pyx_v_parser->data); + __Pyx_INCREF(__pyx_t_1); +@@ -15056,7 +15056,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] + */ + { +@@ -15071,16 +15071,16 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + /* "aiohttp/_http_parser.pyx":736 + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: +- * if length > pyparser._max_line_size: # <<<<<<<<<<<<<< ++ * if len(pyparser._buf) + length > pyparser._max_line_size: # <<<<<<<<<<<<<< + * reason = pyparser._buf + at[:length] + * raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) + */ +- __pyx_t_5 = (__pyx_v_length > __pyx_v_pyparser->_max_line_size); ++ __pyx_t_5 = ((__Pyx_PyByteArray_GET_SIZE(__pyx_v_pyparser->_buf) + __pyx_v_length) > __pyx_v_pyparser->_max_line_size); + if (unlikely(__pyx_t_5)) { + + /* "aiohttp/_http_parser.pyx":737 + * try: +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] # <<<<<<<<<<<<<< + * raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) + * extend(pyparser._buf, at, length) +@@ -15094,7 +15094,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + __pyx_t_6 = 0; + + /* "aiohttp/_http_parser.pyx":738 +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] + * raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) # <<<<<<<<<<<<<< + * extend(pyparser._buf, at, length) +@@ -15139,7 +15139,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + /* "aiohttp/_http_parser.pyx":736 + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: +- * if length > pyparser._max_line_size: # <<<<<<<<<<<<<< ++ * if len(pyparser._buf) + length > pyparser._max_line_size: # <<<<<<<<<<<<<< + * reason = pyparser._buf + at[:length] + * raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) + */ +@@ -15163,7 +15163,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] + */ + } +@@ -15253,7 +15253,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] + */ + __pyx_L5_except_error:; +diff --git a/aiohttp/_http_parser.pyx b/aiohttp/_http_parser.pyx +index 5da835bc6..e1edee310 100644 +--- a/aiohttp/_http_parser.pyx ++++ b/aiohttp/_http_parser.pyx +@@ -718,7 +718,7 @@ cdef int cb_on_url(cparser.llhttp_t* parser, + const char *at, size_t length) except -1: + cdef HttpParser pyparser = <HttpParser>parser.data + try: +- if length > pyparser._max_line_size: ++ if len(pyparser._buf) + length > pyparser._max_line_size: + status = pyparser._buf + at[:length] + raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) + extend(pyparser._buf, at, length) +@@ -733,7 +733,7 @@ cdef int cb_on_status(cparser.llhttp_t* parser, + const char *at, size_t length) except -1: + cdef HttpParser pyparser = <HttpParser>parser.data + try: +- if length > pyparser._max_line_size: ++ if len(pyparser._buf) + length > pyparser._max_line_size: + reason = pyparser._buf + at[:length] + raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) + extend(pyparser._buf, at, length) +diff --git a/tests/test_http_parser.py b/tests/test_http_parser.py +index 25604dbcc..8cb591f20 100644 +--- a/tests/test_http_parser.py ++++ b/tests/test_http_parser.py +@@ -1272,6 +1272,17 @@ def test_http_request_max_status_line_under_limit(parser: HttpRequestParser) -> + assert msg.url == URL("/path" + path.decode()) + + ++def test_http_request_max_status_line_fragmented( ++ parser: HttpRequestParser, ++) -> None: ++ # Split an overlong request target across reads so that each callback ++ # fragment is under the limit but the accumulated target is not. ++ match = "400, message:\n Got more than 8190 bytes when reading" ++ with pytest.raises(http_exceptions.LineTooLong, match=match): ++ parser.feed_data(b"GET /" + b"a" * 8000) ++ parser.feed_data(b"a" * 8000 + b" HTTP/1.1\r\nHost: a\r\n\r\n") ++ ++ + def test_http_response_parser_utf8(response) -> None: + text = "HTTP/1.1 200 Ok\r\nx-test:тест\r\n\r\n".encode() + +@@ -1349,6 +1360,17 @@ def test_http_response_parser_status_line_under_limit( + assert msg.reason == reason.decode() + + ++def test_http_response_parser_status_line_too_long_fragmented( ++ response: HttpResponseParser, ++) -> None: ++ # Split an overlong reason phrase across reads so that each callback ++ # fragment is under the limit but the accumulated reason is not. ++ match = "400, message:\n Got more than 8190 bytes when reading" ++ with pytest.raises(http_exceptions.LineTooLong, match=match): ++ response.feed_data(b"HTTP/1.1 200 " + b"a" * 8000) ++ response.feed_data(b"a" * 8000 + b"\r\n\r\n") ++ ++ + def test_http_response_parser_bad_version(response) -> None: + with pytest.raises(http_exceptions.BadHttpMessage): + response.feed_data(b"HT/11 200 Ok\r\n\r\n") +-- +2.35.6 +
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -13,6 +13,7 @@ SRC_URI += " \ file://CVE-2026-54274.patch \ file://CVE-2026-54275.patch \ file://CVE-2026-54276.patch \ + file://CVE-2026-54277.patch \ " CVE_PRODUCT = "aiohttp"
Signature · 1 line
2.35.6
Re: [oe][meta-python][wrynose][PATCH 07/10] python3-aiohttp: fix CVE-2026-54277
Hello everyone,
Please disregard the “Changes in v2” section below, it was included inadvertently. The patch itself remains unchanged and should still be reviewed as submitted. Apologies for the confusion.
Regards,
Darsh Kelaiya
________________________________
From: Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) <[email protected]>
Sent: Tuesday, August 18, 2026 23:45
To: [email protected] <[email protected]>
Cc: xe-linux-external (Internal Group) <[email protected]>; Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) <[email protected]>
Subject: [oe][meta-python][wrynose][PATCH 07/10] python3-aiohttp: fix CVE-2026-54277
From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/5ab61bb4cd88f19b712f12c7c9295fe262bf804d
[2] https://github.com/advisories/GHSA-63hw-fmq6-xxg2
---
Changes in v2
- Added the corresponding generated aiohttp/_http_parser.c changes.
- Updated cb_on_url() and cb_on_status() in the generated C parser to enforce max_line_size against the accumulated parser buffer.
- Ensured the security fix is included when Wrynose builds the generated C parser without regenerating it from the patched .pyx.
- Documented the Wrynose-specific backport changes in the patch metadata.
--- .../python3-aiohttp/CVE-2026-54277.patch | 249 ++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 250 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54277.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54277.patch new file +249 -0
@@ -0,0 +1,249 @@ +From f61e8949f10a0e77ceba28a6639627e6e57bf167 Mon Sep 17 00:00:00 2001 +From: "J. Nick Koston" <[email protected]> +Date: Sun, 7 Jun 2026 00:33:03 -0500 +Subject: [PATCH] [PR #12826/36df6c13 backport][3.14] Enforce max_line_size on + fragmented request target and reason in C parser (#12837) + +CVE: CVE-2026-54277 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/5ab61bb4cd88f19b712f12c7c9295fe262bf804d] + +Backport Changes: +- Added aiohttp/_http_parser.c because Wrynose builds the + pre-generated C parser without running Cython. +- Updated cb_on_url() and cb_on_status() to enforce max_line_size + against the accumulated parser buffer. + +(cherry picked from commit 5ab61bb4cd88f19b712f12c7c9295fe262bf804d) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12826.bugfix.rst | 1 + + aiohttp/_http_parser.c | 36 ++++++++++++++++++------------------ + aiohttp/_http_parser.pyx | 4 ++-- + tests/test_http_parser.py | 22 ++++++++++++++++++++++ + 4 files changed, 43 insertions(+), 20 deletions(-) + create mode 100644 CHANGES/12826.bugfix.rst + +diff --git a/CHANGES/12826.bugfix.rst b/CHANGES/12826.bugfix.rst +new file mode 100644 +index 000000000..7e095615d +--- /dev/null ++++ b/CHANGES/12826.bugfix.rst +@@ -0,0 +1 @@ ++Fixed the C HTTP parser not enforcing ``max_line_size`` on a request target or response reason phrase that is split across multiple reads; each fragment was checked on its own, so an accumulated line could exceed the limit without raising ``LineTooLong``. The accumulated length is now checked, matching the pure-Python parser -- by :user:`bdraco`. +diff --git a/aiohttp/_http_parser.c b/aiohttp/_http_parser.c +index 911c9aa65..14c5b3350 100644 +--- a/aiohttp/_http_parser.c ++++ b/aiohttp/_http_parser.c +@@ -14760,7 +14760,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<< + * try: +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + */ + __pyx_t_1 = ((PyObject *)__pyx_v_parser->data); + __Pyx_INCREF(__pyx_t_1); +@@ -14771,7 +14771,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] + */ + { +@@ -14786,16 +14786,16 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + /* "aiohttp/_http_parser.pyx":721 + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: +- * if length > pyparser._max_line_size: # <<<<<<<<<<<<<< ++ * if len(pyparser._buf) + length > pyparser._max_line_size: # <<<<<<<<<<<<<< + * status = pyparser._buf + at[:length] + * raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) + */ +- __pyx_t_5 = (__pyx_v_length > __pyx_v_pyparser->_max_line_size); ++ __pyx_t_5 = ((__Pyx_PyByteArray_GET_SIZE(__pyx_v_pyparser->_buf) + __pyx_v_length) > __pyx_v_pyparser->_max_line_size); + if (unlikely(__pyx_t_5)) { + + /* "aiohttp/_http_parser.pyx":722 + * try: +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] # <<<<<<<<<<<<<< + * raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) + * extend(pyparser._buf, at, length) +@@ -14809,7 +14809,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + __pyx_t_6 = 0; + + /* "aiohttp/_http_parser.pyx":723 +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] + * raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) # <<<<<<<<<<<<<< + * extend(pyparser._buf, at, length) +@@ -14854,7 +14854,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + /* "aiohttp/_http_parser.pyx":721 + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: +- * if length > pyparser._max_line_size: # <<<<<<<<<<<<<< ++ * if len(pyparser._buf) + length > pyparser._max_line_size: # <<<<<<<<<<<<<< + * status = pyparser._buf + at[:length] + * raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) + */ +@@ -14878,7 +14878,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] + */ + } +@@ -14968,7 +14968,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(llhttp_t *__pyx_v_parser, c + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * status = pyparser._buf + at[:length] + */ + __pyx_L5_except_error:; +@@ -15045,7 +15045,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<< + * try: +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + */ + __pyx_t_1 = ((PyObject *)__pyx_v_parser->data); + __Pyx_INCREF(__pyx_t_1); +@@ -15056,7 +15056,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] + */ + { +@@ -15071,16 +15071,16 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + /* "aiohttp/_http_parser.pyx":736 + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: +- * if length > pyparser._max_line_size: # <<<<<<<<<<<<<< ++ * if len(pyparser._buf) + length > pyparser._max_line_size: # <<<<<<<<<<<<<< + * reason = pyparser._buf + at[:length] + * raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) + */ +- __pyx_t_5 = (__pyx_v_length > __pyx_v_pyparser->_max_line_size); ++ __pyx_t_5 = ((__Pyx_PyByteArray_GET_SIZE(__pyx_v_pyparser->_buf) + __pyx_v_length) > __pyx_v_pyparser->_max_line_size); + if (unlikely(__pyx_t_5)) { + + /* "aiohttp/_http_parser.pyx":737 + * try: +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] # <<<<<<<<<<<<<< + * raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) + * extend(pyparser._buf, at, length) +@@ -15094,7 +15094,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + __pyx_t_6 = 0; + + /* "aiohttp/_http_parser.pyx":738 +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] + * raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) # <<<<<<<<<<<<<< + * extend(pyparser._buf, at, length) +@@ -15139,7 +15139,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + /* "aiohttp/_http_parser.pyx":736 + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: +- * if length > pyparser._max_line_size: # <<<<<<<<<<<<<< ++ * if len(pyparser._buf) + length > pyparser._max_line_size: # <<<<<<<<<<<<<< + * reason = pyparser._buf + at[:length] + * raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) + */ +@@ -15163,7 +15163,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] + */ + } +@@ -15253,7 +15253,7 @@ static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(llhttp_t *__pyx_v_parser + * const char *at, size_t length) except -1: + * cdef HttpParser pyparser = <HttpParser>parser.data + * try: # <<<<<<<<<<<<<< +- * if length > pyparser._max_line_size: ++ * if len(pyparser._buf) + length > pyparser._max_line_size: + * reason = pyparser._buf + at[:length] + */ + __pyx_L5_except_error:; +diff --git a/aiohttp/_http_parser.pyx b/aiohttp/_http_parser.pyx +index 5da835bc6..e1edee310 100644 +--- a/aiohttp/_http_parser.pyx ++++ b/aiohttp/_http_parser.pyx +@@ -718,7 +718,7 @@ cdef int cb_on_url(cparser.llhttp_t* parser, + const char *at, size_t length) except -1: + cdef HttpParser pyparser = <HttpParser>parser.data + try: +- if length > pyparser._max_line_size: ++ if len(pyparser._buf) + length > pyparser._max_line_size: + status = pyparser._buf + at[:length] + raise LineTooLong(status[:100] + b"...", pyparser._max_line_size) + extend(pyparser._buf, at, length) +@@ -733,7 +733,7 @@ cdef int cb_on_status(cparser.llhttp_t* parser, + const char *at, size_t length) except -1: + cdef HttpParser pyparser = <HttpParser>parser.data + try: +- if length > pyparser._max_line_size: ++ if len(pyparser._buf) + length > pyparser._max_line_size: + reason = pyparser._buf + at[:length] + raise LineTooLong(reason[:100] + b"...", pyparser._max_line_size) + extend(pyparser._buf, at, length) +diff --git a/tests/test_http_parser.py b/tests/test_http_parser.py +index 25604dbcc..8cb591f20 100644 +--- a/tests/test_http_parser.py ++++ b/tests/test_http_parser.py +@@ -1272,6 +1272,17 @@ def test_http_request_max_status_line_under_limit(parser: HttpRequestParser) -> + assert msg.url == URL("/path" + path.decode()) + + ++def test_http_request_max_status_line_fragmented( ++ parser: HttpRequestParser, ++) -> None: ++ # Split an overlong request target across reads so that each callback ++ # fragment is under the limit but the accumulated target is not. ++ match = "400, message:\n Got more than 8190 bytes when reading" ++ with pytest.raises(http_exceptions.LineTooLong, match=match): ++ parser.feed_data(b"GET /" + b"a" * 8000) ++ parser.feed_data(b"a" * 8000 + b" HTTP/1.1\r\nHost: a\r\n\r\n") ++ ++ + def test_http_response_parser_utf8(response) -> None: + text = "HTTP/1.1 200 Ok\r\nx-test:тест\r\n\r\n".encode() + +@@ -1349,6 +1360,17 @@ def test_http_response_parser_status_line_under_limit( + assert msg.reason == reason.decode() + + ++def test_http_response_parser_status_line_too_long_fragmented( ++ response: HttpResponseParser, ++) -> None: ++ # Split an overlong reason phrase across reads so that each callback ++ # fragment is under the limit but the accumulated reason is not. ++ match = "400, message:\n Got more than 8190 bytes when reading" ++ with pytest.raises(http_exceptions.LineTooLong, match=match): ++ response.feed_data(b"HTTP/1.1 200 " + b"a" * 8000) ++ response.feed_data(b"a" * 8000 + b"\r\n\r\n") ++ ++ + def test_http_response_parser_bad_version(response) -> None: + with pytest.raises(http_exceptions.BadHttpMessage): + response.feed_data(b"HT/11 200 Ok\r\n\r\n") +-- +2.35.6 +
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -13,6 +13,7 @@ SRC_URI += " \ file://CVE-2026-54274.patch \ file://CVE-2026-54275.patch \ file://CVE-2026-54276.patch \ + file://CVE-2026-54277.patch \ " CVE_PRODUCT = "aiohttp"
--
2.35.6
PATCH 8/10 python3-aiohttp: fix CVE-2026-54278
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/4f7480e474cccc6a8cc2c92ad3f17a31dedf8232
[2] https://github.com/advisories/GHSA-g3cq-j2xw-wf74
--- .../python3-aiohttp/CVE-2026-54278.patch | 182 ++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 183 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54278.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54278.patch new file +182 -0
@@ -0,0 +1,182 @@ +From 0a0f845786316ed4dd9fdd785f5f694dee74bba5 Mon Sep 17 00:00:00 2001 +From: "J. Nick Koston" <[email protected]> +Date: Sun, 7 Jun 2026 00:39:29 -0500 +Subject: [PATCH] [PR #12828/13b635d7 backport][3.14] Bounded unread compressed + drain (#12845) + +CVE: CVE-2026-54278 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/4f7480e474cccc6a8cc2c92ad3f17a31dedf8232] + +(cherry picked from commit 4f7480e474cccc6a8cc2c92ad3f17a31dedf8232) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12828.bugfix.rst | 1 + + aiohttp/streams.py | 17 +++++++--- + tests/test_streams.py | 28 ++++++++++++++++ + tests/test_web_functional.py | 63 ++++++++++++++++++++++++++++++++++++ + 4 files changed, 104 insertions(+), 5 deletions(-) + create mode 100644 CHANGES/12828.bugfix.rst + +diff --git a/CHANGES/12828.bugfix.rst b/CHANGES/12828.bugfix.rst +new file mode 100644 +index 000000000..9893577a5 +--- /dev/null ++++ b/CHANGES/12828.bugfix.rst +@@ -0,0 +1 @@ ++Fixed :meth:`~aiohttp.StreamReader.readany` and :meth:`~aiohttp.StreamReader.read_nowait` joining data fed back into the buffer during the call (when draining below the low water mark resumes reading) into a single unbounded :class:`bytes`; a call now returns only the chunks that were buffered when it started, keeping the drain of an unread auto-decompressed request body bounded by the read buffer -- by :user:`bdraco`. +diff --git a/aiohttp/streams.py b/aiohttp/streams.py +index 921827eb3..b52c20742 100644 +--- a/aiohttp/streams.py ++++ b/aiohttp/streams.py +@@ -572,14 +572,21 @@ class StreamReader(AsyncStreamReaderMixin): + """Read not more than n bytes, or whole buffer if n == -1""" + self._timer.assert_timeout() + +- chunks = [] ++ if n == -1: ++ # Drain only chunks present now; _read_nowait_chunk() can ++ # re-entrantly resume_reading() and refill the buffer. ++ count = len(self._buffer) ++ if count == 1: ++ return self._read_nowait_chunk(-1) ++ return b"".join([self._read_nowait_chunk(-1) for _ in range(count)]) ++ ++ chunks: list[bytes] = [] + while self._buffer: + chunk = self._read_nowait_chunk(n) + chunks.append(chunk) +- if n != -1: +- n -= len(chunk) +- if n == 0: +- break ++ n -= len(chunk) ++ if n == 0: ++ break + + return b"".join(chunks) if chunks else b"" + +diff --git a/tests/test_streams.py b/tests/test_streams.py +index 93686746e..8b4fcf322 100644 +--- a/tests/test_streams.py ++++ b/tests/test_streams.py +@@ -1723,3 +1723,31 @@ async def test_stream_reader_small_limit_resumes_reading( + + protocol.resume_reading.assert_called() + assert protocol._reading_paused is False ++ ++ ++async def test_readany_does_not_drain_reentrant_refill( ++ protocol: mock.Mock, ++) -> None: ++ """A single readany() must not reassemble data fed re-entrantly. ++ ++ Draining below the low water mark resumes reading, which can synchronously ++ refill the buffer (e.g. decompressing another chunk). Joining that refill in ++ one call would reassemble an unbounded body. ++ """ ++ loop = asyncio.get_running_loop() ++ stream = streams.StreamReader(protocol, limit=4, loop=loop) ++ ++ refills = [b"second", b"third"] ++ ++ def resume_reading() -> None: ++ if refills: ++ stream.feed_data(refills.pop(0)) ++ ++ protocol.resume_reading.side_effect = resume_reading ++ ++ stream.feed_data(b"first") ++ ++ # Popping "first" refills "second", but this readany() returns only "first". ++ assert await stream.readany() == b"first" ++ assert await stream.readany() == b"second" ++ assert await stream.readany() == b"third" +diff --git a/tests/test_web_functional.py b/tests/test_web_functional.py +index fe9cce27b..e2fd40432 100644 +--- a/tests/test_web_functional.py ++++ b/tests/test_web_functional.py +@@ -5,6 +5,8 @@ import pathlib + import socket + import sys + from typing import Any, Dict, Generator, NoReturn, Optional, Tuple ++import zlib ++from contextlib import suppress + from unittest import mock + + import pytest +@@ -23,7 +25,9 @@ from aiohttp import ( + ) + from aiohttp.compression_utils import ZLibBackend, ZLibCompressObjProtocol + from aiohttp.hdrs import CONTENT_LENGTH, CONTENT_TYPE, TRANSFER_ENCODING ++from aiohttp.helpers import DEFAULT_CHUNK_SIZE + from aiohttp.pytest_plugin import AiohttpClient, AiohttpServer ++from aiohttp.streams import StreamReader + from aiohttp.typedefs import Handler + from aiohttp.web_protocol import RequestHandler + +@@ -1683,6 +1687,65 @@ async def test_response_prepared_with_clone(aiohttp_client) -> None: + await resp.release() + + [email protected]("decompressed_size", [4 * 1024 * 1024, 32 * 1024 * 1024]) ++async def test_unread_compressed_body_drain_is_bounded( ++ aiohttp_server: AiohttpServer, ++ monkeypatch: pytest.MonkeyPatch, ++ decompressed_size: int, ++) -> None: ++ """Draining an unread compressed body stays bounded by the read buffer. ++ ++ A handler that rejects before reading still drains the payload during ++ lingering close; a small compressed body must not force a large transient ++ allocation (a deflate-bomb style DoS). ++ """ ++ drain_reads: list[int] = [] ++ drained = asyncio.Event() ++ readany = StreamReader.readany ++ ++ async def record_readany(self: StreamReader) -> bytes: ++ data = await readany(self) ++ assert data ++ drain_reads.append(len(data)) ++ drained.set() ++ return data ++ ++ monkeypatch.setattr(StreamReader, "readany", record_readany) ++ ++ async def handler(request: web.Request) -> web.Response: ++ return web.Response(status=401) ++ ++ app = web.Application(client_max_size=1024) ++ app.router.add_post("/", handler) ++ server = await aiohttp_server(app) ++ ++ body = zlib.compress(b"a" * decompressed_size) ++ assert len(body) < decompressed_size ++ head = ( ++ b"POST / HTTP/1.1\r\n" ++ b"Host: localhost\r\n" ++ b"Content-Encoding: deflate\r\n" ++ b"Content-Length: %d\r\n" ++ b"Connection: keep-alive\r\n\r\n" ++ ) % len(body) ++ ++ reader, writer = await asyncio.open_connection(server.host, server.port) ++ try: ++ writer.write(head + body) ++ await writer.drain() ++ status_line = await asyncio.wait_for(reader.readline(), 5) ++ assert status_line.startswith(b"HTTP/1.1 401 ") ++ await asyncio.wait_for(drained.wait(), 5) ++ finally: ++ writer.close() ++ with suppress(ConnectionResetError, BrokenPipeError): ++ await writer.wait_closed() ++ ++ # Bounded by the buffer, not the decompressed size. ++ assert max(drain_reads) <= 3 * DEFAULT_CHUNK_SIZE ++ assert max(drain_reads) < decompressed_size ++ ++ + async def test_app_max_client_size(aiohttp_client) -> None: + async def handler(request): + await request.post()
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -14,6 +14,7 @@ SRC_URI += " \ file://CVE-2026-54275.patch \ file://CVE-2026-54276.patch \ file://CVE-2026-54277.patch \ + file://CVE-2026-54278.patch \ " CVE_PRODUCT = "aiohttp"
Signature · 1 line
2.35.6
PATCH 9/10 python3-aiohttp: fix CVE-2026-54279
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/a329a7aacad5284f087af36103aff778746da0f2
[2] https://github.com/advisories/GHSA-2fqr-mr3j-6wp8
--- .../python3-aiohttp/CVE-2026-54279.patch | 295 ++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 296 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54279.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54279.patch new file +295 -0
@@ -0,0 +1,295 @@ +From 9fff50c82e4fd6baa8252cb573d4a5f3df1a9dcb Mon Sep 17 00:00:00 2001 +From: "J. Nick Koston" <[email protected]> +Date: Sun, 7 Jun 2026 00:40:24 -0500 +Subject: [PATCH] [PR #12824/60b85e98 backport][3.14] Preserve host-only cookie + scope across CookieJar save/load (#12833) + +CVE: CVE-2026-54279 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/a329a7aacad5284f087af36103aff778746da0f2] + +(cherry picked from commit a329a7aacad5284f087af36103aff778746da0f2) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12824.bugfix.rst | 1 + + aiohttp/cookiejar.py | 52 ++++++++++----- + tests/test_cookiejar.py | 135 +++++++++++++++++++++++++++++++++++++++ + 3 files changed, 171 insertions(+), 17 deletions(-) + create mode 100644 CHANGES/12824.bugfix.rst + +diff --git a/CHANGES/12824.bugfix.rst b/CHANGES/12824.bugfix.rst +new file mode 100644 +index 000000000..f8dbd169c +--- /dev/null ++++ b/CHANGES/12824.bugfix.rst +@@ -0,0 +1 @@ ++Fixed :class:`~aiohttp.CookieJar` dropping the host-only flag of cookies when persisted with :meth:`~aiohttp.CookieJar.save` and reloaded with :meth:`~aiohttp.CookieJar.load`, so a cookie set without a ``Domain`` attribute is again scoped to the exact host that set it after a reload; the absolute expiration deadline is now persisted as well, so a reloaded cookie keeps its original lifetime instead of being rescheduled from the load time. :meth:`~aiohttp.CookieJar.load` now replaces the jar contents rather than merging onto prior state, and loaded cookies pass through the same acceptance rules as :meth:`~aiohttp.CookieJar.update_cookies`, so a cookie for an IP-address host is dropped when loaded into a jar created without ``unsafe=True`` -- by :user:`bdraco`. +diff --git a/aiohttp/cookiejar.py b/aiohttp/cookiejar.py +index 757cc10e8..b07d1fd50 100644 +--- a/aiohttp/cookiejar.py ++++ b/aiohttp/cookiejar.py +@@ -48,6 +48,9 @@ _FORMAT_DOMAIN_REVERSED = "{1}.{0}".format + _MIN_SCHEDULED_COOKIE_EXPIRATION = 100 + _SIMPLE_COOKIE = SimpleCookie() + ++# Not persisted; the absolute deadline is saved instead. ++_RELATIVE_EXPIRY_ATTRS = frozenset(("max-age", "expires")) ++ + + class _RestrictedCookieUnpickler(pickle.Unpickler): + """A restricted unpickler that only allows cookie-related types. +@@ -165,21 +168,28 @@ class CookieJar(AbstractCookieJar): + :class:`str` or :class:`pathlib.Path` instance. + """ + file_path = pathlib.Path(file_path) +- data: dict[str, dict[str, dict[str, str | bool]]] = {} ++ data: dict[str, dict[str, dict[str, str | bool | float]]] = {} + for (domain, path), cookie in self._cookies.items(): + key = f"{domain}|{path}" + data[key] = {} + for name, morsel in cookie.items(): +- morsel_data: dict[str, str | bool] = { ++ morsel_data: dict[str, str | bool | float] = { + "key": morsel.key, + "value": morsel.value, + "coded_value": morsel.coded_value, + } +- # Save all morsel attributes that have values ++ # Skip relative expiry; the absolute deadline is saved below. + for attr in morsel._reserved: # type: ignore[attr-defined] ++ if attr in _RELATIVE_EXPIRY_ATTRS: ++ continue + attr_val = morsel[attr] + if attr_val: + morsel_data[attr] = attr_val ++ # Persist or it reloads as a domain cookie and leaks to subdomains. ++ if (domain, name) in self._host_only_cookies: ++ morsel_data["host_only"] = True ++ if (exp := self._expirations.get((domain, path, name))) is not None: ++ morsel_data["expires_timestamp"] = exp + data[key][name] = morsel_data + with file_path.open(mode="w", encoding="utf-8") as f: + json.dump(data, f, indent=2) +@@ -191,6 +201,9 @@ class CookieJar(AbstractCookieJar): + pickle format (using a restricted unpickler) for backward + compatibility with existing cookie files. + ++ Replaces the current jar contents; loaded cookies pass through the ++ same acceptance rules as :meth:`update_cookies`. ++ + :param file_path: Path to file from where cookies will be + imported, :class:`str` or :class:`pathlib.Path` instance. + """ +@@ -199,32 +212,28 @@ class CookieJar(AbstractCookieJar): + try: + with file_path.open(mode="r", encoding="utf-8") as f: + data = json.load(f) +- self._cookies = self._load_json_data(data) ++ self._load_json_data(data) + except (json.JSONDecodeError, UnicodeDecodeError, ValueError): + # Fall back to legacy pickle format with restricted unpickler + with file_path.open(mode="rb") as f: + self._cookies = _RestrictedCookieUnpickler(f).load() + + def _load_json_data( +- self, data: dict[str, dict[str, dict[str, str | bool]]] +- ) -> defaultdict[tuple[str, str], SimpleCookie]: +- """Load cookies from parsed JSON data.""" +- cookies: defaultdict[tuple[str, str], SimpleCookie] = defaultdict(SimpleCookie) ++ self, data: dict[str, dict[str, dict[str, str | bool | float]]] ++ ) -> None: ++ """Replace contents, routing cookies through update_cookies().""" ++ self.clear() + for compound_key, cookie_data in data.items(): + domain, path = compound_key.split("|", 1) +- key = (domain, path) + for name, morsel_data in cookie_data.items(): + morsel: Morsel[str] = Morsel() +- morsel_key = morsel_data["key"] +- morsel_value = morsel_data["value"] +- morsel_coded_value = morsel_data["coded_value"] + # Use __setstate__ to bypass validation, same pattern + # used in _build_morsel and _cookie_helpers. + morsel.__setstate__( # type: ignore[attr-defined] + { +- "key": morsel_key, +- "value": morsel_value, +- "coded_value": morsel_coded_value, ++ "key": morsel_data["key"], ++ "value": morsel_data["value"], ++ "coded_value": morsel_data["coded_value"], + } + ) + # Restore morsel attributes +@@ -235,8 +244,17 @@ class CookieJar(AbstractCookieJar): + "coded_value", + ): + morsel[attr] = morsel_data[attr] +- cookies[key][name] = morsel +- return cookies ++ # Drop the domain so update_cookies() re-marks it host-only. ++ if morsel_data.get("host_only"): ++ morsel["domain"] = "" ++ response_url = ( ++ URL.build(scheme="https", host=domain) if domain else URL() ++ ) ++ self.update_cookies({name: morsel}, response_url) ++ # Restore the absolute deadline; update_cookies() schedules none. ++ if (exp := morsel_data.get("expires_timestamp")) is not None: ++ self._expire_cookie(float(exp), domain, path, name) ++ self._do_expiration() + + def clear(self, predicate: Optional[ClearCookiePredicate] = None) -> None: + if predicate is None: +diff --git a/tests/test_cookiejar.py b/tests/test_cookiejar.py +index 694514067..ba7ee3220 100644 +--- a/tests/test_cookiejar.py ++++ b/tests/test_cookiejar.py +@@ -2,6 +2,7 @@ import asyncio + import datetime + import heapq + import itertools ++import json + import logging + import pathlib + import pickle +@@ -1760,6 +1761,140 @@ async def test_save_load_json_partitioned_cookies(tmp_path: Path) -> None: + assert s["path"] == lo["path"] + + ++async def test_save_load_json_preserves_host_only_scope(tmp_path: Path) -> None: ++ """Verify save/load keeps host-only cookies off subdomains.""" ++ file_path = tmp_path / "host_only.json" ++ issuer = URL("https://auth.example.com/login") ++ subdomain = URL("https://sub.auth.example.com/") ++ ++ jar_save = CookieJar() ++ jar_save.update_cookies({"sid": "hostonly"}, response_url=issuer) ++ assert "sid" not in jar_save.filter_cookies(subdomain) ++ jar_save.save(file_path=file_path) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ assert jar_load.host_only_cookies == frozenset({("auth.example.com", "sid")}) ++ assert "sid" not in jar_load.filter_cookies(subdomain) ++ assert "sid" in jar_load.filter_cookies(issuer) ++ ++ ++async def test_save_load_json_domain_cookie_still_matches_subdomain( ++ tmp_path: Path, ++) -> None: ++ """Verify save/load keeps an explicit Domain cookie valid for subdomains.""" ++ file_path = tmp_path / "domain.json" ++ subdomain = URL("https://sub.example.com/") ++ ++ jar_save = CookieJar() ++ jar_save.update_cookies_from_headers( ++ ["sid=domaincookie; Domain=example.com"], URL("https://example.com/") ++ ) ++ jar_save.save(file_path=file_path) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ assert jar_load.host_only_cookies == frozenset() ++ assert "sid" in jar_load.filter_cookies(subdomain) ++ ++ ++async def test_save_load_json_preserves_max_age_deadline(tmp_path: Path) -> None: ++ """Verify save/load restores the absolute deadline without resetting it.""" ++ file_path = tmp_path / "max_age.json" ++ url = URL("https://example.com/") ++ ++ jar_save = CookieJar() ++ jar_save.update_cookies_from_headers( ++ ["sid=x; Max-Age=3600; Domain=example.com"], url ++ ) ++ expirations = dict(jar_save._expirations) ++ jar_save.save(file_path=file_path) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ # The deadline is restored as the original absolute time, not now + Max-Age. ++ assert dict(jar_load._expirations) == expirations ++ assert "sid" in jar_load.filter_cookies(url) ++ ++ ++async def test_save_load_json_drops_expired_cookie(tmp_path: Path) -> None: ++ """Verify a cookie whose persisted deadline is in the past is dropped on load.""" ++ file_path = tmp_path / "expired.json" ++ url = URL("https://example.com/") ++ ++ # Save a future-expiring cookie, then rewrite its persisted deadline to the ++ # past so the cookie survives save() and the drop happens on the load path. ++ jar_save = CookieJar() ++ jar_save.update_cookies_from_headers( ++ ["sid=x; Expires=Tue, 1 Jan 2999 12:00:00 GMT; Domain=example.com"], url ++ ) ++ jar_save.save(file_path=file_path) ++ data = json.loads(file_path.read_text()) ++ _, cookies = next(iter(data.items())) ++ cookies["sid"]["expires_timestamp"] = 0.0 ++ file_path.write_text(json.dumps(data)) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ assert len(jar_load) == 0 ++ assert "sid" not in jar_load.filter_cookies(url) ++ ++ ++async def test_save_load_json_preserves_expires_deadline(tmp_path: Path) -> None: ++ """Verify a future Expires deadline survives a save/load roundtrip.""" ++ file_path = tmp_path / "expires.json" ++ url = URL("https://example.com/") ++ ++ jar_save = CookieJar() ++ jar_save.update_cookies_from_headers( ++ ["sid=x; Expires=Tue, 1 Jan 2999 12:00:00 GMT; Domain=example.com"], url ++ ) ++ expirations = dict(jar_save._expirations) ++ jar_save.save(file_path=file_path) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ assert dict(jar_load._expirations) == expirations ++ assert "sid" in jar_load.filter_cookies(url) ++ ++ ++async def test_load_json_old_format_without_new_keys(tmp_path: Path) -> None: ++ """Verify a file written by an older version (no host_only/expires_timestamp) loads.""" ++ file_path = tmp_path / "old.json" ++ # Old schema: no host_only, no expires_timestamp; relative max-age morsel attr. ++ file_path.write_text( ++ json.dumps( ++ { ++ "example.com|/": { ++ "sid": { ++ "key": "sid", ++ "value": "x", ++ "coded_value": "x", ++ "domain": "example.com", ++ "max-age": "3600", ++ } ++ } ++ } ++ ) ++ ) ++ url = URL("https://example.com/") ++ ++ jar_load = CookieJar() ++ # No exception when the new keys are absent. ++ jar_load.load(file_path=file_path) ++ ++ # A host-only cookie saved without Domain by an older version had no domain ++ # field, so it now loads as a domain cookie (the documented migration loss). ++ assert "sid" in jar_load.filter_cookies(url) ++ # max-age is rescheduled from load time rather than an absolute deadline. ++ assert any(key[2] == "sid" for key in jar_load._expirations) ++ ++ + async def test_json_format_is_safe(tmp_path: Path) -> None: + """Verify the JSON file format cannot execute code on load.""" + import json
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -15,6 +15,7 @@ SRC_URI += " \ file://CVE-2026-54276.patch \ file://CVE-2026-54277.patch \ file://CVE-2026-54278.patch \ + file://CVE-2026-54279.patch \ " CVE_PRODUCT = "aiohttp"
Signature · 1 line
2.35.6
PATCH 10/10 python3-aiohttp: fix CVE-2026-54280
In reply to Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Darsh Kelaiya <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
[1] https://github.com/aio-libs/aiohttp/commit/a762eda5242f6490d6ba667533193f8b473ad587
[2] https://github.com/advisories/GHSA-9x8q-7h8h-wcw9
--- .../python3-aiohttp/CVE-2026-54280.patch | 138 ++++++++++++++++++ .../python/python3-aiohttp_3.13.5.bb | 1 + 2 files changed, 139 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54280.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-54280.patch new file +138 -0
@@ -0,0 +1,138 @@ +From 724ae4d652417c4490a71ea0b16b8804dad3004f Mon Sep 17 00:00:00 2001 +From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> +Date: Sun, 7 Jun 2026 05:47:16 +0000 +Subject: [PATCH] [PR #12831/1ac92dae backport][3.14] Payload close on + disconnect (#12843) + +CVE: CVE-2026-54280 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/a762eda5242f6490d6ba667533193f8b473ad587] + +Co-authored-by: J. Nick Koston <[email protected]> +(cherry picked from commit a762eda5242f6490d6ba667533193f8b473ad587) +Signed-off-by: Darsh Kelaiya <[email protected]> +--- + CHANGES/12831.bugfix.rst | 1 + + aiohttp/web_response.py | 6 ++-- + tests/test_web_response.py | 73 +++++++++++++++++++++++++++++++++++++- + 3 files changed, 77 insertions(+), 3 deletions(-) + create mode 100644 CHANGES/12831.bugfix.rst + +diff --git a/CHANGES/12831.bugfix.rst b/CHANGES/12831.bugfix.rst +new file mode 100644 +index 000000000..bf460ffcc +--- /dev/null ++++ b/CHANGES/12831.bugfix.rst +@@ -0,0 +1 @@ ++Fixed :meth:`aiohttp.web.Response.write_eof` skipping ``Payload.close()`` when the body write was interrupted by an error or cancellation, for example when a client disconnects mid-response; the payload close hook now runs in a ``finally`` so a :class:`~aiohttp.payload.Payload` body always releases its resources -- by :user:`bdraco`. +diff --git a/aiohttp/web_response.py b/aiohttp/web_response.py +index 364270e4d..cea5d4b45 100644 +--- a/aiohttp/web_response.py ++++ b/aiohttp/web_response.py +@@ -779,8 +779,10 @@ class Response(StreamResponse): + if body is None or self._must_be_empty_body: + await super().write_eof() + elif isinstance(self._body, Payload): +- await self._body.write(self._payload_writer) +- await self._body.close() ++ try: ++ await self._body.write(self._payload_writer) ++ finally: ++ await self._body.close() + await super().write_eof() + else: + await super().write_eof(cast(bytes, body)) +diff --git a/tests/test_web_response.py b/tests/test_web_response.py +index 5a4fb7e66..f094cd3d2 100644 +--- a/tests/test_web_response.py ++++ b/tests/test_web_response.py +@@ -1,3 +1,4 @@ ++import asyncio + import collections.abc + import datetime + import gzip +@@ -18,7 +19,7 @@ from aiohttp.abc import AbstractStreamWriter + from aiohttp.helpers import ETag + from aiohttp.http_writer import StreamWriter, _serialize_headers + from aiohttp.multipart import BodyPartReader, MultipartWriter +-from aiohttp.payload import BytesPayload, StringPayload ++from aiohttp.payload import BytesPayload, Payload, StringPayload + from aiohttp.test_utils import make_mocked_request + from aiohttp.web import ContentCoding, Response, StreamResponse, json_response + +@@ -1370,6 +1371,76 @@ async def test_consecutive_write_eof() -> None: + writer.write_eof.assert_called_once_with(data) + + ++class _ClosingPayload(Payload): ++ """Payload test double that records whether close() ran.""" ++ ++ def __init__(self) -> None: ++ super().__init__(None) ++ self.close_called = False ++ self.started = asyncio.Event() ++ self.release = asyncio.Event() ++ self.fail = False ++ ++ async def write(self, writer: AbstractStreamWriter) -> None: ++ self.started.set() ++ if self.fail: ++ raise ConnectionResetError("client gone") ++ await self.release.wait() ++ ++ async def close(self) -> None: ++ self.close_called = True ++ await super().close() ++ ++ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str: ++ assert False ++ ++ ++async def test_write_eof_closes_payload_on_success() -> None: ++ writer = mock.create_autospec(AbstractStreamWriter, spec_set=True, instance=True) ++ req = make_request("GET", "/", writer=writer) ++ payload = _ClosingPayload() ++ payload.release.set() ++ resp = web.Response(body=payload) ++ ++ await resp.prepare(req) ++ await resp.write_eof() ++ ++ assert payload.close_called ++ assert writer.write_eof.called ++ ++ ++async def test_write_eof_closes_payload_on_write_error() -> None: ++ writer = mock.create_autospec(AbstractStreamWriter, spec_set=True, instance=True) ++ req = make_request("GET", "/", writer=writer) ++ payload = _ClosingPayload() ++ payload.fail = True ++ resp = web.Response(body=payload) ++ ++ await resp.prepare(req) ++ with pytest.raises(ConnectionResetError): ++ await resp.write_eof() ++ ++ assert payload.close_called ++ assert not writer.write_eof.called ++ ++ ++async def test_write_eof_closes_payload_on_cancel() -> None: ++ writer = mock.create_autospec(AbstractStreamWriter, spec_set=True, instance=True) ++ req = make_request("GET", "/", writer=writer) ++ payload = _ClosingPayload() ++ resp = web.Response(body=payload) ++ ++ await resp.prepare(req) ++ task = asyncio.ensure_future(resp.write_eof()) ++ await payload.started.wait() ++ task.cancel() ++ with pytest.raises(asyncio.CancelledError): ++ await task ++ ++ assert payload.close_called ++ assert not writer.write_eof.called ++ ++ + def test_set_text_with_content_type() -> None: + resp = Response() + resp.content_type = "text/html"
meta-python/recipes-devtools/python/python3-aiohttp_3.13.5.bb +1 -0
@@ -16,6 +16,7 @@ SRC_URI += " \ file://CVE-2026-54277.patch \ file://CVE-2026-54278.patch \ file://CVE-2026-54279.patch \ + file://CVE-2026-54280.patch \ " CVE_PRODUCT = "aiohttp"
Signature · 1 line
2.35.6