About two weeks ago, the "Java4Shell" vulnerability was announced and patched (CVE-2026-114938). This memory corruption vulnerability in Java's BASE64 decoder can be exploited by passing specially crafted BASE64 strings to a Java application. Web applications do, of course, love to use BASE64, and are often exposed. One application specifically identified as vulnerable and exploitable was Keycloak. So I decided to expose a vulnerable Keycloak instance to the internet to see what happens. Below is the summary of the attacks we have seen.
The setup used Keycloak behind a mitmproxy. I like mitmproxy as it logs complete requests in easy-to-parse JSON, and it does allow me to offer a proper TLS configuration to the attacker, not asking them to risk their l33t spl01ts by exposing them in the clear.
No, I did not see ANY Java4Shell exploits. Of approximately 30,000 requests, only 1,532 were specific to Keycloak. Of those, many came from internet-wide "research" scans such as Palo Alto's Cortex Xpanse, or were otherwise classified as reconnaissance aimed at identifying the Keycloak version and configuration.
(red: Keycloak Specific)
Only four requests attempted to log in. Oddly enough, the most common attack targeted ASUS routers, not Keycloak:
GET /SETTINGS.CFG HTTP/1.1
Host: [redacted]:8443
User-Agent: asusrouter--
Connection: close
Cookie: asus_token=\0Invalid; clickedItem_tab=0
Referer: https://[redacted]:8443
Accept-Encoding: gzip
This is a simple authentication-bypass vulnerability that is currently being heavily exploited.