GHSA-fr28-569j-53c4 BIT-django-2020-24584 CVE-2020-24584 PYSEC-2020-34
Django Incorrect Default Permissions
- Severity
- 0.0 / 10
- High · CVSS 4.0
- Exploit chance (EPSS)
- 3.30%
- Chance of exploitation in the next 30 days. Higher than 88.51% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-276 Incorrect Default Permissions
- Fix
2.2.16- Upgrade django to this version or later
Description
An issue was discovered in Django 2.2 before 2.2.16, 3.0 before 3.0.10, and 3.1 before 3.1.1 (when Python 3.7+ is used). The intermediate-level directories of the filesystem cache had the system's standard umask rather than 0o077.
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| django | >= 2.2, < 2.2.16 |
2.2.16 |
| django | >= 3.0, < 3.0.10 |
3.0.10 |
| django | >= 3.1, < 3.1.1 |
3.1.1 |
| django | >= 2.2, < 2.2.16>= 3.0, < 3.0.10>= 3.1, < 3.1.1 |
2.2.163.0.103.1.1 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
django PyPI → 2.2.16
- pip
pip install --upgrade "django>=2.2.16"- poetry
poetry add "django>=2.2.16"- uv
uv add "django>=2.2.16"
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- None
- Integrity (vulnerable system)
- Low
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
CVSS 3.1 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Weakness
CWE-276: Incorrect Default Permissions
During installation, installed file permissions are set to allow anyone to modify those files.
How to prevent it
- Architecture and Design, Operation: The architecture needs to access and modification attributes for files to only those users who actually require those actions.
- Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
References
Advisories
Write-ups
Packages
Other links
- github.com/django/django/commit/1853724acaf17ed7414d54c7d2b5563a25025a71
- github.com/django/django/commit/2b099caa5923afa8cfb5f1e8c0d56b6e0e81915b
- github.com/django/django/commit/a3aebfdc8153dc230686b6d2454ccd32ed4c9e6f
- github.com/django/django/commit/cdb367c92a0ba72ddc0cbd13ff42b0e6df709554
- oracle.com/security-alerts/cpujan2021.html
- openwall.com/lists/oss-security/2020/09/01/2
- djangoproject.com/weblog/2020/sep/01/security-releases
- usn.ubuntu.com/4479-1
- security.netapp.com/advisory/ntap-20200918-0004
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZCRPQ…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OLGFF…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F2ZHO…
- groups.google.com/forum
- groups.google.com/forum
- github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2020-34.yaml
- docs.djangoproject.com/en/dev/releases/security
- docs.djangoproject.com/en/dev/releases/security
- usn.ubuntu.com/4479-1
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F2ZHO…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZCRPQ…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OLGFF…
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-q238-5cxm-5c9h Django GeoDjango vulnerable to denial of service through deeply nested geometry collections | Medium | Also affects django |
| GHSA-wvqv-fj8w-qmhm Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsing | High | Also affects django |
| GHSA-8qcx-xf44-272x Django: DomainNameValidator permits newline characters that may enable HTTP header injection | Medium | Also affects django |
| GHSA-crhf-3pfg-w68w Django: GDALRaster may over-read heap memory when constructed from bytes | Medium | Also affects django |
| GHSA-3h9f-r86x-qvjx Django: cache middleware may expose private responses when unrelated request cookies are present | Medium | Also affects django |
| GHSA-8cjm-8mp7-r2xf Django: UpdateCacheMiddleware may disclose cached responses due to case-sensitive Cache-Control handling | Medium | Also affects django |
| GHSA-mm6v-q8q9-pgcf Django fails to prevent reuse of a partially-initialized connection after a failed `STARTTLS` handshake | Low | Also affects django |
| GHSA-h7pc-vwp9-298g Django: signed cookies are vulnerable to salt namespace collisions | Medium | Also affects django |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor