CVE-2021-38155: Keystone OpenStack Keystone Allows Information Disclosure Vulnerability

HIGH
Advisory Identifier: GHSA-4225-97pr-rr52
CVSS 7.5
CWE-307
Published
Advisory Summary

CVE-2021-38155 is a HIGH (CVSS 7.5) openstack keystone allows information disclosure vulnerability (CWE-307: Improper Restriction of Excessive Authentication Attempts) affecting Keystone libraries in the PyPI ecosystem. The issue involves openstack keystone allows information disclosure during account locking. Remediation is available by upgrading affected packages to version 16.0.2, 17.0.1, 18.0.1, 19.0.1.

CVE-2021-38155 at a Glance

CVE Identifier CVE-2021-38155
GHSA Identifier GHSA-4225-97pr-rr52
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-307: Improper Restriction of Excessive Authentication Attempts
Affected Product Keystone
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2021-38155

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

keystone fixed: 16.0.2
pip install keystone>=16.0.2
keystone fixed: 17.0.1
pip install keystone>=17.0.1
keystone fixed: 18.0.1
pip install keystone>=18.0.1
keystone fixed: 19.0.1
pip install keystone>=19.0.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 keystone

How to Check if You Are Affected

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

pip show keystone

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-307: Improper Restriction of Excessive Authentication Attempts, where the product does not implement sufficient measures to prevent multiple failed authentication attempts within a short time frame. In Keystone, 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

OpenStack Keystone 10.x through 16.x before 16.0.2, 17.x before 17.0.1, 18.x before 18.0.1, and 19.x before 19.0.1 allows information disclosure during account locking (related to PCI DSS features). By guessing the name of an account and failing to authenticate multiple times, any unauthenticated actor could both confirm the account exists and obtain that account's corresponding UUID, which might be leveraged for other unrelated attacks. All deployments enabling security_compliance.lockout_failure_attempts are affected.

CVE-2021-38155 Affected Keystone Versions

4 component(s)
Fixed Versions:
16.0.217.0.118.0.119.0.1
Product / Package Ecosystem Affected Versions Fixed Version
keystone
PyPI
≥ 10.0
< 16.0.2
16.0.2
keystone
PyPI
≥ 17.0
< 17.0.1
17.0.1
keystone
PyPI
≥ 18.0
< 18.0.1
18.0.1
keystone
PyPI
≥ 19.0
< 19.0.1
19.0.1

References

Frequently Asked Questions

What is CVE-2021-38155?
CVE-2021-38155 is a security vulnerability in Keystone involving OpenStack Keystone allows information disclosure during account locking under CWE-307: Improper Restriction of Excessive Authentication Attempts.
Which Keystone versions are affected?
Affected versions include releases prior to 16.0.2, 17.0.1, 18.0.1, 19.0.1 across affected packages: keystone.
What version fixes CVE-2021-38155?
Upgrading to 16.0.2, 17.0.1, 18.0.1, 19.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is keystone affected?
Yes, keystone is affected in releases prior to 16.0.2, 17.0.1, 18.0.1, 19.0.1. Upgrade your dependency to 16.0.2, 17.0.1, 18.0.1, 19.0.1 or later.
What is the CVSS score of CVE-2021-38155?
CVE-2021-38155 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2021-38155?
CVE-2021-38155 is classified under CWE-307: Improper Restriction of Excessive Authentication Attempts (The product does not implement sufficient measures to prevent multiple failed authentication attempts within a short time frame.).
How can I check PyPI dependencies for CVE-2021-38155?
Run the dependency tree command: 'pip show keystone'. 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-4225-97pr-rr52",
  "modified" : "2024-05-14T17:21:32Z",
  "published" : "2022-05-24T19:10:15Z",
  "aliases" : [ "CVE-2021-38155" ],
  "summary" : "OpenStack Keystone allows information disclosure during account locking",
  "details" : "OpenStack Keystone 10.x through 16.x before 16.0.2, 17.x before 17.0.1, 18.x before 18.0.1, and 19.x before 19.0.1 allows information disclosure during account locking (related to PCI DSS features). By guessing the name of an account and failing to authenticate multiple times, any unauthenticated actor could both confirm the account exists and obtain that account's corresponding UUID, which might be leveraged for other unrelated attacks. All deployments enabling security_compliance.lockout_failure_attempts are affected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keystone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0"
      }, {
        "fixed" : "16.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keystone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "17.0"
      }, {
        "fixed" : "17.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keystone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "18.0"
      }, {
        "fixed" : "18.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keystone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "19.0"
      }, {
        "fixed" : "19.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-38155"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openstack/keystone/commit/1b573ae7d1c20e0ebfbde79bbe7538a09589c75d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openstack/keystone/commit/8ab4eb27be4c13c9bab2b3ea700f00a190521bf8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openstack/keystone/commit/ac2631ae33445877094cdae796fbcdce8833a626"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openstack/keystone"
  }, {
    "type" : "WEB",
    "url" : "https://launchpad.net/bugs/1688137"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2024/01/msg00007.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.openstack.org/ossa/OSSA-2021-003.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2021/08/10/5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-307" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-14T17:21:32Z",
    "nvd_published_at" : "2021-08-06T21:15:00Z"
  }
}