CVE-2019-19844: Django Django Potential Account Hijack Vulnerability

CRITICAL
Advisory Identifier: GHSA-vfq6-hq5r-27r6
CVSS 9.8
CWE-640
Published
Advisory Summary

CVE-2019-19844 is a CRITICAL (CVSS 9.8) django potential account hijack vulnerability (CWE-640: Weak Password Recovery Mechanism for Forgotten Password) affecting Django libraries in the PyPI ecosystem. The issue involves django potential account hijack via password reset form. Remediation is available by upgrading affected packages to version 1.11.27, 2.2.9, 3.0.1.

CVE-2019-19844 at a Glance

CVE Identifier CVE-2019-19844
GHSA Identifier GHSA-vfq6-hq5r-27r6
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-640: Weak Password Recovery Mechanism for Forgotten Password
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2019-19844

To remediate this vulnerability, upgrade all affected Django dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Django fixed: 1.11.27
pip install Django>=1.11.27
Django fixed: 2.2.9
pip install Django>=2.2.9
Django fixed: 3.0.1
pip install Django>=3.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show Django

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2019-19844, inspect your installed packages using pip:

pip show Django

Analyze the terminal output to locate any version of Django in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.27), your application is affected.

Note: The pip show Django command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-640: Weak Password Recovery Mechanism for Forgotten Password, where the product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak. In Django, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2019-19844 Affected Django Versions

3 component(s)
Fixed Versions:
1.11.272.2.93.0.1
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
< 1.11.27
1.11.27
Django
PyPI
≥ 2.0
< 2.2.9
2.2.9
Django
PyPI
≥ 3.0
< 3.0.1
3.0.1

References

NVD — CVE-2019-19844 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-19844
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/302a4ff1e8b1c798aab97673909c7a3dfda42c26
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/4d334bea06cac63dc1272abcec545b85136cca0e
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/5b1fbcef7a8bec991ebe7b2a18b5d5a95d72cb70
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/f4cff43bf921fcea6a29b726eb66767f67753fa2
Django Release RELEASE
https://www.djangoproject.com/weblog/2019/dec/18/security-releases
Django Security Information SECURITY
https://www.debian.org/security/2020/dsa-4598
usn.ubuntu.com/4224-1 WEB
https://usn.ubuntu.com/4224-1
Django Security Information SECURITY
https://security.netapp.com/advisory/ntap-20200110-0003
Django Security Information SECURITY
https://security.gentoo.org/glsa/202004-17
seclists.org/bugtraq/2020/jan/9 WEB
https://seclists.org/bugtraq/2020/Jan/9
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HCM2DPUI7TOZWN4A6JFQFUVQ2XGE7GUD
groups.google.com/forum/ WEB
https://groups.google.com/forum/#!topic/django-announce/3oaB2rVH3a0
Django Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2019-16.yaml
Django Source Repository REPOSITORY
https://github.com/django/django
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-vfq6-hq5r-27r6
Django Release RELEASE
https://docs.djangoproject.com/en/dev/releases/security
Django Security Information SECURITY
http://packetstormsecurity.com/files/155872/Django-Account-Hijack.html

Frequently Asked Questions

What is CVE-2019-19844?
CVE-2019-19844 is a security vulnerability in Django involving Django Potential account hijack via password reset form under CWE-640: Weak Password Recovery Mechanism for Forgotten Password.
Which Django versions are affected?
Affected versions include releases prior to 1.11.27, 2.2.9, 3.0.1 across affected packages: Django.
What version fixes CVE-2019-19844?
Upgrading to 1.11.27, 2.2.9, 3.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 1.11.27, 2.2.9, 3.0.1. Upgrade your dependency to 1.11.27, 2.2.9, 3.0.1 or later.
What is the CVSS score of CVE-2019-19844?
CVE-2019-19844 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2019-19844?
CVE-2019-19844 is classified under 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 can I check PyPI dependencies for CVE-2019-19844?
Run the dependency tree command: 'pip show Django'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vfq6-hq5r-27r6",
  "modified" : "2024-09-20T15:01:08Z",
  "published" : "2020-01-16T22:35:12Z",
  "aliases" : [ "CVE-2019-19844" ],
  "summary" : "Django Potential account hijack via password reset form",
  "details" : "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.)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.27"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0"
      }, {
        "fixed" : "2.2.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0"
      }, {
        "fixed" : "3.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-19844"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/302a4ff1e8b1c798aab97673909c7a3dfda42c26"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/4d334bea06cac63dc1272abcec545b85136cca0e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/5b1fbcef7a8bec991ebe7b2a18b5d5a95d72cb70"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/f4cff43bf921fcea6a29b726eb66767f67753fa2"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2019/dec/18/security-releases"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2020/dsa-4598"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4224-1"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20200110-0003"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202004-17"
  }, {
    "type" : "WEB",
    "url" : "https://seclists.org/bugtraq/2020/Jan/9"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HCM2DPUI7TOZWN4A6JFQFUVQ2XGE7GUD"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!topic/django-announce/3oaB2rVH3a0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2019-16.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-vfq6-hq5r-27r6"
  }, {
    "type" : "WEB",
    "url" : "https://docs.djangoproject.com/en/dev/releases/security"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/155872/Django-Account-Hijack.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-640" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-01-16T22:34:58Z",
    "nvd_published_at" : null
  }
}