{
  "document": {
    "aggregate_severity": {
      "namespace": "https://access.redhat.com/security/updates/classification/",
      "text": "Moderate"
    },
    "category": "csaf_vex",
    "csaf_version": "2.0",
    "distribution": {
      "text": "Copyright © Red Hat, Inc. All rights reserved.",
      "tlp": {
        "label": "WHITE",
        "url": "https://www.first.org/tlp/"
      }
    },
    "lang": "en",
    "notes": [
      {
        "category": "legal_disclaimer",
        "text": "This content is licensed under the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/). If you distribute this content, or a modified version of it, you must provide attribution to Red Hat Inc. and provide a link to the original.",
        "title": "Terms of Use"
      }
    ],
    "publisher": {
      "category": "vendor",
      "contact_details": "https://access.redhat.com/security/team/contact/",
      "issuing_authority": "Red Hat Product Security is responsible for vulnerability handling across all Red Hat products and services.",
      "name": "Red Hat Product Security",
      "namespace": "https://www.redhat.com"
    },
    "references": [
      {
        "category": "self",
        "summary": "Canonical URL",
        "url": "https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-20202.json"
      }
    ],
    "title": "keycloak: Temporary Directory Hijacking Vulnerability in Keycloak",
    "tracking": {
      "current_release_date": "2026-11-07T13:21:22+00:00",
      "generator": {
        "date": "2026-11-07T13:21:22+00:00",
        "engine": {
          "name": "Red Hat SDEngine",
          "version": "5.4.5"
        }
      },
      "id": "CVE-2021-20202",
      "initial_release_date": "2021-03-16T00:00:00+00:00",
      "revision_history": [
        {
          "date": "2021-03-16T00:00:00+00:00",
          "number": "1",
          "summary": "Initial version"
        },
        {
          "date": "2021-05-18T18:17:24+00:00",
          "number": "2",
          "summary": "Current version"
        },
        {
          "date": "2026-11-07T13:21:22+00:00",
          "number": "3",
          "summary": "Last generated version"
        }
      ],
      "status": "final",
      "version": "3"
    }
  },
  "product_tree": {
    "branches": [
      {
        "branches": [
          {
            "branches": [
              {
                "category": "product_name",
                "name": "Red Hat Decision Manager 7",
                "product": {
                  "name": "Red Hat Decision Manager 7",
                  "product_id": "red_hat_decision_manager_7",
                  "product_identification_helper": {
                    "cpe": "cpe:/a:redhat:jboss_enterprise_brms_platform:7"
                  }
                }
              }
            ],
            "category": "product_family",
            "name": "Red Hat Decision Manager 7"
          },
          {
            "branches": [
              {
                "category": "product_name",
                "name": "Red Hat Fuse 7",
                "product": {
                  "name": "Red Hat Fuse 7",
                  "product_id": "red_hat_fuse_7",
                  "product_identification_helper": {
                    "cpe": "cpe:/a:redhat:jboss_fuse:7"
                  }
                }
              }
            ],
            "category": "product_family",
            "name": "Red Hat Fuse 7"
          },
          {
            "branches": [
              {
                "category": "product_name",
                "name": "Red Hat Integration Camel K 1",
                "product": {
                  "name": "Red Hat Integration Camel K 1",
                  "product_id": "red_hat_integration_camel_k_1",
                  "product_identification_helper": {
                    "cpe": "cpe:/a:redhat:camel_k:1"
                  }
                }
              }
            ],
            "category": "product_family",
            "name": "Red Hat Integration Camel K 1"
          },
          {
            "branches": [
              {
                "category": "product_name",
                "name": "Red Hat OpenShift Application Runtimes",
                "product": {
                  "name": "Red Hat OpenShift Application Runtimes",
                  "product_id": "red_hat_openshift_application_runtimes",
                  "product_identification_helper": {
                    "cpe": "cpe:/a:redhat:openshift_application_runtimes:1.0"
                  }
                }
              }
            ],
            "category": "product_family",
            "name": "Red Hat OpenShift Application Runtimes"
          },
          {
            "branches": [
              {
                "category": "product_name",
                "name": "Red Hat Process Automation 7",
                "product": {
                  "name": "Red Hat Process Automation 7",
                  "product_id": "red_hat_process_automation_7",
                  "product_identification_helper": {
                    "cpe": "cpe:/a:redhat:jboss_bpms:7"
                  }
                }
              }
            ],
            "category": "product_family",
            "name": "Red Hat Process Automation 7"
          },
          {
            "branches": [
              {
                "category": "product_name",
                "name": "Red Hat Single Sign-On 7",
                "product": {
                  "name": "Red Hat Single Sign-On 7",
                  "product_id": "red_hat_single_sign-on_7",
                  "product_identification_helper": {
                    "cpe": "cpe:/a:redhat:red_hat_single_sign_on:7"
                  }
                }
              }
            ],
            "category": "product_family",
            "name": "Red Hat Single Sign-On 7"
          },
          {
            "branches": [
              {
                "category": "product_name",
                "name": "Red Hat support for Spring Boot",
                "product": {
                  "name": "Red Hat support for Spring Boot",
                  "product_id": "red_hat_support_for_spring_boot",
                  "product_identification_helper": {
                    "cpe": "cpe:/a:redhat:support_for_springboot:2"
                  }
                }
              }
            ],
            "category": "product_family",
            "name": "Red Hat support for Spring Boot"
          },
          {
            "category": "product_version",
            "name": "keycloak",
            "product": {
              "name": "keycloak",
              "product_id": "keycloak"
            }
          },
          {
            "category": "product_version",
            "name": "rh-sso7-keycloak",
            "product": {
              "name": "rh-sso7-keycloak",
              "product_id": "rh-sso7-keycloak"
            }
          }
        ],
        "category": "vendor",
        "name": "Red Hat"
      }
    ],
    "relationships": [
      {
        "category": "default_component_of",
        "full_product_name": {
          "name": "keycloak as a component of Red Hat Decision Manager 7",
          "product_id": "red_hat_decision_manager_7:keycloak"
        },
        "product_reference": "keycloak",
        "relates_to_product_reference": "red_hat_decision_manager_7"
      },
      {
        "category": "default_component_of",
        "full_product_name": {
          "name": "keycloak as a component of Red Hat Fuse 7",
          "product_id": "red_hat_fuse_7:keycloak"
        },
        "product_reference": "keycloak",
        "relates_to_product_reference": "red_hat_fuse_7"
      },
      {
        "category": "default_component_of",
        "full_product_name": {
          "name": "keycloak as a component of Red Hat Integration Camel K 1",
          "product_id": "red_hat_integration_camel_k_1:keycloak"
        },
        "product_reference": "keycloak",
        "relates_to_product_reference": "red_hat_integration_camel_k_1"
      },
      {
        "category": "default_component_of",
        "full_product_name": {
          "name": "keycloak as a component of Red Hat OpenShift Application Runtimes",
          "product_id": "red_hat_openshift_application_runtimes:keycloak"
        },
        "product_reference": "keycloak",
        "relates_to_product_reference": "red_hat_openshift_application_runtimes"
      },
      {
        "category": "default_component_of",
        "full_product_name": {
          "name": "keycloak as a component of Red Hat Process Automation 7",
          "product_id": "red_hat_process_automation_7:keycloak"
        },
        "product_reference": "keycloak",
        "relates_to_product_reference": "red_hat_process_automation_7"
      },
      {
        "category": "default_component_of",
        "full_product_name": {
          "name": "rh-sso7-keycloak as a component of Red Hat Single Sign-On 7",
          "product_id": "red_hat_single_sign-on_7:rh-sso7-keycloak"
        },
        "product_reference": "rh-sso7-keycloak",
        "relates_to_product_reference": "red_hat_single_sign-on_7"
      },
      {
        "category": "default_component_of",
        "full_product_name": {
          "name": "keycloak as a component of Red Hat support for Spring Boot",
          "product_id": "red_hat_support_for_spring_boot:keycloak"
        },
        "product_reference": "keycloak",
        "relates_to_product_reference": "red_hat_support_for_spring_boot"
      }
    ]
  },
  "vulnerabilities": [
    {
      "acknowledgments": [
        {
          "names": [
            "Jonathan Leitschuh"
          ],
          "organization": "Twitter: @JLLeitschuh"
        }
      ],
      "cve": "CVE-2021-20202",
      "cwe": {
        "id": "CWE-377",
        "name": "Insecure Temporary File"
      },
      "discovery_date": "2021-01-29T00:00:00+00:00",
      "flags": [
        {
          "label": "vulnerable_code_not_present",
          "product_ids": [
            "red_hat_decision_manager_7:keycloak",
            "red_hat_fuse_7:keycloak",
            "red_hat_integration_camel_k_1:keycloak",
            "red_hat_openshift_application_runtimes:keycloak",
            "red_hat_process_automation_7:keycloak",
            "red_hat_single_sign-on_7:rh-sso7-keycloak",
            "red_hat_support_for_spring_boot:keycloak"
          ]
        }
      ],
      "ids": [
        {
          "system_name": "Red Hat Bugzilla ID",
          "text": "1922128"
        }
      ],
      "notes": [
        {
          "category": "description",
          "text": "A flaw was found in keycloak. Directories can be created prior to the Java process creating them in the temporary directory, but with wider user permissions, allowing the attacker to have access to the contents that keycloak stores in this directory. The highest threat from this vulnerability is to data confidentiality and integrity.",
          "title": "Vulnerability description"
        },
        {
          "category": "summary",
          "text": "keycloak: Temporary Directory Hijacking Vulnerability in Keycloak",
          "title": "Vulnerability summary"
        },
        {
          "category": "general",
          "text": "The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.",
          "title": "CVSS score applicability"
        }
      ],
      "product_status": {
        "known_not_affected": [
          "red_hat_decision_manager_7:keycloak",
          "red_hat_fuse_7:keycloak",
          "red_hat_integration_camel_k_1:keycloak",
          "red_hat_openshift_application_runtimes:keycloak",
          "red_hat_process_automation_7:keycloak",
          "red_hat_single_sign-on_7:rh-sso7-keycloak",
          "red_hat_support_for_spring_boot:keycloak"
        ]
      },
      "references": [
        {
          "category": "self",
          "summary": "Canonical URL",
          "url": "https://access.redhat.com/security/cve/CVE-2021-20202"
        },
        {
          "category": "external",
          "summary": "RHBZ#1922128",
          "url": "https://bugzilla.redhat.com/show_bug.cgi?id=1922128"
        },
        {
          "category": "external",
          "summary": "https://www.cve.org/CVERecord?id=CVE-2021-20202",
          "url": "https://www.cve.org/CVERecord?id=CVE-2021-20202"
        },
        {
          "category": "external",
          "summary": "https://nvd.nist.gov/vuln/detail/CVE-2021-20202",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-20202"
        }
      ],
      "release_date": "2021-03-16T00:00:00+00:00",
      "scores": [
        {
          "cvss_v3": {
            "attackComplexity": "HIGH",
            "attackVector": "LOCAL",
            "availabilityImpact": "LOW",
            "baseScore": 6.5,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "LOW",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L",
            "version": "3.1"
          },
          "products": [
            "red_hat_decision_manager_7:keycloak",
            "red_hat_fuse_7:keycloak",
            "red_hat_integration_camel_k_1:keycloak",
            "red_hat_openshift_application_runtimes:keycloak",
            "red_hat_process_automation_7:keycloak",
            "red_hat_single_sign-on_7:rh-sso7-keycloak",
            "red_hat_support_for_spring_boot:keycloak"
          ]
        }
      ],
      "threats": [
        {
          "category": "impact",
          "details": "Moderate",
          "product_ids": [
            "red_hat_decision_manager_7:keycloak",
            "red_hat_fuse_7:keycloak",
            "red_hat_integration_camel_k_1:keycloak",
            "red_hat_openshift_application_runtimes:keycloak",
            "red_hat_process_automation_7:keycloak",
            "red_hat_single_sign-on_7:rh-sso7-keycloak",
            "red_hat_support_for_spring_boot:keycloak"
          ]
        }
      ],
      "title": "keycloak: Temporary Directory Hijacking Vulnerability in Keycloak"
    }
  ]
}