Bug 1730227 (CVE-2019-14837) - CVE-2019-14837 keycloak: keycloak uses hardcoded open dummy domain for new accounts enabling information disclosure
Summary: CVE-2019-14837 keycloak: keycloak uses hardcoded open dummy domain for new ac...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2019-14837
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1730228
TreeView+ depends on / blocked
 
Reported: 2019-07-16 09:01 UTC by Marian Rehak
Modified: 2021-02-16 21:43 UTC (History)
36 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Keycloak. The use of an open hard-coded domain can allow an unauthorized login by setting up a mail server and resetting the user credentials, enabling information disclosure.
Clone Of:
Environment:
Last Closed: 2019-12-02 19:04:55 UTC
Embargoed:


Attachments (Terms of Use)
Series of screenshots (559.44 KB, application/zip)
2019-09-13 12:00 UTC, Paramvir jindal
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:4040 0 None None None 2019-12-02 17:03:29 UTC
Red Hat Product Errata RHSA-2019:4041 0 None None None 2019-12-02 17:02:54 UTC
Red Hat Product Errata RHSA-2019:4042 0 None None None 2019-12-02 17:03:46 UTC
Red Hat Product Errata RHSA-2019:4045 0 None None None 2019-12-02 17:21:18 UTC

Description Marian Rehak 2019-07-16 09:01:30 UTC
A flaw was found in keycloack before version 8.0.0. The owner of 'placeholder.org' domain can setup mail server on this domain and knowing only name of a client can reset password and then log in. For example, for client name 'test' the email address will be 'service-account-test'

Upstream issue:

https://issues.jboss.org/browse/KEYCLOAK-10780

Upstream patch:

https://github.com/keycloak/keycloak/commit/9a7c1a91a59ab85e7f8889a505be04a71580777f

Comment 1 Jason Shepherd 2019-08-12 02:21:37 UTC
The version of Keycloak used in Red Hat Mobile Application Platform did not have the Service Account feature. It was added in version 1.4, see: https://planet.jboss.org/post/service_accounts_support_in_keycloak

Comment 5 Paramvir jindal 2019-09-13 11:59:46 UTC
please refer to these screen shot attach to replicate this.

Comment 6 Paramvir jindal 2019-09-13 12:00:18 UTC
Created attachment 1614803 [details]
Series of screenshots

Comment 7 Paramvir jindal 2019-09-13 12:16:27 UTC
Steps to reproduce :

- Create an application and deploy it on JBoss EAP with authentication mechanism as BASIC and secure it with RHSSO.
- Register this application this as a RHSSO client (confidential client) with service account enabled (shown in the screen shot attached).
- Setup email server and email verification in RHSSO Realm. (shown in the screen shot attached).
- I have also attached screen shot of my local JDBC client showing the USER_ENTITY table from H2 database. Observe the default email ID created of service accounts.(shown in the screen shot attached)
- Just to be sure that RHSSO indeed send password reset emails, change the default email ID with the one you have access to.
- Now access your application URL and click on "forget password".
- Enter the user name as "service-account-<client-id>" and click submit. (shown in the screen shot attached)
- You will get the password reset email on your email ID.(shown in the screen shot attached)
- Now reset the password and login again with the new password.

Comment 10 Marian Rehak 2019-10-23 13:58:10 UTC
Acknowledgments:

Name: Vadim Ashikhman

Comment 11 Paramvir jindal 2019-11-12 06:06:02 UTC
Mitigation:

It is not a very straight forward workaround but it is possible to mitigate this by manually editing the default Email ID (service_account_name) to some valid email ID (abc) in the USER_ENTITY table in the RHSSO database used.

Comment 14 errata-xmlrpc 2019-12-02 17:02:52 UTC
This issue has been addressed in the following products:

  Red Hat Single Sign-On 7.3 for RHEL 7

Via RHSA-2019:4041 https://access.redhat.com/errata/RHSA-2019:4041

Comment 15 errata-xmlrpc 2019-12-02 17:03:27 UTC
This issue has been addressed in the following products:

  Red Hat Single Sign-On 7.3 for RHEL 6

Via RHSA-2019:4040 https://access.redhat.com/errata/RHSA-2019:4040

Comment 16 errata-xmlrpc 2019-12-02 17:03:44 UTC
This issue has been addressed in the following products:

  Red Hat Single Sign-On 7.3 for RHEL 8

Via RHSA-2019:4042 https://access.redhat.com/errata/RHSA-2019:4042

Comment 17 errata-xmlrpc 2019-12-02 17:21:16 UTC
This issue has been addressed in the following products:

  Red Hat Single Sign-On

Via RHSA-2019:4045 https://access.redhat.com/errata/RHSA-2019:4045

Comment 18 Product Security DevOps Team 2019-12-02 19:04:55 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-14837


Note You need to log in before you can comment on or make changes to this bug.