Skip to content

GHSA-xf46-8vvp-4hxx CVE-2021-20262

Keycloak Missing authentication for critical function

Medium Maven
Severity
6.8 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.33%
Chance of exploitation in the next 30 days. Higher than 26.05% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-306 Missing Authentication for Critical Function
Fix
None yet
No fixed version published

Description

A flaw was found in Keycloak 12.0.0 where re-authentication does not occur while updating the password. This flaw allows an attacker to take over an account if they can obtain temporary, physical access to a user’s browser. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.

Affected versions

Maven

PackageVulnerableFixed in
org.keycloak:keycloak-core
<= 12.0.4
No fix yet

How to fix

No fixed version has been published yet. Until one is, remove or replace the package, or turn off or isolate the affected feature. This page updates when a fix ships.

Severity breakdown

CVSS 3.1 6.8

CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack vector
Physical
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-306: Missing Authentication for Critical Function

The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.

How to prevent it
  • Architecture and Design: Divide the software into anonymous, normal, privileged, and administrative areas. Identify which of these areas require a proven user identity, and use a centralized authentication capability. Identify all potential communication channels, or other means of interaction with the software, to ensure that all channels are appropriately protected, including those channels that are assumed to be accessible only by authorized parties. Developers sometimes perform authentication at the primary channel, but open up a secondary channel that is assumed to be private. For example, a login mechanism may be listening on one network port, but after successful authentication, it may open up a second port where it waits for the connection, but avoids authentication because it assumes that only the authenticated party will connect to the port. In general, if the software or protocol allows a single session or user state to persist across multiple connections or channels, authentication and appropriate credential management need to be used throughout.
  • Architecture and Design: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
  • Architecture and Design: Where possible, avoid implementing custom, "grow-your-own" authentication routines and consider using authentication capabilities as provided by the surrounding framework, operating system, or environment. These capabilities may avoid common weaknesses that are unique to authentication; support automatic auditing and tracking; and make it easier to provide a clear separation between authentication tasks and authorization tasks. In environments such as the World Wide Web, the line between authentication and authorization is sometimes blurred. If custom authentication routines are required instead of those provided by the server, then these routines must be applied to every single page, since these pages could be requested directly.
  • Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using libraries with authentication capabilities such as OpenSSL or the ESAPI Authenticator [REF-45].
  • Implementation, System Configuration, Operation: When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to require strong authentication for users who should be allowed to access the data [REF-1297] [REF-1298] [REF-1302].

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy 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
Is this in your code?

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