# CVE-2020-5240: 2FA bypass through deleting devices in wagtail-2fa

Source: https://junglewise.ai/threats/cve-2020-5240-2fa-bypass-through-deleting-devices-in-wagtail-2fa  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-03-13  
License: CC BY 4.0 with a link back

CVE-2020-5240 · Severity: low · CVSS 3.1 · Published 2020-03-13

In wagtail-2fa before 1.4.1, any 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 users device they can disable the target users 2FA devices and potentially compromise the account if they figure out their password. The problem has been patched in version 1.4.1.

Technologies: [wagtail-2fa (PyPI)](https://junglewise.ai/threats/technologies/wagtail-2fa). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2020-5240 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2020-5240 being exploited in the wild.

**How severe is CVE-2020-5240?** Low severity, with a CVSS score of 3.1, published 13 March 2020.

**Which products and versions are affected?** wagtail-2fa (PyPI) ECOSYSTEM:introduced=0,fixed=1.4.1, GIT:introduced=0,fixed=ac23550d33b7436e90e3beea904647907eba5b74|ECOSYSTEM:introduced=0,fixed=1.4.1.

**Is there a fix for CVE-2020-5240?** Yes. wagtail-2fa (PyPI): upgrade to 1.4.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2020-5240?** Check whether you run wagtail-2fa (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- wagtail-2fa (PyPI): upgrade to 1.4.1 or later

  ```sh
  pip install "wagtail-2fa>=1.4.1"
  ```


## Affected products

- wagtail-2fa (PyPI) ECOSYSTEM:introduced=0,fixed=1.4.1, GIT:introduced=0,fixed=ac23550d33b7436e90e3beea904647907eba5b74|ECOSYSTEM:introduced=0,fixed=1.4.1

## Identifiers

- CVE-2020-5240
- GHSA-9gjv-6qq6-v7qm
- PYSEC-2020-219

## Related threats

- [2FA bypass in Wagtail through new device path](https://junglewise.ai/threats/cve-2019-16766-2fa-bypass-in-wagtail-through-new-device-path)
- [PYSEC-2019-65 - When using wagtail-2fa before 1.3.0, if someone gains access to someone's Wagtail login credentials…](https://junglewise.ai/threats/pysec-2019-65-when-using-wagtail-2fa-before-1-3-0-if-someone-gains-c372df29)
