GHSA-wpjr-j57x-wxfw BIT-django-2020-13254 CVE-2020-13254 PYSEC-2020-31
Data leakage via cache key collision in Django
- Severity
- 0.0 / 10
- Medium · CVSS 4.0
- Exploit chance (EPSS)
- 6.09%
- Chance of exploitation in the next 30 days. Higher than 93.42% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-295 Improper Certificate Validation
- Fix
2.2.13- Upgrade django to this version or later
Description
An issue was discovered in Django version 2.2 before 2.2.13 and 3.0 before 3.0.7. In cases where a memcached backend does not perform key validation, passing malformed cache keys could result in a key collision, and potential data leakage.
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| django | >= 2.2, < 2.2.13 |
2.2.13 |
| django | >= 3.0, < 3.0.7 |
3.0.7 |
| django | >= 2.2, < 2.2.13>= 3.0, < 3.0.7 |
2.2.133.0.7 |
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.13
- pip
pip install --upgrade "django>=2.2.13"- poetry
poetry add "django>=2.2.13"- uv
uv add "django>=2.2.13"
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- Present
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- None
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
CVSS 3.1 5.9
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Weakness
CWE-295: Improper Certificate Validation
The product does not validate, or incorrectly validates, a certificate.
How to prevent it
- Architecture and Design, Implementation: Certificates should be carefully managed and checked to assure that data are encrypted with the intended owner's public key.
- Implementation: If certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the hostname.
References
Advisories
Write-ups
Packages
Other links
- github.com/django/django/commit/07e59caa02831c4569bbebb9eb773bdd9cb4b206
- github.com/django/django/commit/84b2da5552e100ae3294f564f6c862fef8d0e693
- docs.djangoproject.com/en/3.0/releases/security
- github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2020-31.yaml
- groups.google.com/d/msg/django-announce/pPEmb2ot4Fo/X-SMalYSBAAJ
- lists.debian.org/debian-lts-announce/2020/06/msg00016.html
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4A2AP…
- security.netapp.com/advisory/ntap-20200611-0002
- usn.ubuntu.com/4381-1
- usn.ubuntu.com/4381-2
- debian.org/security/2020/dsa-4705
- djangoproject.com/weblog/2020/jun/03/security-releases
- oracle.com/security-alerts/cpujan2021.html
- docs.djangoproject.com/en/3.0/releases/security
- usn.ubuntu.com/4381-1
- usn.ubuntu.com/4381-2
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4A2AP…
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