CVE-2021-21330
Open redirect vulnerability in aiohttp
Reported by github_m · Published February 26, 2021
aiohttp is fixed in 3.7.4 (PyPI)
aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. In aiohttp before version 3.7.4 there is an open redirect vulnerability. A maliciously crafted link to an aiohttp-based web-server could redirect the browser to a different website. It is caused by a bug in the `aiohttp.web_middlewares.normalize_path_middleware` middleware. This security problem has been fixed in 3.7.4. Upgrade your dependency using pip as follows "pip install aiohttp >= 3.7.4". If upgrading is not an option for you, a workaround can be to avoid using `aiohttp.web_middlewares.normalize_path_middleware` in your applications.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| aiohttp | PyPI | 3.7.4 |
| aiohttp | aiohttp | 3.7.4 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| aio-libs | aiohttp | < 3.7.4 |
| PyPI | aiohttp | 0 |
| aio-libs | aiohttp | 0 |
| arch | python-aiohttp | 0 |
Timeline
- Feb 26, 2021 CVE Published
- Feb 26, 2021 PoC Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Oct 15, 2025 CVE Updated
- Mar 7, 2026 Distribution Patch (2 in total, the first dated here)
- Mar 7, 2026 Security Advisory (4 in total, the first dated here)
- Aug 26, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-21330
vulnetix vdb fixes CVE-2021-21330
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-21330/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- DSA-4864 vendor-advisoryx_refsource_DEBIAN
- FEDORA-2021-673b10ed77 vendor-advisoryx_refsource_FEDORA
- FEDORA-2021-902c1b07c9 vendor-advisoryx_refsource_FEDORA
- GLSA-202208-19 vendor-advisoryx_refsource_GENTOO
- https://nvd.nist.gov/vuln/detail/CVE-2021-21330 advisory