# CVE-2021-20222: Code injection in keycloak

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- 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): 1.16%, higher than 67% of CVEs (2026-12-01)
- Published: 2021-03-23T16:36:39.000Z
- Modified: 2026-06-17T03:33:29.880Z
- Also known as: GHSA-2mq8-99q7-55wx
- Weaknesses: CWE-20, CWE-79
- Assigned by: redhat

## Description

A flaw was found in keycloak. The new account console in keycloak can allow malicious code to be executed using the referrer URL. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

(As written by CVE List.)

## Affected

- keycloak: keycloak 13.0.0
- org.keycloak:keycloak-parent (Maven): from 9.0.0 before 12.0.3
- redhat keycloak: from 9.0.0 before 13.0.0

## Every score

- GitHub: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 5.1 Medium `AV:N/AC:H/Au:N/C:P/I:P/A:P`

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=1924606> (issue-tracking, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-20222> (advisory)
- <https://github.com/keycloak/keycloak/commit/3b80eee5bfdf2b80c47465c0f2eaf70074808741> (web)
- <https://access.redhat.com/security/cve/cve-2021-20222> (web)

## Sources

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

---

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