#13894·aiohttp

Possible regression from patch for CVE-2025-69224

Author: dleidertCreated Oct 1, 2026Updated Oct 1, 2026
Labelsbug

Describe the bug

I wonder if the patch for CVE-2025-69224 causes a bug/regression. The patch changed this code, for example.

-            enc = enc.lower()
-            if enc in ('gzip', 'deflate', 'br', 'zstd'):
+            if enc.isascii() and enc.lower() in {"gzip", "deflate", "br", "zstd"}:
                 encoding = enc

So, originally, the value got lowercased, then compared and assigned. But now it is only compared in lowercase and then assigned as-is. IMHO it should be:

                encoding = enc.lower()

to preserve the original behavior.

To Reproduce

It should be easy to adjust the tests to use GZIP or Gzip for content-encoding.

Expected behavior

Tolerate and process uppercase or mixed-case values.

Logs/tracebacks

python-traceback
n/a

Python Version

bash
Python 3.14.7

aiohttp Version

bash
3.14.3

multidict Version

bash
not relevant

propcache Version

bash
not relevant

yarl Version

bash
not relevant

OS

Linux

Related component

Server

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct