CVE-2026-40683: OpenStack Keystone LDAP Identity Backend Does Not Vulnerability

HIGH
Advisory Identifier: GHSA-pfx2-9x9m-7ghx
CVSS 7.7
CWE-843
Published
Advisory Summary

CVE-2026-40683 is a HIGH (CVSS 7.7) ldap identity backend does not vulnerability (CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')) affecting OpenStack Keystone libraries in the PyPI ecosystem. The issue involves ldap identity backend does not convert enabled attribute to boolean. Remediation is available by upgrading affected packages to version 28.0.1.

CVE-2026-40683 at a Glance

CVE Identifier CVE-2026-40683
GHSA Identifier GHSA-pfx2-9x9m-7ghx
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
Affected Product OpenStack Keystone
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.7

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

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

How to Fix CVE-2026-40683

To remediate this vulnerability, upgrade all affected OpenStack 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: 28.0.1
pip install keystone>=28.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-2026-40683, inspect your installed packages using pip:

pip show keystone

Analyze the terminal output to locate any version of OpenStack Keystone in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 28.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-843: Access of Resource Using Incompatible Type ('Type Confusion'), where the product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type. In OpenStack 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

In OpenStack Keystone before 28.0.1, the LDAP identity backend does not convert the user enabled attribute to a boolean when the user_enabled_invert configuration option is False (the default). The _ldap_res_to_model method in the UserApi class only performed string-to-boolean conversion when user_enabled_invert was True. When False, the raw string value from LDAP (e.g., "FALSE") was used directly. Since non-empty strings are truthy in Python, users marked as disabled in LDAP were treated as enabled by Keystone, allowing them to authenticate and perform actions. All deployments using the LDAP identity backend without user_enabled_invert=True or user_enabled_emulation are affected.

CVE-2026-40683 Affected OpenStack Keystone Versions

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

References

Frequently Asked Questions

What is CVE-2026-40683?
CVE-2026-40683 is a security vulnerability in OpenStack Keystone involving LDAP identity backend does not convert enabled attribute to boolean under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion').
Which OpenStack Keystone versions are affected?
Affected versions include releases prior to 28.0.1 across affected packages: keystone.
What version fixes CVE-2026-40683?
Upgrading to 28.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 28.0.1. Upgrade your dependency to 28.0.1 or later.
What is the CVSS score of CVE-2026-40683?
CVE-2026-40683 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:H.
What CWE is associated with CVE-2026-40683?
CVE-2026-40683 is classified under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') (The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.).
How can I check PyPI dependencies for CVE-2026-40683?
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-pfx2-9x9m-7ghx",
  "modified" : "2026-04-16T01:20:22Z",
  "published" : "2026-04-14T21:31:48Z",
  "aliases" : [ "CVE-2026-40683" ],
  "summary" : "OpenStack Keystone: LDAP identity backend does not convert enabled attribute to boolean",
  "details" : "In OpenStack Keystone before 28.0.1, the LDAP identity backend does not convert the user enabled attribute to a boolean when the user_enabled_invert configuration option is False (the default). The _ldap_res_to_model method in the UserApi class only performed string-to-boolean conversion when user_enabled_invert was True. When False, the raw string value from LDAP (e.g., \"FALSE\") was used directly. Since non-empty strings are truthy in Python, users marked as disabled in LDAP were treated as enabled by Keystone, allowing them to authenticate and perform actions. All deployments using the LDAP identity backend without user_enabled_invert=True or user_enabled_emulation are affected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keystone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "28.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40683"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/keystone/+bug/2121152"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/keystone/+bug/2141713"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openstack/keystone"
  }, {
    "type" : "WEB",
    "url" : "https://review.opendev.org/958205"
  }, {
    "type" : "WEB",
    "url" : "https://www.openwall.com/lists/oss-security/2026/04/14/9"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-843" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-16T01:20:22Z",
    "nvd_published_at" : "2026-04-14T20:16:48Z"
  }
}