# CVE-2021-20202: Temporary Directory Hijacking Vulnerability in Keycloak

- Severity: High 7.3 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.30%, higher than 24% of CVEs (2026-12-01)
- Published: 2021-05-12T14:40:00.000Z
- Modified: 2026-06-17T03:33:27.803Z
- Also known as: GHSA-6xp6-fmc8-pmmr
- Weaknesses: CWE-377
- Assigned by: redhat

## 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.

(As written by CVE List.)

## Affected

- keycloak: keycloak 13.0.0
- org.keycloak:keycloak-core (Maven): before 13.0.0
- redhat keycloak: before 13.0.0

## Every score

- GitHub: CVSS:3.1 7.3 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L`
- NVD: CVSS:3.1 7.3 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L`
- NVD: CVSS:2.0 4.6 Medium `AV:L/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=1922128> (issue-tracking, vendor-advisory, web)
- <https://github.com/JLLeitschuh/security-research/security/advisories/GHSA-7gf3-89f6-823j> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-20202> (advisory)
- <https://issues.redhat.com/browse/KEYCLOAK-17000> (web)

## Sources

- CVE List: [CVE-2021-20202](https://www.cve.org/CVERecord?id=CVE-2021-20202), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-6xp6-fmc8-pmmr](https://github.com/advisories/GHSA-6xp6-fmc8-pmmr), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-20202](https://nvd.nist.gov/vuln/detail/CVE-2021-20202), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-20202 · Whole record: https://cve.day/CVE-2021-20202.json · Rebuilt by cve.day 2026-11-25T22:58:01.314Z
