{"answers":{"affected":"3 open source packages ship an affected version, including django-two-factor-auth. It affects 1 product.","exploited":"There is no known exploitation of CVE-2020-15105 in the wild and no public exploit code.","fix":"Upgrade django-two-factor-auth to 1.12 or later.","what":"CVE-2020-15105 is a medium-severity vulnerability in Bouke django-two-factor-auth, published on 10 Jul 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2020-15105 and fix it if it is affected.\n\nWhat it is: CVE-2020-15105 is a medium-severity vulnerability in Bouke django-two-factor-auth, published on 10 Jul 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2020-15105 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- django-two-factor-auth (PyPI): affected all versions; fixed in 1.12\n- django-two-factor-auth (PyPI): affected all versions; fixed in 1.12\n- django-two-factor-auth (PyPI): affected all versions; fixed in 1.12\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2020-15105/ (Markdown: https://insights.sbomify.com/CVE-2020-15105/index.md)","id":"CVE-2020-15105","markdown":"https://insights.sbomify.com/CVE-2020-15105/index.md","name":"CVE-2020-15105","record":{"aliases":["GHSA-vhr6-pvjm-9qwf","PYSEC-2020-39"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Django 2FA library","requires_auth":"low_privilege","summary":"Django Two-Factor Authentication stores user passwords in clear text within sessions, potentially exposing them in databases or caches until authentication completes.","user_interaction":"required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"django_two-factor_authentication","vendor":"django_two-factor_authentication_project"}],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-312","name":"Cleartext Storage of Sensitive Information"}],"description":"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 have suffered a database breach while using an affected version should inform their users that their clear text passwords have been compromised. All organizations should encourage users whose passwords were insecurely stored to change these passwords on any sites where they were used. As a workaround, wwitching Django's session storage to use signed cookies instead of the database or cache lessens the impact of this issue, but should not be done without a thorough understanding of the security tradeoffs of using signed cookies rather than a server-side session storage. There is no way to fully mitigate the issue without upgrading.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"In Django Two-Factor Authentication, user passwords are stored in clear text in the Django session","id":"CVE-2020-15105","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"information_disclosure","year":"2020"},"n_packages":3,"n_references":3,"next":{"headline":"Improper Input Validation in etcd","id":"CVE-2020-15106"},"packages":[{"ecosystem":"PyPI","fixed":["1.12"],"introduced":["0"],"last_affected":[],"package":"django-two-factor-auth","purl":null,"source":"GHSA-vhr6-pvjm-9qwf"},{"ecosystem":"PyPI","fixed":["1.12"],"introduced":["0"],"last_affected":[],"package":"django-two-factor-auth","purl":"pkg:pypi/django-two-factor-auth","source":"GHSA-vhr6-pvjm-9qwf"},{"ecosystem":"PyPI","fixed":["1.12"],"introduced":["0"],"last_affected":[],"package":"django-two-factor-auth","purl":"pkg:pypi/django-two-factor-auth","source":"PYSEC-2020-39"}],"prev":{"headline":"TLS Validation Vulnerability in Envoy","id":"CVE-2020-15104"},"products":["django-two-factor-auth"],"published":"2020-07-10","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["Bouke"]},"summary":"Django Two-Factor Authentication stores user passwords in clear text within sessions, potentially exposing them in databases or caches until authentication completes.","url":"https://insights.sbomify.com/CVE-2020-15105/"}