Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-3856

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-3856
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:45 UTC · Revision 1

Source evidence

CVE-2021-3856

core-osv · Original source

Published 26 Aug 2022, 16:15 UTC

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.

osv:CVE-2021-3856
Complete source record
{
  "id": "d612feaeca1310d4e886e4f8444c0068f9a263368fa3e7a85236c25abe0a3517",
  "url": "https://osv.dev/vulnerability/CVE-2021-3856",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-3856",
    "summary": "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.",
    "evidence": "osv:CVE-2021-3856",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-3856",
      "aliases": [
        "CVE-2021-3856",
        "GHSA-3w4v-rvc4-2xpw"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/keycloak/keycloak",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "843566019e09d15fa0e4778356463bc9a430e965"
                },
                {
                  "fixed": "73f0474008e1bebd0733e62a22aceda9e5de6743"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "15.1.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "73f0474008e1bebd0733e62a22aceda9e5de6743"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.4.0.Test",
            "1.3.0.Final",
            "1.1.0.Beta2",
            "1.0.0.Final",
            "1.0-final",
            "1.0-rc-1",
            "1.0-beta-4",
            "1.0-beta-2",
            "1.0-beta-1",
            "1.0-alpha-3",
            "1.0-alpha-2",
            "1.0-alpha-1",
            "1.0-alpha-1-12062013"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-3856.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-3856-1dad238c",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "124260399539281011717707373586744147021",
                    "273546477869425480957980733809903113856",
                    "285018114609585019930830636075742367167",
                    "133178131592467951898160846919801786489",
                    "96407110543803275689348891033921234091"
                  ]
                },
                "source": "https://github.com/keycloak/keycloak/commit/73f0474008e1bebd0733e62a22aceda9e5de6743",
                "target": {
                  "file": "services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-3856-2ade5fb0",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "121861020690458924525486788093213951948",
                    "248515847350033744246149201106405994849",
                    "3330082002857581691640005490138153212",
                    "225176885544135933599938528445378366721"
                  ]
                },
                "source": "https://github.com/keycloak/keycloak/commit/73f0474008e1bebd0733e62a22aceda9e5de6743",
                "target": {
                  "file": "services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-3856-3c06b61d",
                "digest": {
                  "length": 123,
                  "function_hash": "173054477908208581461759922352527267037"
                },
                "source": "https://github.com/keycloak/keycloak/commit/73f0474008e1bebd0733e62a22aceda9e5de6743",
                "target": {
                  "file": "services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java",
                  "function": "getResourceAsStream"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-3856-67fb8d24",
                "digest": {
                  "length": 91,
                  "function_hash": "163715556613522604159357137207365211778"
                },
                "source": "https://github.com/keycloak/keycloak/commit/73f0474008e1bebd0733e62a22aceda9e5de6743",
                "target": {
                  "file": "services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java",
                  "function": "getResourceAsStream"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:26:37Z"
          }
        }
      ],
      "modified": "2026-10-20T14:26:37.166486374Z",
      "provider": "osv",
      "references": [
        "https://access.redhat.com/security/cve/CVE-2021-3856",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2010164",
        "https://issues.redhat.com/browse/KEYCLOAK-19422",
        "https://github.com/keycloak/keycloak/commit/73f0474008e1bebd0733e62a22aceda9e5de6743",
        "https://github.com/keycloak/keycloak/pull/8588"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-3856",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388993,
  "published_at": "2022-08-26T16:15:09.57+00:00"
}