GHSA-vfq6-hq5r-27r6 CVE-2019-19844 PYSEC-2019-16
Django Potential account hijack via password reset form
- Severity
- 0.0 / 10
- Critical · CVSS 4.0
- Exploit chance (EPSS)
- 53.56%
- Chance of exploitation in the next 30 days. Higher than 98.99% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-640 Weak Password Recovery Mechanism for Forgotten Password
- Fix
1.11.27- Upgrade django to this version or later
Description
Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. A suitably crafted email address (that is equal to an existing user's email address after case transformation of Unicode characters) would allow an attacker to be sent a password reset token for the matched user account. (One mitigation in the new releases is to send password reset tokens only to the registered user email address.)
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| django | < 1.11.27 |
1.11.27 |
| django | >= 2.0, < 2.2.9 |
2.2.9 |
| django | >= 3.0, < 3.0.1 |
3.0.1 |
| django | < 1.11.27>= 2.2, < 2.2.9 |
1.11.272.2.9 |
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 → 1.11.27
- pip
pip install --upgrade "django>=1.11.27"- poetry
poetry add "django>=1.11.27"- uv
uv add "django>=1.11.27"
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- High
- Availability (vulnerable system)
- High
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
CVSS 3.1 9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-640: Weak Password Recovery Mechanism for Forgotten Password
The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak.
How to prevent it
- Architecture and Design: Make sure that all input supplied by the user to the password recovery mechanism is thoroughly filtered and validated.
- Architecture and Design: Do not use standard weak security questions and use several security questions.
- Architecture and Design: Make sure that there is throttling on the number of incorrect answers to a security question. Disable the password recovery functionality after a certain (small) number of incorrect guesses.
- Architecture and Design: Require that the user properly answers the security question prior to resetting their password and sending the new password to the e-mail address of record.
- Architecture and Design: Never allow the user to control what e-mail address the new password will be sent to in the password recovery mechanism.
- Architecture and Design: Assign a new temporary password rather than revealing the original password.
References
Advisories
Write-ups
Packages
Other links
- github.com/django/django/commit/302a4ff1e8b1c798aab97673909c7a3dfda42c26
- github.com/django/django/commit/4d334bea06cac63dc1272abcec545b85136cca0e
- github.com/django/django/commit/5b1fbcef7a8bec991ebe7b2a18b5d5a95d72cb70
- github.com/django/django/commit/f4cff43bf921fcea6a29b726eb66767f67753fa2
- djangoproject.com/weblog/2019/dec/18/security-releases
- debian.org/security/2020/dsa-4598
- usn.ubuntu.com/4224-1
- security.netapp.com/advisory/ntap-20200110-0003
- security.gentoo.org/glsa/202004-17
- seclists.org/bugtraq/2020/Jan/9
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HCM2D…
- groups.google.com/forum
- github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2019-16.yaml
- docs.djangoproject.com/en/dev/releases/security
- packetstormsecurity.com/files/155872/Django-Account-Hijack.html
- docs.djangoproject.com/en/dev/releases/security
- usn.ubuntu.com/4224-1
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HCM2D…
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