CVE-2020-5240: Wagtail 2fa 2FA Bypass Through Deleting Devices Vulnerability
MODERATECVE-2020-5240 is a MODERATE (CVSS 7.6) 2fa bypass through deleting devices vulnerability (CWE-285: Improper Authorization) affecting Wagtail 2fa libraries in the PyPI ecosystem. The issue involves 2fa bypass through deleting devices in wagtail-2fa. Remediation is available by upgrading affected packages to version 1.4.1.
CVE-2020-5240 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:N).
How to Fix CVE-2020-5240
To remediate this vulnerability, upgrade all affected Wagtail 2fa dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install wagtail-2fa>=1.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show wagtail-2fa
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2020-5240, inspect your installed packages using pip:
pip show wagtail-2fa
Analyze the terminal output to locate any version of Wagtail 2fa in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.1), your application is affected.
Note: The pip show wagtail-2fa command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Wagtail 2fa, 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
CVE-2020-5240 Affected Wagtail 2fa Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
wagtail-2fa
|
PyPI |
< 1.4.1
|
1.4.1
|
References
Frequently Asked Questions
What is CVE-2020-5240?
Which Wagtail 2fa versions are affected?
What version fixes CVE-2020-5240?
Is wagtail-2fa affected?
What is the CVSS score of CVE-2020-5240?
What CWE is associated with CVE-2020-5240?
How can I check PyPI dependencies for CVE-2020-5240?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9gjv-6qq6-v7qm",
"modified" : "2024-11-19T15:35:10Z",
"published" : "2020-03-13T21:18:55Z",
"aliases" : [ "CVE-2020-5240" ],
"summary" : "2FA bypass through deleting devices in wagtail-2fa",
"details" : "### Impact\nAny user with access to the CMS can view and delete other users' 2FA devices by going to the correct path. The user does not require special permissions in order to do so. By deleting the other user's device they can disable the target user's 2FA devices and potentially compromise the account if they figure out their password.\n\n### Patches\nThe problem has been patched in version 1.4.1.\n\n### Workarounds\nThere is no workaround for this issue.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [github.com/labd/wagtail-2fa](https://github.com/labd/wagtail-2fa)\n* Email us at [security@labdigital.nl](mailto:security@labdigital.nl)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "wagtail-2fa"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/labd/wagtail-2fa/security/advisories/GHSA-9gjv-6qq6-v7qm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5240"
}, {
"type" : "WEB",
"url" : "https://github.com/labd/wagtail-2fa/commit/ac23550d33b7436e90e3beea904647907eba5b74"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/labd/wagtail-2fa"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/wagtail-2fa/PYSEC-2020-219.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-285" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-03-13T21:18:19Z",
"nvd_published_at" : null
}
}