CVE-2021-21330 json
Open redirect vulnerability in aiohttp
published 2021-02-26 5 y ago modified 2026-07-08 4 mo ago also GHSA-v6wp-4m6f-gcjg , PYSEC-2021-76 , EUVD-2021-0003
- cvss
- 3.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.9%
- EPSS 1.9% chance of exploitation in 30 days, percentile 79%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi aiohttp 3.7.4
- aiohttp aiohttp 3.7.4
- python-aiohttp Debian 14, Debian 13, Debian 12 3.7.4-1
debian advisories DEBIAN-CVE-2021-21330
- python-aiohttp Ubuntu Pro 18.04 LTS 3.0.1-1ubuntu0.1~esm1
- python-aiohttp Ubuntu Pro 20.04 LTS 3.6.2-1ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2021-21330
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- foreman satellite capsule 6.10, satellite 6.10 2.5.2.17-2.el7sat
- candlepin satellite 6.10 4.0.9-1.el7sat
- satellite satellite capsule 6.10, satellite 6.10 6.10.0-3.el7sat
- python-ecdsa satellite capsule 6.10, satellite 6.10 0.13.3-2.el7pc
- python-pyyaml satellite capsule 6.10, satellite 6.10 5.4.1-1.el7pc
- python3-ecdsa satellite capsule 6.10, satellite 6.10 0.13.3-2.el7pc
- python-aiohttp satellite capsule 6.10, satellite 6.10 3.7.4-1.el7pc
- python-urllib3 satellite capsule 6.10, satellite 6.10 1.26.5-1.el7pc
red hat advisories RHSA-2021:4702
- python-typing_extensions SLE Module for Public Cloud 15 SP3, SLE Module for Public Cloud 15 SP2, SLE Module for Public Cloud 15 SP1 3.10.0.0-150100.3.3.1
- python-typing_extensions SLE Module for Server Applications 15 SP4, openSUSE Leap 15.4 3.10.0.0-150400.3.2.1
- python-aiohttp SLE Module for Public Cloud 15 SP4, SLE Module for Public Cloud 15 SP3, SLE Module for Public Cloud 15 SP2 +3 more 3.6.0-150100.3.9.1
- python-aiohttp SLE Module for Public Cloud 15 SP2, SLE Module for Public Cloud 15 SP1 3.4.4-3.6.1
suse advisories SUSE-RU-2022:3275-1SUSE-SU-2021:1313-1
- python-aiohttp openSUSE Tumbleweed 3.14.3-1.1
- python-aiohttp openSUSE Tumbleweed 3.8.5-2.1
opensuse advisories openSUSE-SU-2026:11467-1openSUSE-SU-2024:13209-1
- python-aiohttp Arch Linux 3.7.4-1
arch linux advisories AVG-1623
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-21330 updated cvss 8.2
python-aiohttp: Open redirect in aiohttp.web_middlewares.normalize_path_middleware
-
Red Hat Satellite 6.10 python-aiohttp 3.7.4-1.el7pc Red Hat Satellite Capsule 6.10 python-aiohttp 3.7.4-1.el7pcfixed: vendor fix RHSA-2021:4702
-
Red Hat Ansible Automation Platform 1.2 aiohttp, python-aiohttp Red Hat Ansible Tower 3 aiohttp Red Hat Satellite 6.10 tfm 7.0-1.el7sat, gofer 2.12.5-7.el7sat, katello 4.1.1-2.el7sat, libsolv 0.7.20-1.el7pc, receptor 0.6.4-2.el7ar, libcomps 0.1.15-1.el7pc, +584 more Red Hat Satellite Capsule 6.10 tfm 7.0-1.el7sat, katello 4.1.1-2.el7sat, libsolv 0.7.20-1.el7pc, libcomps 0.1.15-1.el7pc, python-rq 1.8.1-1.el7pc, python-idna 2.10-1.el7pc, +368 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.91% chance of exploitation in the next 30 days, higher than 79% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 5.8 | AV:N/AC:M/Au:N/C:P/I:P/A:N |
| GitHub | 3.1 | 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | aiohttp | <3.7.4 |
3.7.4 |
Affected products
- aio-libs aiohttp
Classification
- Weakness
-
- CWE-601 URL Redirection to Untrusted Site
References
-
github.com
/aio-libs/aiohttp/commit/2545222a3853e31ace15d87ae0e2effb7da0c96b
web, patch, third-party-advisory
-
debian.org
/security/2021/dsa-4864
vendor-advisory, web, third-party-advisory, advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L/
vendor-advisory
-
security.gentoo.org
/glsa/202208-19
vendor-advisory, web, third-party-advisory
-
github.com
/aio-libs/aiohttp/security/advisories/GHSA-v6wp-4m6f-gcjg
web, third-party-advisory, advisory
-
github.com
/aio-libs/aiohttp/blob/master/CHANGES.rst#374-2021-02-25
web, third-party-advisory
-
pypi.org
/project/aiohttp/
product, third-party-advisory, package
-
nvd.nist.gov
/vuln/detail/CVE-2021-21330
advisory
-
github.com
/aio-libs/aiohttp
package
-
github.com
/pypa/advisory-database/tree/main/vulns/aiohttp/PYSEC-2021-76.yaml
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5
web
-
pypi.org
/project/aiohttp
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5/
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L/
web
Sources
- CVE List CVE-2021-21330
- GitHub Advisory GHSA-v6wp-4m6f-gcjg
- NVD CVE-2021-21330
- OSV PYSEC-2021-76
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.