CVE-2022-1274: HTML Injection in Keycloak Admin REST API
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.72823%
CWE
Published
3/1/2023
Updated
12/22/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.keycloak:keycloak-services | maven | < 20.0.5 | 20.0.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from two key points: 1) The execute-actions-email endpoint (UserResource.java) accepted unvalidated 'actions' parameters that were directly embedded into emails. The patch added RequiredActionsValidator to block invalid actions. 2) The email template (info.ftl) originally lacked HTML escaping for required action messages, as shown by the addition of kcSanitize in the patch. These two points allowed HTML injection through both input validation gaps and output encoding failures.