# CVE-2026-40683: OpenStack Keystone incorrect LDAP user status handling

Source: https://junglewise.ai/threats/cve-2026-40683-openstack-keystone-incorrect-ldap-user-status-handling  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-14. Updated: 2026-07-24  
License: CC BY 4.0 with a link back

CVE-2026-40683 · Severity: high · CVSS 7.7 · Published 2026-04-14

OpenStack Keystone, the identity service for OpenStack cloud environments, contains a flaw in how it handles disabled user accounts when using LDAP for authentication. Due to a coding error, Keystone may incorrectly treat accounts marked as 'disabled' in the corporate directory as 'enabled' because it fails to properly interpret the status data. This could allow unauthorized or former employees to continue accessing cloud resources and performing actions even after their accounts have been deactivated in the central directory.

Technologies: [keystone (PyPI)](https://junglewise.ai/threats/technologies/keystone). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-40683 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40683 being exploited in the wild.

**How severe is CVE-2026-40683?** High severity, with a CVSS score of 7.7, published 14 April 2026.

**Which products and versions are affected?** keystone (PyPI) < 28.0.1, ECOSYSTEM:introduced=0,fixed=28.0.1.

**Is there a fix for CVE-2026-40683?** Yes. keystone (PyPI): upgrade to 28.0.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40683 attacked?** It is attacked over the network, in a hosted service.

**Am I affected by CVE-2026-40683?** Check whether you run keystone (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- keystone (PyPI): upgrade to 28.0.1 or later

  ```sh
  pip install "keystone>=28.0.1"
  ```


## Technical details

A vulnerability exists in the OpenStack Keystone LDAP identity backend where the '_ldap_res_to_model' method in the 'UserApi' class fails to convert the 'enabled' attribute from a string to a boolean when 'user_enabled_invert' is set to False (the default). In Python, non-empty strings like "FALSE" evaluate to True in a boolean context. Consequently, Keystone interprets any non-empty status string from LDAP as an enabled state. Attackers with disabled LDAP credentials can bypass intended access controls to authenticate and perform actions. The issue is resolved in version 28.0.1 and backported to stable branches.

## Affected products

- OpenStack Keystone 8.0.0 to 25.0.0, 26.0.0 to 26.1.0, 27.0.0, 28.0.0

## Identifiers

- CVE-2026-40683
- GHSA-pfx2-9x9m-7ghx
- PYSEC-2026-2550

## Timeline

- 2025-08-21: disclosed: Initial bug report on Launchpad
- 2026-03-16: patched: Fix included in 29.0.0.0rc1 release candidate
- 2026-04-14: advisory: NVD publication date

## References

- [https://bugs.launchpad.net/keystone/+bug/2121152](https://bugs.launchpad.net/keystone/+bug/2121152)
- [https://bugs.launchpad.net/keystone/+bug/2141713](https://bugs.launchpad.net/keystone/+bug/2141713)
- [https://review.opendev.org/958205](https://review.opendev.org/958205)
- [https://www.openwall.com/lists/oss-security/2026/04/14/9](https://www.openwall.com/lists/oss-security/2026/04/14/9)

## Related threats

- [PYSEC-2026-2549 - OpenStack Identity Keystone and keystonemiddleware Insufficiently Protected Credentials](https://junglewise.ai/threats/cve-2015-7546-openstack-identity-keystone-and-keystonemiddleware-insufficiently)
- [PYSEC-2026-830 - OpenStack Keystone allows information disclosure during account locking](https://junglewise.ai/threats/cve-2021-38155-openstack-keystone-allows-information-disclosure-during-account)
- [PYSEC-2026-831 - OpenStack Identity Keystone Privilege Escalation vulnerability](https://junglewise.ai/threats/cve-2013-4477-openstack-identity-keystone-privilege-escalation-vulnerability)
- [PYSEC-2026-833 - OpenStack Keystone does not invalidate existing tokens when granting or revoking roles](https://junglewise.ai/threats/cve-2012-4413-openstack-keystone-does-not-invalidate-existing-tokens-when)
- [PYSEC-2026-832 - OpenStack Keystone Improper Authentication vulnerability](https://junglewise.ai/threats/cve-2012-4456-openstack-keystone-improper-authentication-vulnerability)
