CVE-2022-1438: Keycloak vulnerable to Cross-site Scripting

Summary

01/03/2023
No i
Moderate
6.4

CVE-2022-1438: Keycloak vulnerable to Cross-site Scripting. Affects org.keycloak:keycloak-services versions < 21.0.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Keycloak is an open-source identity and access management solution that provides single sign-on, social login, and user federation capabilities. It is widely used to secure web applications and services. However, a vulnerability has been discovered in Keycloak that allows for Cross-site Scripting (XSS) attacks under specific circumstances.

Vulnerability Detail

The vulnerability in Keycloak arises from a failure to sanitize HTML entities during user impersonation. This can be exploited by an attacker to inject malicious JavaScript code, which will be executed when the targeted user interacts with the affected application. The issue originates from a code snippet in the AuthenticationProcessor.java file of the Keycloak source code. The vulnerability has a moderate severity rating and is classified under CWE-79.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to apply the official patch or update to a fixed version of Keycloak to eliminate the risk of exploitation.

Conclusion

Keycloak users should promptly update their installations to the latest version (21.0.0 or later) to mitigate the risk of Cross-site Scripting attacks. Failure to address this vulnerability may result in the compromise of user sessions and the potential exposure of sensitive information. For further assistance or information on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.keycloak:keycloak-services →

Share this vulnerability

FAQ

Keycloak is an open-source identity and access management solution that provides single sign-on, social login, and user federation capabilities.

Cross-site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users.

The vulnerability in Keycloak occurs due to the lack of proper sanitization of HTML entities during user impersonation, allowing for the injection of malicious JavaScript code.

Exploiting this vulnerability can lead to the execution of arbitrary JavaScript code in the context of the targeted user's session, potentially compromising their sensitive information or performing unauthorized actions.

To protect your Keycloak installation, it is crucial to update to the latest version that includes the fix for this vulnerability. Regularly applying security patches and staying informed about security advisories is recommended.

Related vulnerabilities

Recent vulnerabilities recorded for org.keycloak:keycloak-services.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback