CVE-2022-3782: Keycloak vulnerable to path traversal via double URL encoding

org.keycloak:keycloak-parent Updated 02 Oct 2025

Summary

13/12/2022
Yes i
Critical
9.1

CVE-2022-3782: Keycloak vulnerable to path traversal via double URL encoding. Affects org.keycloak:keycloak-parent versions < 20.0.2. Fixed in 20.0.2. 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 authentication and authorization services for applications. It is widely used to secure web applications and APIs. Keycloak allows users to authenticate via various protocols such as OpenID Connect, SAML, and OAuth. The vulnerability identified as CVE-2022-3782 affects Keycloak versions up to 20.0.0. It allows an attacker to bypass URL validation and perform path traversal attacks by exploiting double URL encoding. This can lead to unauthorized access to sensitive information within the domain and potential further attacks.

Vulnerability Detail

The vulnerability in Keycloak arises from inadequate URL validation during redirects. By crafting a malicious request with double URL encoding, an attacker can bypass the validation mechanism and access URLs that should be restricted. This can result in unauthorized access to sensitive information or enable the attacker to launch additional attacks. The vulnerability has a CVSS score of 9.1, indicating its critical severity.

How To Fix

Minimum fixed version

20.0.2

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, it is possible to implement additional URL validation checks within the application code. This can involve validating the requested URL against a whitelist of allowed URLs or implementing stricter input validation to detect and reject URLs with double URL encoding. However, applying the official fix by upgrading to the latest version is the recommended solution.

Conclusion

The vulnerability in Keycloak allows for path traversal attacks through double URL encoding, potentially leading to unauthorized access and further exploitation. It is crucial to upgrade to Keycloak version 20.0.2 or later to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

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

Share this vulnerability

FAQ

Keycloak is an open-source identity and access management solution that provides authentication and authorization services for applications.

The vulnerability allows an attacker to bypass URL validation and perform path traversal attacks, potentially leading to unauthorized access to sensitive information within the domain and further exploitation.

Keycloak versions up to 20.0.0 are affected by this vulnerability.

The CVSS score of this vulnerability is 9.1, indicating its critical severity.

To fix this vulnerability, it is recommended to upgrade to Keycloak version 20.0.2 or later, which includes the necessary security patches.

Related vulnerabilities

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

How To Fix

Minimum fixed version

20.0.2

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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