cve.bz

CVE-2021-21330 Open Redirect

6.1 mediumEPSS 1.7%Fix available

Medium (6.1). EPSS 1.7% estimated probability of exploitation activity in the next 30 days. Fixed in aiohttp 3.7.4.

On this page
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.

Severity

CVSS 3.1

6.1 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
1.7% (unchanged from 1.7% a week ago; 1.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 78th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-601 URL Redirection to Untrusted Site (Open Redirect)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-21330 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-21330?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-21330?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-21330 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
aiohttp:aiohttpbefore 3.7.4
debian:debian_linux10.0
fedoraproject:fedora33
fedoraproject:fedora34

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-v6wp-4m6f-gcjgPyPIaiohttp<3.7.43.7.4
PYSEC-2021-76PyPIaiohttp<3.7.43.7.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10python-aiohttp3.5.1-1+deb10u1DSA-4864-1
Debian12, 13, 14python-aiohttp3.7.4-1DEBIAN-CVE-2021-21330
UbuntuPro:18.04:LTSpython-aiohttp3.0.1-1ubuntu0.1~esm1UBUNTU-CVE-2021-21330 USN-5386-1
UbuntuPro:20.04:LTSpython-aiohttp3.6.2-1ubuntu0.1~esm1UBUNTU-CVE-2021-21330 USN-5386-1
Red Hatsatellite:6.10::el7candlepin0:4.0.9-1.el7satRHSA-2021:4702
Red Hatsatellite:6.10::el7satellite0:6.10.0-3.el7satRHSA-2021:4702
Red Hatsatellite:6.10::el7tfm-rubygem-activerecord-session_store0:2.0.0-1.el7satRHSA-2021:4702
Red Hatsatellite:6.10::el7tfm-rubygem-addressable0:2.8.0-1.el7satRHSA-2021:4702
Red Hatsatellite:6.10::el7tfm-rubygem-puma0:5.3.2-1.el7satRHSA-2021:4702
Red Hatsatellite:6.10::el7tfm-rubygem-rails, tfm-rubygem-actionpack0:6.0.3.7-1.el7satRHSA-2021:4702
Red Hatsatellite:6.10::el7, satellite_capsule:6.10::el7foreman0:2.5.2.17-2.el7satRHSA-2021:4702
Red Hatsatellite:6.10::el7, satellite_capsule:6.10::el7python-aiohttp0:3.7.4-1.el7pcRHSA-2021:4702
Red Hatsatellite:6.10::el7, satellite_capsule:6.10::el7python-ecdsa, python3-ecdsa0:0.13.3-2.el7pcRHSA-2021:4702
Red Hatsatellite:6.10::el7, satellite_capsule:6.10::el7python-pyyaml, python3-pyyaml0:5.4.1-1.el7pcRHSA-2021:4702
Red Hatsatellite:6.10::el7, satellite_capsule:6.10::el7python-urllib3, python3-urllib30:1.26.5-1.el7pcRHSA-2021:4702
Red Hatsatellite:6.10::el7, satellite_capsule:6.10::el7python3-django0:2.2.24-1.el7pcRHSA-2021:4702
2 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise Module for Public Cloud 15 SP1, Linux Enterprise Module for Public Cloud 15 SP2python-aiohttp3.4.4-3.6.1SUSE-SU-2021:1313-1
SUSELinux Enterprise Module for Public Cloud 15 SP1, Linux Enterprise Module for Public Cloud 15 SP2, Linux Enterprise Module for Public Cloud 15 SP3python-typing_extensions3.10.0.0-150100.3.3.1SUSE-RU-2022:3275-1
SUSELinux Enterprise Module for Public Cloud 15 SP1, Linux Enterprise Module for Public Cloud 15 SP2, Linux Enterprise Module for Public Cloud 15 SP3 and 1 morepython-aiohttp3.6.0-150100.3.9.1SUSE-RU-2022:3275-1
SUSELinux Enterprise Module for Server Applications 15 SP4python-typing_extensions3.10.0.0-150400.3.2.1SUSE-RU-2022:3275-1
openSUSELeap 15.3, Leap 15.4python-aiohttp3.6.0-150100.3.9.1SUSE-RU-2022:3275-1
openSUSELeap 15.4python-typing_extensions3.10.0.0-150400.3.2.1SUSE-RU-2022:3275-1
openSUSETumbleweedpython-aiohttp3.14.3-1.1openSUSE-SU-2026:11467-1
openSUSETumbleweedpython-aiohttp3.8.5-2.1openSUSE-SU-2024:13209-1
Azure Linux3python-aiohttpno fix listedAZL-44805

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Satellite version 6.7 onward (mostly pulp part) does ship an affected version of aiohttp, however, is not vulnerable since the product code does not use the normalize_path_middleware function, which the attacker may use for an attack. We may update the python-aiohttp dependency in a future release.

ProductPackageStateAdvisory
Red Hat Satellite 6.10 for RHEL 7python-aiohttp-0:3.7.4-1.el7pcFixed 2021-11-16RHSA-2021:4702
Red Hat Ansible Automation Platform 1.2aiohttpNot affected
Red Hat Ansible Automation Platform 1.2python-aiohttpNot affected
Red Hat Ansible Tower 3aiohttpNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-21330.

Attack patterns (CAPEC)

  • CAPEC-178 Cross-Site Flashing Likelihood: Medium · Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON