CVE-2021-21330
python-aiohttp: Open redirect in aiohttp.web_middlewares.normalize_path_middleware
Overview
Description
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.
Source: OX vulnerability database
Severity
6.1 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness: CWE-601
Affected packages · 3
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| PyPI | aiohttp | <3.7.4 | 3.7.4 |
| Seal PyPI | aiohttp | >=2.3.9+sp0, <2.3.9+sp999>=3.0.8+sp0, <3.0.8+sp999 | 2.3.9+sp9993.0.8+sp999 |
| Seal PyPI | seal-aiohttp | >=2.3.9+sp1, <2.3.9+sp999>=3.0.8+sp1, <3.0.8+sp999 | 2.3.9+sp9993.0.8+sp999 |
Open a package to see all its vulnerabilities.
Operating systems · 22 fixes
Red Hat 1 release · 12 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | python3-ecdsa | 0:0.13.3-2.el7pc | RHSA-2021:4702 |
| 7 | tfm-rubygem-nokogiri | 0:1.11.3-2.el7sat | RHSA-2021:4702 |
| 7 | python3-urllib3 | 0:1.26.5-1.el7pc | RHSA-2021:4702 |
| 7 | tfm-rubygem-activerecord-session-store | 0:2.0.0-1.el7sat | RHSA-2021:4702 |
| 7 | python3-django | 0:2.2.24-1.el7pc | RHSA-2021:4702 |
| 7 | foreman | 0:2.5.2.17-2.el7sat | RHSA-2021:4702 |
6 more rows
debian 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 10 | python-aiohttp | 3.5.1-1+deb10u1 |
| 11 | python-aiohttp | 3.7.4-1 |
| 12 | python-aiohttp | 3.7.4-1 |
| 13 | python-aiohttp | 3.7.4-1 |
| 14 | python-aiohttp | 3.7.4-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| python-aiohttp | 3.7.4-1 |
openSUSE 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | python313-aiohttp +1 | 3.14.3-1.1 | openSUSE-SU-2026:11467-1 |
| Tumbleweed | python310-aiohttp +2 | 3.8.5-2.1 | openSUSE-SU-2024:13209-1 |
ubuntu 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | python-aiohttp | 3.0.1-1ubuntu0.1~esm1 |
| 20.04-ESM | python-aiohttp | 3.6.2-1ubuntu0.1~esm1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2021-21330
- github.com https://github.com/aio-libs/aiohttp
- github.com https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst#374-2021-02-25
- github.com https://github.com/aio-libs/aiohttp/commit/2545222a3853e31ace15d87ae0e2effb7da0c96b
- github.com https://github.com/aio-libs/aiohttp/issues/5497
- github.com https://github.com/aio-libs/aiohttp/security/advisories/GHSA-v6wp-4m6f-gcjg
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/aiohttp/PYSEC-2021-76.yaml
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L/
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5
Show all 20 references
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5/
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2021-21330
- pypi.org https://pypi.org/project/aiohttp
- pypi.org https://pypi.org/project/aiohttp/
- security.gentoo.org https://security.gentoo.org/glsa/202208-19
- ubuntu.com https://ubuntu.com/security/notices/USN-5386-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2021-21330
- www.debian.org https://www.debian.org/security/2021/dsa-4864
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.