Skip to content

GHSA-72j4-94rx-cr6w CVE-2020-1694

Incorrect Permission Assignment for Critical Resource and Permissive List of Allowed Inputs in Keycloak

Medium Maven
Severity
4.9 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
1.64%
Chance of exploitation in the next 30 days. Higher than 76.39% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-183 Permissive List of Allowed Inputs
CWE-732 Incorrect Permission Assignment for Critical Resource
Fix
10.0.0
Upgrade org.keycloak:keycloak-parent to this version or later

Description

A flaw was found in all versions of Keycloak before 10.0.0, where the NodeJS adapter did not support the verify-token-audience. This flaw results in some users having access to sensitive information outside of their permissions.

Affected versions

Maven

PackageVulnerableFixed in
org.keycloak:keycloak-parent
< 10.0.0
10.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-parent Maven → 10.0.0

maven
<dependency><groupId>org.keycloak</groupId><artifactId>keycloak-parent</artifactId><version>10.0.0</version></dependency>
gradle
implementation("org.keycloak:keycloak-parent:10.0.0")

Severity breakdown

CVSS 3.1 4.9

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

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

Weakness

CWE-183: Permissive List of Allowed Inputs

The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses.

CWE-732: Incorrect Permission Assignment for Critical Resource

The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.

How to prevent it
  • Implementation: When using a critical resource such as a configuration file, check to see if the resource has insecure permissions (such as being modifiable by any regular user) [REF-62], and generate an error or even exit the software if there is a possibility that the resource could have been modified by an unauthorized party.
  • Architecture and Design: Divide the software into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully defining distinct user groups, privileges, and/or roles. Map these against data, functionality, and the related resources. Then set the permissions accordingly. This will allow you to maintain more fine-grained control over your resources. [REF-207]
  • Architecture and Design, Operation: Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
  • Implementation, Installation: During program startup, explicitly set the default permissions or umask to the most restrictive setting possible. Also set the appropriate permissions during program installation. This will prevent you from inheriting insecure permissions from any user who installs or runs the program.
  • System Configuration: For all configuration files, executables, and libraries, make sure that they are only readable and writable by the software's administrator.
  • Documentation: Do not suggest insecure configuration changes in documentation, especially if those configurations can extend to resources and other programs that are outside the scope of the application.
  • Installation: Do not assume that a system administrator will manually change the configuration to the settings that are recommended in the software's manual.
  • Operation, System Configuration: Ensure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.
  • 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 disable public access.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-fwhw-chw4-gh37
Keycloak Server-Side Request Forgery (SSRF) vulnerability
Low Also affects org.keycloak:keycloak-parent
GHSA-gv94-wp4h-vv8p
Keycloak has Incorrect Behavior Order: Authorization Before Parsing and Canonicalization
Medium Also affects org.keycloak:keycloak-parent
GHSA-9hhc-pj4w-w5rv
Keycloak Cross-site Scripting on OpenID connect login service
Medium Also affects org.keycloak:keycloak-parent
GHSA-g8q8-fggx-9r3q
Keycloak vulnerable to path traversal via double URL encoding
Critical Also affects org.keycloak:keycloak-parent
GHSA-97g8-xfvw-q4hg
Keycloak vulnerable to session takeover with OIDC offline refreshtokens
Medium Also affects org.keycloak:keycloak-parent
GHSA-w9mf-83w3-fv49
Keycloak vulnerable to Stored Cross site Scripting (XSS) when loading default roles
Medium Also affects org.keycloak:keycloak-parent
GHSA-wf7g-7h6h-678v
Keycloak SAML javascript protocol mapper: Uploading of scripts through admin console
High Also affects org.keycloak:keycloak-parent
GHSA-xv7h-95r7-595j
Incorrect implementation of lockout feature in Keycloak
High Also affects org.keycloak:keycloak-parent
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