From Advisories to Fully functioning PoC with no Diffing, only AI
A Keycloak vulnerability (CVE-2024-11736) lets a privileged administrator place an environment-variable placeholder in a client's Admin URL, which Keycloak later resolves when making an outbound administrative request. The author used AI assistance to work out the configuration and trigger sequence, then built a script that caused the resolved environment-variable value to appear in a callback request to their listener.
Published on medium.com
I recently came across CVE-2024–11736 a Keycloak vulnerability that allows privileged administrators to access sensitive environment variables and Java system properties through user-configurable URLs. (I know… with CVE’s flying around each and everyday, who cares about a 2 year old CVE anymore?
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, Keycloak resolved environment-variable placeholders in an administrator-controlled client URL when constructing an outbound administrative request, without restricting which values could be substituted.
Impact
A privileged administrator could cause sensitive environment variables and Java system properties to be sent to an attacker-controlled URL, though the text notes this requires administrator access.
What the attacker needed
Administrator access to Keycloak; a vulnerable Keycloak instance; an attacker-controlled listener URL
How it was found
- Deploy a vulnerable Keycloak instance in a lab.
- Create a client and modify its Admin URL to include an environment-variable placeholder.
- Trigger an administrative operation, such as the client revocation push, that causes Keycloak to use that URL.
- Run a listener and observe the callback containing the resolved environment-variable value.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Keycloak is a login and identity system. In this bug, someone who already has administrator rights can put a special placeholder in a client setting, and later Keycloak fills that placeholder with a secret value from the server's environment when it sends a request to that URL. The author used AI chat to understand the steps and write a script, then saw the secret value arrive at their own test listener.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.