CVE-2023-4918: Plaintext storage of user password
A flaw was discovered in Keycloak Core package. When a user registers itself through registration flow, the "password" and "password-confirm" field from the form will occur as regular attributes in the users attributes. The password is also created, but the user attributes must not be there. This way, any entities (all users and clients with proper rights/roles) are able to retrieve the users passwords in clear-text.
Impact Passwords for self-registered users are stored as cleartext attributes associated with the user.
Mitigation Disable self-registration for users in all realms until patched.
Other sources
A flaw was discovered in Keycloak Core package. When a user registers itself through registration flow, the "password" and "password-confirm" field from the form will occur as regular attributes in the users attributes. The password is also created, but the user attributes must not be there. This way, any entities (all users and clients with proper rights/roles) are able to retrieve the users passwords in clear-text.
A malicious user with minimal access reading other users attributes could have access to their password and hence jeopardize the environment.
This shall only affect Keycloak 22.0.2. While Keycloak 22.0.1 is not affected.
— Red Hat
A flaw was found in the Keycloak package, more specifically org.keycloak.userprofile. When a user registers itself through registration flow, the "password" and "password-confirm" field from the form will occur as regular user attributes. All users and clients with proper rights and roles are able to read users attributes, allowing a malicious user with minimal access to retrieve the users passwords in clear text, jeopardizing their environment.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is CVE-2023-4918?
CVE-2023-4918 is a vulnerability found in the Keycloak Core package, specifically in org.keycloak.userprofile.
What is the severity of CVE-2023-4918?
CVE-2023-4918 has a severity level of 8.8 (high).
How does CVE-2023-4918 impact Keycloak?
CVE-2023-4918 allows user attributes to contain the 'password' and 'password-confirm' fields, which can lead to unauthorized access.
How can I fix CVE-2023-4918?
To fix CVE-2023-4918, update to Keycloak version 22.0.3 or higher.
Where can I find more information about CVE-2023-4918?
You can find more information about CVE-2023-4918 in the following references: [1] [2] [3].