WaratekVRT Sign in

CVE-2021-3856 Keycloak

Affected softwareKeycloak
Severity4.3 Medium CVSS 3.1
Fixed in15.1.0
WeaknessPath traversal (CWE-22)
Published26 Aug 2022
Updated17 Jun 2026

Description

ClassLoaderTheme and ClasspathThemeResourceProviderFactory allows reading any file available as a resource to the classloader. By sending requests for theme resources with a relative path from an external HTTP client, the client will receive the content of random files if available.

CWE-552

Exploitation status

No public exploit

No exploit has been reported in the sources we check. Published 4 years ago.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment no assessment published
  • Indexed PoC none indexed
  • EPSS 1.2% chance in 30 days

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR path-traversal security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-22: Path Traversal.
Candidate fix https://github.com/keycloak/keycloak/commit/73f0474008e1bebd0733e62a22aceda9e5de6743 : a commit: the change itself

How to mitigate CVE-2021-3856

Upgrade Keycloak to 15.1.0 or later. Until you can, Waratek RASP blocks exploitation with its path traversal rule. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.keycloak:keycloak-core 0 15.1.0 unbounded

Products and versions

2 products, 2 version entries
SourceVendorProductSchemeAffected versions
osv org.keycloak keycloak-core generic < 15.1.0
nvd redhat keycloak generic < 15.1.0

References

URLTags
https://github.com/keycloak/keycloak/commit/73f0474008e1bebd0733e62a22aceda9e5de6743 commit
https://github.com/keycloak/keycloak/pull/8588 WEB
https://access.redhat.com/security/cve/CVE-2021-3856 WEB
https://bugzilla.redhat.com/show_bug.cgi?id=2010164 WEB
https://github.com/keycloak/keycloak PACKAGE
https://issues.redhat.com/browse/KEYCLOAK-19422 WEB

Timeline

Published2022-08-26By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.