CVE-2020-5240 is a high-severity (CVSS 8.5) CWE-285 vulnerability in wagtail-2fa. A fix is available for wagtail-2fa — see the affected versions and patch details below.
2FA bypass through deleting devices in wagtail-2fa
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
wagtail-2faReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Impact
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 user's device they can disable the target user's 2FA devices and potentially compromise the account if they figure out their password.
Patches
The problem has been patched in version 1.4.1.
Workarounds
There is no workaround for this issue.
For more information
If you have any questions or comments about this advisory:
- Open an issue in github.com/labd/wagtail-2fa
- Email us at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | wagtail-2fa | all versions | 1.4.1pip install --upgrade 'wagtail-2fa==1.4.1' |
Affected Products
wagtail-2falabdigitalDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for wagtail-2fa, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update wagtail-2fa to 1.4.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-5240 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is CVE-2020-5240 in your dependencies?
Find it across PyPI, including transitive dependencies.