Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-21330

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-21330
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:32 UTC · Revision 1

Source evidence

CVE-2021-21330

core-osv · Original source

Published 26 Feb 2021, 03:15 UTC

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.

osv:CVE-2021-21330
Complete source record
{
  "id": "62dbeedb56a395ab0564a10bc0824016cab2db3fbd1f5f28b3a608830cb05beb",
  "url": "https://osv.dev/vulnerability/CVE-2021-21330",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-21330",
    "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.",
    "evidence": "osv:CVE-2021-21330",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-21330",
      "aliases": [
        "CVE-2021-21330",
        "GHSA-v6wp-4m6f-gcjg",
        "PYSEC-2021-76"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/aio-libs/aiohttp",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0a26acc1de9e1b0244456b7881ec16ba8bb64fc3"
                },
                {
                  "fixed": "2545222a3853e31ace15d87ae0e2effb7da0c96b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:aiohttp:aiohttp:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.7.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "2545222a3853e31ace15d87ae0e2effb7da0c96b"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.7.3",
            "v3.7.2",
            "v3.7.1",
            "v3.7.0",
            "v3.7.0b1",
            "v3.7.0b0",
            "v3.6.2",
            "v3.6.2a2",
            "v3.6.2a1",
            "v4.0.0a1",
            "v3.6.1",
            "v3.6.1b4",
            "v3.6.1b3",
            "v3.6.0",
            "v3.6.0b0",
            "v3.6.0a12",
            "v3.6.0a11",
            "v3.6.0a10",
            "v3.6.0a9",
            "v3.6.0a8",
            "v3.6.0a7",
            "v3.6.0a6",
            "v3.6.0a5",
            "v3.6.0a4",
            "v3.6.0a3",
            "v3.6.0a2",
            "v3.6.0a1",
            "v3.6.0a0",
            "v3.5.4",
            "v3.5.3",
            "v3.5.2",
            "v4.0.0a0",
            "v3.5.1",
            "v3.5.0",
            "v3.5.0b3",
            "v3.5.0b2",
            "v3.5.0b1",
            "v3.5.0a1",
            "v3.4.0",
            "v3.4.0b2",
            "v3.4.0b1",
            "v3.4.0a3",
            "v3.4.0a0",
            "v3.2.0",
            "v3.1.0",
            "v3.0.0b4",
            "v3.0.0b3",
            "v3.0.0b2",
            "v3.0.0b1",
            "v3.0.0b0",
            "v2.3.0",
            "v2.3.0a4",
            "v2.3.0a3",
            "v2.3.0a2",
            "v2.3.0a1",
            "v2.2.0",
            "v2.1.0",
            "2.0.0",
            "2.0.0rc1",
            "1.3.0",
            "v1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v1.0.1",
            "v1.0.0",
            "v0.22.1",
            "v0.22.0",
            "v0.22.0b6",
            "v0.22.0b5",
            "v0.22.0b4",
            "v0.22.0b3",
            "v0.22.0b2",
            "v0.22.0b1",
            "v0.22.0b0",
            "4v0.21.6",
            "v0.21.0",
            "v0.20.1",
            "v0.20.0",
            "v0.19.0",
            "v0.18.0",
            "v0.17.0",
            "v0.16.3",
            "v0.16.2",
            "v0.16.1",
            "v0.16.0",
            "v0.15.3",
            "0.15.2",
            "v0.15.2",
            "v0.15.1",
            "v0.15.0",
            "v0.14.4",
            "v0.14.3",
            "v0.14.2",
            "v0.14.1",
            "v0.14.0",
            "v0.13.1",
            "v0.13.0",
            "v0.12.0",
            "v0.11.0",
            "v0.10.1",
            "v0.10.0",
            "v0.9.2",
            "v0.9.1",
            "v0.9.0",
            "v0.8.4",
            "v0.8.3",
            "0.8.2",
            "v0.8.1",
            "v0.8.0",
            "v0.7.3",
            "v0.7.2",
            "v0.7.1",
            "v0.7.0",
            "v.0.6.5",
            "v0.6.4",
            "v0.6.3",
            "v0.6.2",
            "v0.6.1",
            "v0.5.0",
            "v0.4.2",
            "v0.4.1",
            "v0.4",
            "v0.3",
            "v0.2",
            "v0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21330.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:29.054143098Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FU7ENI54JNEK3PHEFGCE46DGMFNTVU6L/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JN3V7CZJRT4QFCVXB6LDPCJH7NAOFCA5/",
        "https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst#374-2021-02-25",
        "https://github.com/aio-libs/aiohttp/security/advisories/GHSA-v6wp-4m6f-gcjg",
        "https://security.gentoo.org/glsa/202208-19",
        "https://www.debian.org/security/2021/dsa-4864",
        "https://github.com/aio-libs/aiohttp/commit/2545222a3853e31ace15d87ae0e2effb7da0c96b",
        "https://pypi.org/project/aiohttp/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "10.0"
                  },
                  {
                    "last_affected": "10.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*",
              "cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "33"
                  },
                  {
                    "last_affected": "33"
                  },
                  {
                    "introduced": "34"
                  },
                  {
                    "last_affected": "34"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-21330",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 385442,
  "published_at": "2021-02-26T03:15:12.84+00:00"
}