Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-33571

In Django 2.2 before 2.2.24, 3.x before 3.1.12, and 3.2 before 3.2.4, URLValidator, validate_ipv4_address, and validate_ipv46_address do not prohibit leading zero characters in octal literals. This may allow a bypass of access control that is based on IP addresses. (validate_ipv4_address and validate_ipv46_address are unaffected with Python 3.9.5+..) .

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

Source evidence

CVE-2021-33571

core-osv · Original source

Published 8 Jun 2021, 18:15 UTC

In Django 2.2 before 2.2.24, 3.x before 3.1.12, and 3.2 before 3.2.4, URLValidator, validate_ipv4_address, and validate_ipv46_address do not prohibit leading zero characters in octal literals. This may allow a bypass of access control that is based on IP addresses. (validate_ipv4_address and validate_ipv46_address are unaffected with Python 3.9.5+..) .

osv:CVE-2021-33571
Complete source record
{
  "id": "60e4bb5e6489b0702997c5ff7bcc9e6be1c252ff1c978a9188d98571badf4624",
  "url": "https://osv.dev/vulnerability/CVE-2021-33571",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-33571",
    "summary": "In Django 2.2 before 2.2.24, 3.x before 3.1.12, and 3.2 before 3.2.4, URLValidator, validate_ipv4_address, and validate_ipv46_address do not prohibit leading zero characters in octal literals. This may allow a bypass of access control that is based on IP addresses. (validate_ipv4_address and validate_ipv46_address are unaffected with Python 3.9.5+..) .",
    "evidence": "osv:CVE-2021-33571",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-33571",
      "aliases": [
        "BIT-django-2021-33571",
        "CVE-2021-33571",
        "GHSA-p99v-5w3c-jqq9",
        "PYSEC-2021-99"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/django/django",
              "type": "GIT",
              "events": [
                {
                  "introduced": "2a62cdcfec85938f40abb2e9e6a9ff497e02afe8"
                },
                {
                  "fixed": "2da029d8540ab0b2e9edcba25c4d46c52853197f"
                },
                {
                  "introduced": "2a04e24d2dfc8e60a66e4369d970913cb2112d91"
                },
                {
                  "fixed": "625d3c1c643b0eb5c84339415ca0ba9f1728efa2"
                },
                {
                  "introduced": "3591e1c1acbd7c13174275367c3fdf012cb0413b"
                },
                {
                  "fixed": "843c34b3ab921c1acf77ee2014a97bc7975595b8"
                },
                {
                  "fixed": "203d4ab9ebcd72fc4d6eb7398e66ed9e474e118e"
                },
                {
                  "fixed": "9f75e2e562fa0c0482f3dde6fc7399a9070b4a3d"
                },
                {
                  "fixed": "f27c38ab5d90f68c9dd60cabef248a570c0be8fc"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.2"
                      },
                      {
                        "fixed": "2.2.24"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.0"
                      },
                      {
                        "fixed": "3.1.12"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.2"
                      },
                      {
                        "fixed": "3.2.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "203d4ab9ebcd72fc4d6eb7398e66ed9e474e118e"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "9f75e2e562fa0c0482f3dde6fc7399a9070b4a3d"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f27c38ab5d90f68c9dd60cabef248a570c0be8fc"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-33571.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:44.267517438Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/",
        "https://groups.google.com/g/django-announce/c/sPyjSKMi8Eo",
        "https://security.netapp.com/advisory/ntap-20210727-0004/",
        "https://docs.djangoproject.com/en/3.2/releases/security/",
        "https://github.com/django/django/commit/203d4ab9ebcd72fc4d6eb7398e66ed9e474e118e",
        "https://github.com/django/django/commit/9f75e2e562fa0c0482f3dde6fc7399a9070b4a3d",
        "https://github.com/django/django/commit/f27c38ab5d90f68c9dd60cabef248a570c0be8fc",
        "https://www.djangoproject.com/weblog/2021/jun/02/security-releases/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "35"
                  },
                  {
                    "last_affected": "35"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-33571",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 386044,
  "published_at": "2021-06-08T18:15:08.517+00:00"
}