VYPR
Medium severity5.3NVD Advisory· Published Apr 1, 2026· Updated Apr 15, 2026

CVE-2026-34517

CVE-2026-34517

Description

AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Prior to version 3.13.4, for some multipart form fields, aiohttp read the entire field into memory before checking client_max_size. This issue has been patched in version 3.13.4.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
aiohttpPyPI
< 3.13.43.13.4

Affected products

1
  • cpe:2.3:a:aiohttp:aiohttp:*:*:*:*:*:*:*:*
    Range: <3.13.4

Patches

1
cbb774f38330

[PR #12216/9cc4b917 backport][3.13] Check multipart max_size during iteration (#12229)

https://github.com/aio-libs/aiohttppatchback[bot]Mar 10, 2026via ghsa
1 file changed · +14 6
  • aiohttp/web_request.py+14 6 modified
    @@ -769,17 +769,25 @@ async def post(self) -> "MultiDictProxy[Union[str, bytes, FileField]]":
                             out.add(field.name, ff)
                         else:
                             # deal with ordinary data
    -                        value = await field.read(decode=True)
    +                        raw_data = bytearray()
    +                        while chunk := await field.read_chunk():
    +                            size += len(chunk)
    +                            if 0 < max_size < size:
    +                                raise HTTPRequestEntityTooLarge(
    +                                    max_size=max_size, actual_size=size
    +                                )
    +                            raw_data.extend(chunk)
    +
    +                        value = bytearray()
    +                        # form-data doesn't support compression, so don't need to check size again.
    +                        async for d in field.decode_iter(raw_data):
    +                            value.extend(d)
    +
                             if field_ct is None or field_ct.startswith("text/"):
                                 charset = field.get_charset(default="utf-8")
                                 out.add(field.name, value.decode(charset))
                             else:
                                 out.add(field.name, value)
    -                        size += len(value)
    -                        if 0 < max_size < size:
    -                            raise HTTPRequestEntityTooLarge(
    -                                max_size=max_size, actual_size=size
    -                            )
                     else:
                         raise ValueError(
                             "To decode nested multipart you need to use custom reader",
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.