CVE-2019-16766: Wagtail 2fa 2FA Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-89px-ww3j-g2mm
CVSS 8.7
CWE-304 CWE-290
Published
Advisory Summary

CVE-2019-16766 is a MODERATE (CVSS 8.7) 2fa bypass vulnerability (CWE-304: Missing Critical Step in Authentication) affecting Wagtail 2fa libraries in the PyPI ecosystem. The issue involves 2fa bypass in wagtail through new device path. Remediation is available by upgrading affected packages to version 1.3.0.

CVE-2019-16766 at a Glance

CVE Identifier CVE-2019-16766
GHSA Identifier GHSA-89px-ww3j-g2mm
Severity MODERATE
CVSS v3.1 Base Score 8.7
CWE Classification CWE-304: Missing Critical Step in Authentication
Affected Product Wagtail 2fa
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2019-16766

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.

wagtail-2fa fixed: 1.3.0
pip install wagtail-2fa>=1.3.0
Verify Direct and Transitive Dependencies

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-2019-16766, 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.3.0), 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-304: Missing Critical Step in Authentication, where the product implements an authentication technique, but it skips a step that weakens the technique. 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

## 2FA bypass through new device path ### Impact If someone gains access to someone's Wagtail login credentials, they can log into the CMS and bypass the 2FA check by changing the URL. They can then add a new device and gain full access to the CMS. ### Patches This problem has been patched in version 1.3.0. ### Workarounds There is no workaround at the moment. ### For more information If you have any questions or comments about this advisory: * Open an issue in [github.com/labd/wagtail-2fa](https://github.com/labd/wagtail-2fa) * Email us at [security@labdigital.nl](mailto:security@labdigital.nl)

CVE-2019-16766 Affected Wagtail 2fa Versions

1 component(s)
Fixed Versions:
1.3.0
Product / Package Ecosystem Affected Versions Fixed Version
wagtail-2fa
PyPI
< 1.3.0
1.3.0

References

Frequently Asked Questions

What is CVE-2019-16766?
CVE-2019-16766 is a security vulnerability in Wagtail 2fa involving 2FA bypass in Wagtail through new device path under CWE-304: Missing Critical Step in Authentication.
Which Wagtail 2fa versions are affected?
Affected versions include releases prior to 1.3.0 across affected packages: wagtail-2fa.
What version fixes CVE-2019-16766?
Upgrading to 1.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wagtail-2fa affected?
Yes, wagtail-2fa is affected in releases prior to 1.3.0. Upgrade your dependency to 1.3.0 or later.
What is the CVSS score of CVE-2019-16766?
CVE-2019-16766 has a CVSS v3.1 base score of 8.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2019-16766?
CVE-2019-16766 is classified under CWE-304: Missing Critical Step in Authentication (The product implements an authentication technique, but it skips a step that weakens the technique.).
How can I check PyPI dependencies for CVE-2019-16766?
Run the dependency tree command: 'pip show wagtail-2fa'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-89px-ww3j-g2mm",
  "modified" : "2024-11-19T15:48:33Z",
  "published" : "2019-11-29T17:05:59Z",
  "aliases" : [ "CVE-2019-16766" ],
  "summary" : "2FA bypass in Wagtail through new device path",
  "details" : "## 2FA bypass through new device path\n\n### Impact\nIf someone gains access to someone's Wagtail login credentials, they can log into the CMS and bypass the 2FA check by changing the URL. They can then add a new device and gain full access to the CMS.\n\n### Patches\nThis problem has been patched in version 1.3.0.\n\n### Workarounds\nThere is no workaround at the moment.\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:H/UI:N/S:C/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "wagtail-2fa"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/labd/wagtail-2fa/security/advisories/GHSA-89px-ww3j-g2mm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-16766"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/labd/wagtail-2fa/commit/13b12995d35b566df08a17257a23863ab6efb0ca"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/labd/wagtail-2fa/commit/a6711b29711729005770ff481b22675b35ff5c81"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/labd/wagtail-2fa"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/wagtail-2fa/PYSEC-2019-135.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-290", "CWE-304" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:25:10Z",
    "nvd_published_at" : null
  }
}