GHSA-cf8f-w2c5-p5jr CVE-2019-14837
keycloak vulnerable to unauthorized login via mail server setup
- Severity
- 9.1 / 10
- Critical · CVSS 3.0
- Exploit chance (EPSS)
- 1.72%
- Chance of exploitation in the next 30 days. Higher than 77.45% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Fix
8.0.0- Upgrade org.keycloak:keycloak-core to this version or later
Description
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@placeholder.org'.
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.keycloak:keycloak-core | < 8.0.0 |
8.0.0 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
org.keycloak:keycloak-core Maven → 8.0.0
- maven
<dependency><groupId>org.keycloak</groupId><artifactId>keycloak-core</artifactId><version>8.0.0</version></dependency>- gradle
implementation("org.keycloak:keycloak-core:8.0.0")
Severity breakdown
CVSS 3.0 9.1
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Weakness
CWE-547: Use of Hard-coded, Security-relevant Constants
The product uses hard-coded constants instead of symbolic names for security-critical values, which increases the likelihood of mistakes during code maintenance or security policy change.
How to prevent it
- Implementation: Avoid using hard-coded constants. Configuration files offer a more flexible solution.
CWE-798: Use of Hard-coded Credentials
The product contains hard-coded credentials, such as a password or cryptographic key.
How to prevent it
- Architecture and Design: For outbound authentication: store passwords, keys, and other credentials outside of the code in a strongly-protected, encrypted configuration file or database that is protected from access by all outsiders, including other local users on the same system. Properly protect the key (CWE-320). If you cannot use encryption to protect the file, then make sure that the permissions are as restrictive as possible [REF-7]. In Windows environments, the Encrypted File System (EFS) may provide some protection.
- Architecture and Design: For inbound authentication: Rather than hard-code a default username and password, key, or other authentication credentials for first time logins, utilize a "first login" mode that requires the user to enter a unique strong password or key.
- Architecture and Design: If the product must contain hard-coded credentials or they cannot be removed, perform access control checks and limit which entities can access the feature that requires the hard-coded credentials. For example, a feature might only be enabled through the system console instead of through a network connection.
- Architecture and Design: For inbound authentication using passwords: apply strong one-way hashes to passwords and store those hashes in a configuration file or database with appropriate access control. That way, theft of the file/database still requires the attacker to try to crack the password. When handling an incoming password during authentication, take the hash of the password and compare it to the saved hash. Use randomly assigned salts for each separate hash that is generated. This increases the amount of computation that an attacker needs to conduct a brute-force attack, possibly limiting the effectiveness of the rainbow table method.
- Architecture and Design: For front-end to back-end connections: Three solutions are possible, although none are complete. The first suggestion involves the use of generated passwords or keys that are changed automatically and must be entered at given time intervals by a system administrator. These passwords will be held in memory and only be valid for the time intervals. Next, the passwords or keys should be limited at the back end to only performing actions valid for the front end, as opposed to having full access. Finally, the messages sent should be tagged and checksummed with time sensitive values so as to prevent replay-style attacks.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-q4xq-445g-g6ch Keycloak allows cross-site scripting (XSS) | Low | Also affects org.keycloak:keycloak-core |
| GHSA-93ww-43rr-79v3 Keycloak mTLS Authentication Bypass via Reverse Proxy TLS Termination | High | Also affects org.keycloak:keycloak-core |
| GHSA-w97f-w3hq-36g2 Keycloak Denial of Service vulnerability | High | Also affects org.keycloak:keycloak-core |
| GHSA-xmmm-jw76-q7vg Keycloaks's One Time Passcode (OTP) is valid longer than expiration timeSeverity | Medium | Also affects org.keycloak:keycloak-core |
| GHSA-g4gc-rh26-m3p5 Keycloak Open Redirect vulnerability | Medium | Also affects org.keycloak:keycloak-core |
| GHSA-9vm7-v8wj-3fqw keycloak-core: open redirect via "form_post.jwt" JARM response mode | Medium | Also affects org.keycloak:keycloak-core |
| GHSA-5q66-v53q-pm35 Keycloak vulnerable to Plaintext Storage of User Password | High | Also affects org.keycloak:keycloak-core |
| GHSA-5cc8-pgp5-7mpm Keycloak Untrusted Certificate Validation vulnerability | Medium | Also affects org.keycloak:keycloak-core |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor