Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

wagtail-2fa

Latest version: v2.0.0

Overview

Last scanned
17 Nov 2026
Published
17 Nov 2026
PyPI package Publisher: blurrah, labdigital, mikedingjan, mvt, nnist
98 Stars
52 Forks
1 Versions
12.3K Downloads
Python Repo language

Scan summary

wagtail-2fa was last scanned on 17 Nov 2026 at version 2.0.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 17 Nov 2026.
  • Findings: No rules fired in version 2.0.0.
  • Downloads: 12,252 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
2.0.0 LATEST 17 Nov 2026 No rules fired

No rules fired in 2.0.0

Findings

Findings for v2.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.0.0; other versions have their own rules, not their own score.

Known vulnerabilities

2 CVEs · last 13 Mar 2020

0 CRITICAL 2 HIGH 0 MEDIUM 0 LOW

Versions

  • ≥ 1.4.1
  • ≥ 1.3.0, < 1.4.1 1 HIGH
  • < 1.3.0 2 HIGH

Vulnerabilities

  • CVE-2020-5240 High 13 Mar 2020 2FA bypass through deleting devices in wagtail-2fa Fixed in 1.4.1
  • CVE-2019-16766 High 29 Nov 2019 2FA bypass in Wagtail through new device path Fixed in 1.3.0

README

The publisher’s own README, as collected from the registry.

=========== wagtail-2fa

.. image:: https://img.shields.io/pypi/v/wagtail-2fa.svg :target: https://pypi.org/project/wagtail-2fa/

.. image:: https://github.com/labd/wagtail-2fa/actions/workflows/python-test.yml/badge.svg :target: https://github.com/labd/wagtail-2fa/actions/workflows/python-test.yml

.. image:: https://readthedocs.org/projects/wagtail-2fa/badge/?version=stable :target: https://wagtail-2fa.readthedocs.io/en/stable/?badge=stable

This Django app adds two factor authentication to Wagtail. Behind the scenes it use django-otp_ which supports Time-based One-Time Passwords (TOTP). This allows you to use various apps like Authy, Google Authenticator, or 1Password.

.. _django-otp: https://django-otp-official.readthedocs.io

Installation

.. code-block:: shell

pip install wagtail-2fa

Then add the following lines to the INSTALLED_APPS list in your Django settings:

.. code-block:: python

INSTALLED_APPS = [
    # ...
    'wagtail_2fa',
    'django_otp',
    'django_otp.plugins.otp_totp',
    # ...
]

Next add the required middleware to the MIDDLEWARE. It should come after the AuthenticationMiddleware:

.. code-block:: python

MIDDLEWARE = [
    # .. other middleware
    # 'django.contrib.auth.middleware.AuthenticationMiddleware',

    'wagtail_2fa.middleware.VerifyUserMiddleware',

    # 'wagtail.core.middleware.SiteMiddleware',
    # .. other middleware
]

Migrate your database:

.. code-block:: shell

python manage.py migrate

Settings

The following settings are available (Set via your Django settings):

  • WAGTAIL_2FA_REQUIRED (default False): When set to True all staff, superuser and other users with access to the Wagtail Admin site are forced to login using two factor authentication.
  • WAGTAIL_2FA_OTP_TOTP_NAME (default: False): The issuer name to identify which site is which in your authenticator app. If not set and WAGTAIL_SITE_NAME is defined it uses this. sets OTP_TOTP_ISSUER under the hood.

Making 2FA optional

With the default VerifyUserMiddleware middleware, 2FA is enabled for every user. To make 2FA optional, use the VerifyUserPermissionsMiddleware middleware instead.

To do so, use the VerifyUserPermissionsMiddleware middleware instead of the VerifyUserMiddleware in your Django settings:

.. code-block:: python

MIDDLEWARE = [
    # ...
    # 'wagtail_2fa.middleware.VerifyUserMiddleware',
    'wagtail_2fa.middleware.VerifyUserPermissionsMiddleware',
    # ...
]

When this middleware is used, a checkbox is added to the group permissions and 2FA can be enabled or disabled per group.

2FA is always enabled for superusers, regardless of the middleware used.

Sandbox

First create a new virtualenv with Python 3.11 or newer and activate it. Then run the following commands:

.. code-block:: shell

make sandbox

You can then visit http://localhost:8000/admin/ and login with the following credentials:

  • E-mail: superuser@example.com
  • Password: testing

Releasing

Releases are managed with changie <https://changie.dev>_:

  1. Add a changelog entry to your pull request with changie new.
  2. After merging to master, a release pull request is opened (or updated) automatically, with the new version and the updated CHANGELOG.md.
  3. Merging the release pull request creates the GitHub release, which publishes the package to PyPI.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases wagtail-2fa

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229