CVE-2020-12689: Keystone OpenStack Keystone EC2 And/or Credential Vulnerability

HIGH
Advisory Identifier: GHSA-chgw-36xv-47cw
CVSS 8.8
CWE-269
Published
Advisory Summary

CVE-2020-12689 is a HIGH (CVSS 8.8) openstack keystone ec2 and/or credential vulnerability (CWE-269: Improper Privilege Management) affecting Keystone libraries in the PyPI ecosystem. The issue involves openstack keystone ec2 and/or credential endpoints are not protected from a scoped context. Remediation is available by upgrading affected packages to version 15.0.1, 16.0.1.

CVE-2020-12689 at a Glance

CVE Identifier CVE-2020-12689
GHSA Identifier GHSA-chgw-36xv-47cw
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Keystone
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-2020-12689

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: 15.0.1
pip install keystone>=15.0.1
keystone fixed: 16.0.1
pip install keystone>=16.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-2020-12689, 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 15.0.1), 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. 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

An issue was discovered in OpenStack Keystone before 15.0.1, and 16.0.0. Any user authenticated within a limited scope (trust/oauth/application credential) can create an EC2 credential with an escalated permission, such as obtaining admin while the user is on a limited viewer role. This potentially allows a malicious user to act as the admin on a project another user has the admin role on, which can effectively grant that user global admin privileges.

CVE-2020-12689 Affected Keystone Versions

2 component(s)
Fixed Versions:
15.0.116.0.1
Product / Package Ecosystem Affected Versions Fixed Version
keystone
PyPI
< 15.0.1
15.0.1
keystone
PyPI
≥ 16.0.0
< 16.0.1
All 1 versions
16.0.0
16.0.1

References

Frequently Asked Questions

What is CVE-2020-12689?
CVE-2020-12689 is a security vulnerability in Keystone involving OpenStack Keystone EC2 and/or credential endpoints are not protected from a scoped context under CWE-269: Improper Privilege Management.
Which Keystone versions are affected?
Affected versions include releases prior to 15.0.1, 16.0.1 across affected packages: keystone.
What version fixes CVE-2020-12689?
Upgrading to 15.0.1, 16.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 15.0.1, 16.0.1. Upgrade your dependency to 15.0.1, 16.0.1 or later.
What is the CVSS score of CVE-2020-12689?
CVE-2020-12689 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-12689?
CVE-2020-12689 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check PyPI dependencies for CVE-2020-12689?
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-chgw-36xv-47cw",
  "modified" : "2024-09-27T21:22:35Z",
  "published" : "2022-05-24T17:17:22Z",
  "aliases" : [ "CVE-2020-12689" ],
  "summary" : "OpenStack Keystone EC2 and/or credential endpoints are not protected from a scoped context ",
  "details" : "An issue was discovered in OpenStack Keystone before 15.0.1, and 16.0.0. Any user authenticated within a limited scope (trust/oauth/application credential) can create an EC2 credential with an escalated permission, such as obtaining admin while the user is on a limited viewer role. This potentially allows a malicious user to act as the admin on a project another user has the admin role on, which can effectively grant that user global admin privileges.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keystone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "15.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keystone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.0.0"
      }, {
        "fixed" : "16.0.1"
      } ]
    } ],
    "versions" : [ "16.0.0" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-12689"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openstack/keystone/commit/37e9907a176dad6843819b1bec4946c3aecc4548"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/keystone/+bug/1872735"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openstack/keystone"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/keystone/PYSEC-2020-53.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/re4ffc55cd2f1b55a26e07c83b3c22c3fe4bae6054d000a57fb48d8c2@%3Ccommits.druid.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://security.openstack.org/ossa/OSSA-2020-004.html"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4480-1"
  }, {
    "type" : "WEB",
    "url" : "https://www.openwall.com/lists/oss-security/2020/05/06/5"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2020/05/07/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-29T10:23:44Z",
    "nvd_published_at" : "2020-05-07T00:15:00Z"
  }
}