GHSA-p99v-5w3c-jqq9
HIGH
Django Access Control Bypass possibly leading to SSRF, RFI, and LFI attacks
Published June 10, 2021Updated September 20, 2024Source: osv
Details
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+..) .
Remediation
Upgrade to the fixed version using your package manager.
pip
Update django to 3.2.4 or laterpip install "django>=3.2.4"
pip
Update django to 3.1.12 or laterpip install "django>=3.1.12"
pip
Update django to 2.2.24 or laterpip install "django>=2.2.24"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (3)
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-918Server-Side Request Forgery (SSRF)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 3.1 score means for each attack dimension.
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-33571ADVISORY
- https://github.com/django/django/commit/203d4ab9ebcd72fc4d6eb7398e66ed9e474e118eWEB
- https://github.com/django/django/commit/9f75e2e562fa0c0482f3dde6fc7399a9070b4a3dWEB
- https://github.com/django/django/commit/f27c38ab5d90f68c9dd60cabef248a570c0be8fcWEB
- https://docs.djangoproject.com/en/3.2/releases/securityWEB
- https://github.com/advisories/GHSA-p99v-5w3c-jqq9ADVISORY
- https://github.com/django/djangoPACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-99.yamlWEB
- https://groups.google.com/g/django-announce/c/sPyjSKMi8EoWEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDVWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDVWEB
- https://security.netapp.com/advisory/ntap-20210727-0004WEB
- https://www.djangoproject.com/weblog/2021/jun/02/security-releasesWEB
Risk Assessment
CVSS Score
3.1
Exploitation is difficult or impact is minor. Address in your next planned update.
EPSS Score (30-day exploit probability)
0.03%
Higher than 9% of vulnerabilities
Also Known As
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies