Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2020-15105

Django Two-Factor Authentication before 1.12, stores the user's password in clear text in the user session (base64-encoded). The password is stored in the session when the user submits their username and password, and is removed once they complete authentication by entering a two-factor authentication code. This means that the password is stored in clear text in the session for an arbitrary amount of time, and potentially forever if the user begins the login process by entering their username and password and then leaves before entering their two-factor authentication code. The severity of this issue depends on which type of session storage you have configured: in the worst case, if you're using Django's default database session storage, then users' passwords are stored in clear text in your database. In the best case, if you're using Django's signed cookie session, then users' passwords are only stored in clear text within their browser's cookie store. In the common case of using Django's cache session store, the users' passwords are stored in clear text in whatever cache storage you have configured (typically Memcached or Redis). This has been fixed in 1.12. After upgrading, users should be sure to delete any clear text passwords that have been stored. For example, if you're using the database session backend, you'll likely want to delete any session record from the database and purge that data from any database backups or replicas. In addition, affected organizations who h

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2020-15105
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 10:52 UTC · Revision 1

Source evidence

CVE-2020-15105

core-osv · Original source

Published 10 Jul 2020, 21:15 UTC

Django Two-Factor Authentication before 1.12, stores the user's password in clear text in the user session (base64-encoded). The password is stored in the session when the user submits their username and password, and is removed once they complete authentication by entering a two-factor authentication code. This means that the password is stored in clear text in the session for an arbitrary amount of time, and potentially forever if the user begins the login process by entering their username and password and then leaves before entering their two-factor authentication code. The severity of this issue depends on which type of session storage you have configured: in the worst case, if you're using Django's default database session storage, then users' passwords are stored in clear text in your database. In the best case, if you're using Django's signed cookie session, then users' passwords are only stored in clear text within their browser's cookie store. In the common case of using Django's cache session store, the users' passwords are stored in clear text in whatever cache storage you have configured (typically Memcached or Redis). This has been fixed in 1.12. After upgrading, users should be sure to delete any clear text passwords that have been stored. For example, if you're using the database session backend, you'll likely want to delete any session record from the database and purge that data from any database backups or replicas. In addition, affected organizations who h

osv:CVE-2020-15105
Complete source record
{
  "id": "4f0030a42a20c03b90bed7248bc6a91b11dacea1677c41e72b3caddf4af839d0",
  "url": "https://osv.dev/vulnerability/CVE-2020-15105",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2020-15105",
    "summary": "Django Two-Factor Authentication before 1.12, stores the user's password in clear text in the user session (base64-encoded). The password is stored in the session when the user submits their username and password, and is removed once they complete authentication by entering a two-factor authentication code. This means that the password is stored in clear text in the session for an arbitrary amount of time, and potentially forever if the user begins the login process by entering their username and password and then leaves before entering their two-factor authentication code. The severity of this issue depends on which type of session storage you have configured: in the worst case, if you're using Django's default database session storage, then users' passwords are stored in clear text in your database. In the best case, if you're using Django's signed cookie session, then users' passwords are only stored in clear text within their browser's cookie store. In the common case of using Django's cache session store, the users' passwords are stored in clear text in whatever cache storage you have configured (typically Memcached or Redis). This has been fixed in 1.12. After upgrading, users should be sure to delete any clear text passwords that have been stored. For example, if you're using the database session backend, you'll likely want to delete any session record from the database and purge that data from any database backups or replicas. In addition, affected organizations who h",
    "evidence": "osv:CVE-2020-15105",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2020-15105",
      "aliases": [
        "CVE-2020-15105",
        "GHSA-vhr6-pvjm-9qwf",
        "PYSEC-2020-39"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/jazzband/django-two-factor-auth",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "e23e9bba70c390b80f2dc5fed5057a825a2126ae"
                },
                {
                  "fixed": "454fd9842fa6e8bb772dbf0943976bc8e3335359"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:django_two-factor_authentication_project:django_two-factor_authentication:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.12"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "454fd9842fa6e8bb772dbf0943976bc8e3335359"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.11.0",
            "1.10.0",
            "1.9.1",
            "1.9.0",
            "1.8.0",
            "1.7.0",
            "1.6.2",
            "1.6.1",
            "1.6.0",
            "1.5.0",
            "1.4.0",
            "1.3.1",
            "1.3.0",
            "1.2.0",
            "1.1.1",
            "1.1.0",
            "1.0.0",
            "1.0.0-beta3",
            "1.0.0-beta2",
            "1.0.0-beta1",
            "0.5.0",
            "0.4.0",
            "0.3.1",
            "0.3.0",
            "0.2.3",
            "0.2.2",
            "0.2.1",
            "0.2.0",
            "0.1.2",
            "0.1.1",
            "0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-15105.json"
          }
        }
      ],
      "modified": "2026-10-20T10:51:52.345664579Z",
      "provider": "osv",
      "references": [
        "https://github.com/Bouke/django-two-factor-auth/blob/master/CHANGELOG.md#112---2020-07-08",
        "https://github.com/Bouke/django-two-factor-auth/security/advisories/GHSA-vhr6-pvjm-9qwf",
        "https://github.com/Bouke/django-two-factor-auth/commit/454fd9842fa6e8bb772dbf0943976bc8e3335359"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2020-15105",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 383058,
  "published_at": "2020-07-10T21:15:10.95+00:00"
}