Most identity teams still treat a public Keycloak as non-negotiable. People work from coffee shops, contractors need a realm, and SaaS apps want a browser redirect, so the issuer “has to” sit on the internet. That is the popular reaction to hybrid work, and it is how you volunteer for a live-fire test you never scoped.
The SANS Internet Storm Center just ran the test for you. After Java4Shell, CVE-2026-114938, a memory-corruption bug in Java’s BASE64 decoder, Keycloak was named as vulnerable and exploitable. Researchers put a vulnerable instance on the internet to see what arrived. If your cybersecurity program still files SSO under “the login page,” you are classifying a remote decoder as a convenience feature.
A Public Realm Is an Unpaid Research Deployment
Web applications love BASE64. Tokens, assertions, client payloads, health checks that “just send a blob.” Java4Shell is ugly because the decoder is sitting under all of that. Pass a crafted string, corrupt memory, and the identity broker in front of your apps becomes the gadget. You do not need a clever multi-stage chain if the first hop is already Keycloak.
Putting that broker on 0.0.0.0/0 is the actual exploit condition. Scanners do not need your org chart. They need an A record, a familiar login skin, and a few days of patience. SANS exposed a known-bad build on purpose. Production teams expose known-late builds by accident, then argue about change windows while the token endpoint answers the world.
A perimeter firewall does not save you here. Port 443 open for “users” is port 443 open for whoever learned to pad a BASE64 payload. Threat-protection products that only see north-south malware hashes will shrug at an auth POST. Brute-force against the token endpoint starts the same day the DNS goes live, Java4Shell or not. If you flattened identity onto the internet because split-horizon DNS felt old-fashioned, you traded a routing problem for an incident-response problem.
You can still give remote staff SSO. You do it with an internal issuer, a partner-specific broker, device posture, or a private access path. The claim that “SSO requires a public Keycloak” is a deployment habit. Treat it like one.
A Public Site Can Lose for Ten Days Without a Shell
Reachability cuts both ways. The American Bar Association said its website has taken “a high volume of AI-powered malicious activity” since November 24, and it still had no restore date when that outage passed the ten-day mark. No romantic zero-day narrative. Traffic, at machine speed, against a property that had to stay on the internet because it is the front door.

Identity teams should read that as a peer incident, not a CMS story. If your Keycloak is public, you have accepted scanner load, credential stuffing, and decoder probes as a baseline. If your public site is the only thing you load-tested, you will learn the identity plane’s capacity during the outage. Availability is part of cyber security even when nobody pops a shell. Ten days of “we’ll share an update when we can” is an incident with a communications plan, not a maintenance banner.
When the system that fails is a vendor, your users still pay. LifeStance, a mental health provider, confirmed a breach at one of its vendors, then watched an extortion crew email patients a link to leaked data. The provider’s job in that hour is blunt: tell people not to click, assume the mail is a second attack, and treat patient inboxes as part of incident response. Exposure does not stay in your VPC. It becomes a message that looks like a breach portal.

Cybersecurity Hardening Starts With Who Can Hit /auth
Stop arguing about whether Java4Shell is “in the wild” on your specific build. Argue about who is allowed to send BASE64 to an identity process. That is security hardening you can finish this week without buying a platform.
- Inventory every internet-facing identity listener in one sitting: Keycloak, other brokers, admin consoles, token URLs, realm discovery, and the forgotten test host with a real certificate. If you cannot produce the list in 30 minutes, your attack surface is a rumor.
- Patch Java and Keycloak for
CVE-2026-114938on anything that decodes attacker-controlled BASE64. Public listeners do not get a leisurely CAB cycle. Take a short outage on purpose rather than an unscheduled one. - Pull management off the internet. The admin console is not a user feature. Put it on VPN, a jump path, or an allowlisted operations network. Leave user auth on a tightly scoped issuer if you must; do not leave
/adminon the same VIP. - Use split-horizon DNS for employee SSO. Internal clients get an internal issuer. Partners get a dedicated broker with its own clients, logging, and blast radius. The global internet does not need every realm you ever created.
- Log decoder errors, oversized payloads, sudden client registrations, and token-endpoint failures, then wire those events into threat detection the same day. Hunting next quarter is how you read the SANS diary and realize it was your packet capture.
Keep Doing This After the Emergency Window
Defense in depth for identity is boring on purpose. Rate-limit and lock out the token endpoint so brute-force is expensive. Re-scan what you publish every week, because someone will recreate a public listener with a “temporary” ingress rule. Tabletop a Keycloak RCE: session wipe, client-secret rotation, app-owner call tree, and a user notice that does not include a mystery link. If a vendor holds identity or health data, write the “do not click” language before the extortion mail lands.
None of this requires a new logo on the slide. It requires you to stop treating reachability as a given. Java4Shell made the decoder the bug. Publishing the decoder made it your problem.
Frequently Asked Questions
- Does remote work force Keycloak onto the public internet?
- No. Remote staff need a path to an issuer, not a world-readable admin console and every realm you ever stood up. Split-horizon DNS, private access, and partner-specific brokers cover the real requirement without turning SSO into a honeypot.
- If we patched Java4Shell, can we leave Keycloak public?
- Patching closes this decoder. It does not close brute-force, tomorrow’s gadget, or the ABA-style flood against anything you must keep reachable. Reduce who can talk to
/auth, then patch, rather than patching so you can keep advertising the listener. - What should incident response do if a public Keycloak was unpatched?
- Treat it as possible code execution on the identity plane: rotate client secrets, kill sessions, review new clients and users, and tell people to ignore “leaked data” links. Then take the admin plane off the internet so the next CVE is not a live demonstration.
Sources
- Exposing a Vulnerable Keycloak Server to the Internet
- American Bar Association: ‘AI-powered malicious activity’ has kept website down for 10 days
- Extortion gang emails LifeStance patients a link to leaked data
Take Control of Your Server Security
Don't let brute-force attacks slow you down. Try IPBan Pro risk-free for 30 days.
Secure. Automated. Lightweight.
Take Control of Your Server Security
Don't let brute-force attacks slow you down. Try IPBan Pro risk-free for 30 days.
Secure. Automated. Lightweight.
