Keycloak vulnerable to Server-Side Request ForgeryGHSA-jh7q-5mwf-qvhw
MEDIUMFix: keycloak/keycloak-documentation#1086GHSA-jh7q-5mwf-qvhw is a medium-severity (CVSS 5.3) Server-Side Request Forgery (SSRF) vulnerability in org.keycloak:keycloak-core. 4 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for org.keycloak:keycloak-core — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.keycloak:keycloak-coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
A flaw was found in Keycloak before 13.0.0, where it is possible to force the server to call out an unverified URL using the OIDC parameter request_uri. This flaw allows an attacker to use this parameter to execute a Server-side request forgery (SSRF) attack.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.keycloak:keycloak-core | all versions | 13.0.0org.keycloak:keycloak-core:13.0.0 |
Affected Products
keycloakredhatResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Keycloak 12.0.1 - 'request_uri ' Blind Server-Side Request Forgery (SSRF) (Unauthenticated)
by Mayank Deshmukh · Oct 13, 2021
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.keycloak:keycloak-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.keycloak:keycloak-core to 13.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-jh7q-5mwf-qvhw is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
How to detect GHSA-jh7q-5mwf-qvhw
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id ghsa-jh7q-5mwf-qvhw -u https://target- Template
- Keycloak <= 12.0.1 - request_uri Blind Server-Side Request Forgery (SSRF)
- Severity
- medium
- Impact
- Successful exploitation of this vulnerability could lead to unauthorized access to internal resources, data leakage, or further attacks.
- Remediation
- Upgrade Keycloak to a version higher than 12.0.1 to mitigate this vulnerability.
Template by ProjectDiscovery nuclei-templates (dhiyaneshDk), MIT licensed. View the full template. Scan only systems you are authorised to test.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Single Sign-On 7.4.5 | see advisory | RHSA-2021:0327 |
| Red Hat Single Sign-On 7.4 for RHEL 6 | rh-sso7-keycloak-0:9.0.11-1.redhat_00001.1.el6sso | RHSA-2021:0318 |
| Red Hat Single Sign-On 7.4 for RHEL 7 | rh-sso7-keycloak-0:9.0.11-1.redhat_00001.1.el7sso | RHSA-2021:0319 |
| Red Hat Single Sign-On 7.4 for RHEL 8 | rh-sso7-keycloak-0:9.0.11-1.redhat_00001.1.el8sso | RHSA-2021:0320 |
Frequently Asked Questions
Is GHSA-jh7q-5mwf-qvhw in your dependencies?
Find it across Maven, including transitive dependencies.