CVE-2021-20202

Related Vulnerabilities: CVE-2021-20202  

A flaw was found in keycloak. Directories can be created prior to the Java process creating them in the temporary directory, but with wider user permissions, allowing the attacker to have access to the contents that keycloak stores in this directory. The highest threat from this vulnerability is to data confidentiality and integrity.

Description

A flaw was found in keycloak. Directories can be created prior to the Java process creating them in the temporary directory, but with wider user permissions, allowing the attacker to have access to the contents that keycloak stores in this directory. The highest threat from this vulnerability is to data confidentiality and integrity.

Mitigation

By switching to the `Files` API, you are allowed to exclusively set the file permissions when creating directories or creating temporary directories.

Additional Information

  • Bugzilla 1922128: CVE-2021-20202 keycloak: Temporary Directory Hijacking Vulnerability in Keycloak
  • CWE-377: Insecure Temporary File
  • FAQ: Frequently asked questions about CVE-2021-20202