{"id":"CVE-2021-21330","aliases":["CVE-2021-21330","GHSA-v6wp-4m6f-gcjg","PYSEC-2021-76"],"related":[],"kind":"vulnerability","state":"published","title":"Open redirect vulnerability in aiohttp","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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":"cvelist"},{"lang":"en","text":"### Impact\n\nOpen redirect vulnerability — a maliciously crafted link to an aiohttp-based web-server could redirect the browser to a different website.\n\nIt is caused by a bug in the `aiohttp.web_middlewares.normalize_path_middleware` middleware.\n\n### Patches\n\nThis security problem has been fixed in v3.7.4. Upgrade your dependency as follows:\n[`pip install aiohttp >= 3.7.4`]\n\n### Workarounds\n\nIf upgrading is not an option for you, a workaround can be to avoid using `aiohttp.web_middlewares.normalize_path_middleware` in your applications.\n\n### References\n\n* [aiohttp @ PyPI]\n* [GHSA-v6wp-4m6f-gcjg]\n* [OWASP page on open redirects]\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in the [aiohttp repo](https://github.com/aio-libs/aiohttp/issues/new/choose)\n* Email us at wk+aio-libs-security@sydorenko.org.ua and/or andrew.svetlov+aio-libs-security@gmail.com\n\nCredit: [Jelmer Vernooĳ] and [Beast Glatisant].\n\n[aiohttp @ PyPI]: https://pypi.org/p/aiohttp\n[`pip install aiohttp >= 3.7.4`]: https://pypi.org/project/aiohttp/3.7.4/\n[GHSA-v6wp-4m6f-gcjg]: https://github.com/aio-libs/aiohttp/security/advisories/GHSA-v6wp-4m6f-gcjg\n[OWASP page on open redirects]:\nhttps://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html\n\n[Jelmer Vernooĳ]: https://jelmer.uk\n[Beast Glatisant]: https://github.com/g147","format":"markdown","source":"ghsa"},{"lang":"es","text":"aiohttp es un framework cliente/servidor HTTP asincrónico para asyncio y Python.&#xa0;En aiohttp versiones anteriores a 3.7.4, se presenta una vulnerabilidad de redireccionamiento abierto.&#xa0;Un enlace diseñado malicioso en un servidor web basado en aiohttp podría redireccionar el navegador a un sitio web diferente.&#xa0;Es causado por un error en el middleware \"aiohttp.web_middlewares.normalize_path_middleware\".&#xa0;Este problema de seguridad ha sido corregido en versión 3.7.4.&#xa0;Actualice su dependencia usando pip de la siguiente manera \"pip install aiohttp versiones posteriores o incluyendo a 3.7.4\".&#xa0;Si la actualización no es una opción para usted, una solución alternativa puede ser evitar el uso de \"aiohttp.web_middlewares.normalize_path_middleware\" en sus aplicaciones","source":"nvd"}],"published":"2021-02-26T02:11:57.000Z","modified":"2026-07-08T06:27:43.955Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N","score":3.1,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N","score":3.1,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N","score":3.1,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","score":5.8,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 3.7.4","status":"affected"}],"vendor":"aio-libs","product":"aiohttp","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.7.4"}],"ecosystem":"PyPI","package":"aiohttp","purl":"pkg:pypi/aiohttp","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.7.4"}],"vendor":"aiohttp","product":"aiohttp","cpe":"cpe:2.3:a:aiohttp:aiohttp:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"33"},{"status":"affected","version":"34"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"2545222a3853e31ace15d87ae0e2effb7da0c96b"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.7.4"}],"ecosystem":"PyPI","package":"aiohttp","purl":"pkg:pypi/aiohttp","repo":"https://github.com/aio-libs/aiohttp","source":"pysec"}],"references":[{"url":"https://github.com/aio-libs/aiohttp/security/advisories/GHSA-v6wp-4m6f-gcjg","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/aio-libs/aiohttp/commit/2545222a3853e31ace15d87ae0e2effb7da0c96b","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst#374-2021-02-25","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://pypi.org/project/aiohttp/","tags":["package","product","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://www.debian.org/security/2021/dsa-4864","tags":["advisory","third-party-advisory","vendor-advisory","web","x-refsource-debian","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.gentoo.org/glsa/202208-19","tags":["third-party-advisory","vendor-advisory","web","x-refsource-gentoo","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21330","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/aio-libs/aiohttp","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/aiohttp/PYSEC-2021-76.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/aiohttp","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5/","tags":["web"],"sources":["pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L/","tags":["web"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-21330","url":"https://www.cve.org/CVERecord?id=CVE-2021-21330","licence":"CVE Terms of Use","modified":"2024-08-03T18:09:15.080Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v6wp-4m6f-gcjg","url":"https://github.com/advisories/GHSA-v6wp-4m6f-gcjg","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:43.955Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-21330","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21330","licence":"Public domain","modified":"2026-06-17T03:35:18.640Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-76","url":"https://osv.dev/vulnerability/PYSEC-2021-76","licence":"CC-BY-4.0","modified":"2023-11-08T04:04:41.517Z"}],"updatedAt":"2026-11-25T22:58:00.076Z","epss":{"score":0.01719,"percentile":0.78143,"date":"2026-12-01T12:00:22.000Z"}}