{"id":"CVE-2021-3856","aliases":["EUVD-2022-6472","GHSA-3w4v-rvc4-2xpw","RHBA-2022:5452","RHBA-2022:5454"],"status":"published","title":"Keycloak has Files or Directories Accessible to External Parties","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.","severity":{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.01158,"percentile":0.67337,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22","CWE-552"],"published":"2022-08-26T15:25:39Z","modified":"2026-10-20T14:26:37Z","fixes":[{"ecosystem":"Maven","package":"org.keycloak:keycloak-core","fixed_in":["15.1.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Maven","package":"org.keycloak:keycloak-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"15.1.0"}]}]},{"source":"osv","ecosystem":"Maven","package":"org.keycloak:keycloak-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"15.1.0"}]}],"versions":["1.0-alpha-1","1.0-alpha-1-12062013","1.0-alpha-2","1.0-alpha-3","1.0-alpha-4","1.0-beta-1","1.0-beta-1-20150521","1.0-beta-1-20150523","1.0-beta-2","1.0-beta-3","1.0-beta-4","1.0-final","1.0-rc-1","1.0-rc-2","1.0.1.Final","1.0.2.Final","1.0.3.Final","1.0.4.Final","1.0.5.Final","1.1.0.Beta1","1.1.0.Beta2","1.1.0.Final","1.1.1.Final","1.2.0.Beta1","1.2.0.CR1","1.2.0.Final","1.3.0.Final","1.3.1.Final","1.4.0.Final","1.5.0-Final","1.5.0.Final","1.5.1.Final","1.6.0.Final","1.6.1.Final","1.7.0.CR1","1.7.0.Final","1.8.0.Alpha1","1.8.0.CR1","1.8.0.CR2","1.8.0.CR3","1.8.0.Final","1.8.1.Final","1.9.0.CR1","1.9.0.Final","1.9.1.Final","1.9.2.Final","1.9.3.Final","1.9.4.Final","1.9.5.Final","1.9.7.Final","1.9.8.Final","10.0.0","10.0.1","10.0.2","11.0.0","11.0.1","11.0.2","11.0.3","12.0.0","12.0.1","12.0.2","12.0.3","12.0.4","13.0.0","13.0.1","14.0.0","15.0.0","15.0.1","15.0.2","2.0.0.CR1","2.0.0.Final","2.1.0.CR1","2.1.0.Final","2.2.0.CR1","2.2.0.Final","2.2.1.Final","2.3.0.CR1","2.3.0.Final","2.4.0.CR1","2.4.0.Final","2.5.0.CR1","2.5.0.Final","2.5.1.Final","2.5.4.Final","2.5.5.Final","3.0.0.CR1","3.0.0.Final","3.1.0.CR1","3.1.0.Final","3.2.0.CR1","3.2.0.Final","3.2.1.Final","3.3.0.CR1","3.3.0.CR2","3.3.0.Final","3.4.0.CR1","3.4.0.Final","3.4.1.CR1","3.4.1.Final","3.4.2.Final","3.4.3.Final","4.0.0.Beta1","4.0.0.Beta2","4.0.0.Beta3","4.0.0.Final","4.1.0.Final","4.2.0.Final","4.2.1.Final","4.3.0.Final","4.4.0.Final","4.5.0.Final","4.6.0.Final","4.7.0.Final","4.8.0.Final","4.8.1.Final","4.8.2.Final","4.8.3.Final","5.0.0","6.0.0","6.0.1","7.0.0","7.0.1","8.0.0","8.0.1","8.0.2","9.0.0","9.0.2","9.0.3"]},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el7","package":"rh-sso7","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1-4.el7sso"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el7","package":"rh-sso7-javapackages-tools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.4.1-5.15.3.jbcs.el7"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el7","package":"rh-sso7-keycloak","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:18.0.0-2.redhat_00001.1.el7sso"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el7","package":"rh-sso7-keycloak-server","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:18.0.0-2.redhat_00001.1.el7sso"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el7","package":"rh-sso7-python-javapackages","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.4.1-5.15.3.jbcs.el7"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el7","package":"rh-sso7-runtime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1-4.el7sso"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el8","package":"rh-sso7","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1-4.el8sso"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el8","package":"rh-sso7-javapackages-tools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.4.1-5.15.6.el8sso"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el8","package":"rh-sso7-keycloak","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:18.0.0-2.redhat_00001.1.el8sso"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el8","package":"rh-sso7-keycloak-server","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:18.0.0-2.redhat_00001.1.el8sso"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el8","package":"rh-sso7-python3-javapackages","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.4.1-5.15.6.el8sso"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:red_hat_single_sign_on:7.6::el8","package":"rh-sso7-runtime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1-4.el8sso"}]}],"bundled":2}],"products":[{"vendor":"keycloak","product":"keycloak"},{"vendor":"redhat","product":"keycloak"}],"references":[{"url":"https://issues.redhat.com/browse/KEYCLOAK-19422","tags":["x_refsource_MISC","x_transferred","Permissions Required","Vendor Advisory","report","web"]},{"url":"https://github.com/keycloak/keycloak/pull/8588","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/keycloak/keycloak/commit/73f0474008e1bebd0733e62a22aceda9e5de6743","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2010164","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Vendor Advisory","report","web"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-3856","tags":["x_refsource_MISC","x_transferred","Vendor Advisory","advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3856","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-3w4v-rvc4-2xpw"},{"url":"https://github.com/keycloak/keycloak","tags":["package"]},{"url":"https://access.redhat.com/errata/RHBA-2022:5452","tags":["advisory"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhba-2022_5452.json","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-3856","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2022-0839","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2081484","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-0839","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-0839","tags":["advisory"]},{"url":"https://huntr.dev/bounties/f1ae5779-b406-4594-a8a3-d089c68d6e70","tags":["article"]},{"url":"https://access.redhat.com/errata/RHBA-2022:5454","tags":["advisory"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhba-2022_5454.json","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2021-3856","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.","status":"published","published":"2022-08-26T15:25:39Z","modified":"2024-08-03T17:09:09.556Z","cwes":["CWE-552"],"updated_at":"2026-11-02T14:33:04.020035Z"}],"euvd":[{"id":"EUVD-2022-6472","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.","status":"published","published":"2022-08-26T15:25:39Z","modified":"2024-08-03T17:09:09Z","updated_at":"2026-11-03T03:25:10.888157Z"}],"ghsa":[{"id":"GHSA-3w4v-rvc4-2xpw","title":"Keycloak has Files or Directories Accessible to External Parties","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.","status":"published","published":"2022-08-27T00:00:45Z","modified":"2023-07-11T13:42:18Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-22","CWE-552"],"updated_at":"2026-11-02T14:36:56.605555Z"}],"nvd":[{"id":"CVE-2021-3856","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.","status":"published","published":"2022-08-26T16:15:09.57Z","modified":"2026-06-17T04:05:54.257Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-552","CWE-22"],"updated_at":"2026-11-02T14:07:06.906968Z"}],"osv":[{"id":"CVE-2021-3856","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.","status":"published","published":"2022-08-26T16:15:09.57Z","modified":"2026-10-20T14:26:37.166486374Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:20.843843Z"},{"id":"GHSA-3w4v-rvc4-2xpw","title":"Keycloak has Files or Directories Accessible to External Parties","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.","status":"published","published":"2022-08-27T00:00:45Z","modified":"2024-02-16T08:12:22.678977Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-22","CWE-552"],"updated_at":"2026-11-02T15:46:36.092962Z"},{"id":"RHBA-2022:5452","title":"Red Hat Bug Fix Advisory: Red Hat Single Sign-On 7.6.0 update on RHEL 7","status":"published","published":"2024-09-16T08:17:18Z","modified":"2026-09-11T10:01:10Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","level":"high"}],"updated_at":"2026-11-02T15:52:58.636919Z"},{"id":"RHBA-2022:5454","title":"Red Hat Bug Fix Advisory: Red Hat Single Sign-On 7.6.0 update on RHEL 8","status":"published","published":"2024-09-16T08:17:10Z","modified":"2026-09-11T10:01:11Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","level":"high"}],"updated_at":"2026-11-02T15:52:58.636919Z"}]}}
