CVE-2019-12887: LinOTP LinOTP Replay Vulnerability With Auto Vulnerability

CRITICAL
Advisory Identifier: GHSA-rqg8-xjp2-pg9w
CVSS 8.1
CWE-294
Published
Advisory Summary

CVE-2019-12887 is a CRITICAL (CVSS 8.1) linotp replay vulnerability with auto vulnerability (CWE-294: Authentication Bypass by Capture-replay) affecting LinOTP libraries in the PyPI ecosystem. The issue involves linotp replay vulnerability with auto resynchronization enabled for totp token. Remediation is available by upgrading affected packages to version 2.11.1.

CVE-2019-12887 at a Glance

CVE Identifier CVE-2019-12887
GHSA Identifier GHSA-rqg8-xjp2-pg9w
Severity CRITICAL
CVSS v3.1 Base Score 8.1
CWE Classification CWE-294: Authentication Bypass by Capture-replay
Affected Product LinOTP
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

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

How to Fix CVE-2019-12887

To remediate this vulnerability, upgrade all affected LinOTP dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

LinOTP fixed: 2.11.1
pip install LinOTP>=2.11.1
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 LinOTP

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2019-12887, inspect your installed packages using pip:

pip show LinOTP

Analyze the terminal output to locate any version of LinOTP in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.1), your application is affected.

Note: The pip show LinOTP command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-294: Authentication Bypass by Capture-replay, where a capture-replay flaw exists when the design of the product makes it possible for a malicious user to sniff network traffic and bypass authentication by replaying it to the server in question to the same effect as the original message (or with minor changes). In LinOTP, 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

LinOTP is prone to a replay attack with activated automatic resynchronization. This vulnerability may allow an attacker to successfully log in with OTP values recorded at a previous point in time. This attack is only possible if automatic resynchronization is enabled for the TOTP token type. The automatic resynchronization is deactivated by default. All other tokens are unaffected.

CVE-2019-12887 Affected LinOTP Versions

1 component(s)
Fixed Versions:
2.11.1
Product / Package Ecosystem Affected Versions Fixed Version
LinOTP
PyPI
< 2.11.1
2.11.1

References

Frequently Asked Questions

What is CVE-2019-12887?
CVE-2019-12887 is a security vulnerability in LinOTP involving LinOTP replay vulnerability with auto resynchronization enabled for TOTP token under CWE-294: Authentication Bypass by Capture-replay.
Which LinOTP versions are affected?
Affected versions include releases prior to 2.11.1 across affected packages: LinOTP.
What version fixes CVE-2019-12887?
Upgrading to 2.11.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is LinOTP affected?
Yes, LinOTP is affected in releases prior to 2.11.1. Upgrade your dependency to 2.11.1 or later.
What is the CVSS score of CVE-2019-12887?
CVE-2019-12887 has a CVSS v3.1 base score of 8.1 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2019-12887?
CVE-2019-12887 is classified under CWE-294: Authentication Bypass by Capture-replay (A capture-replay flaw exists when the design of the product makes it possible for a malicious user to sniff network traffic and bypass authentication by replaying it to the server in question to the same effect as the original message (or with minor changes).).
How can I check PyPI dependencies for CVE-2019-12887?
Run the dependency tree command: 'pip show LinOTP'. 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-rqg8-xjp2-pg9w",
  "modified" : "2024-09-30T16:45:35Z",
  "published" : "2022-05-24T16:48:44Z",
  "aliases" : [ "CVE-2019-12887" ],
  "summary" : "LinOTP replay vulnerability with auto resynchronization enabled for TOTP token",
  "details" : "LinOTP is prone to a replay attack with activated automatic resynchronization. This vulnerability may allow an attacker to successfully log in with OTP values recorded at a previous point in time.\n\nThis attack is only possible if automatic resynchronization is enabled for the TOTP token type. The automatic resynchronization  is deactivated by default. All other tokens are unaffected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "LinOTP"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.11.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-12887"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/LinOTP/LinOTP/commit/6d28d93af59d2ce0d844a6a3282148064efc6ad8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/LinOTP/LinOTP"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/linotp/PYSEC-2019-103.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://linotp.org/linotp-hotfix-autoresync.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.linotp.org/CVE-2019-12887.txt"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-294" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-29T09:47:34Z",
    "nvd_published_at" : "2019-06-27T14:15:00Z"
  }
}