{
  "threat_severity" : "Important",
  "public_date" : "2022-07-22T00:00:00Z",
  "bugzilla" : {
    "description" : "rubygem-tzinfo: arbitrary code execution",
    "id" : "2110551",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2110551"
  },
  "cvss3" : {
    "cvss3_base_score" : "7.5",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-22",
  "details" : [ "TZInfo is a Ruby library that provides access to time zone data and allows times to be converted using time zone rules. Versions prior to 0.36.1, as well as those prior to 1.2.10 when used with the Ruby data source tzinfo-data, are vulnerable to relative path traversal. With the Ruby data source, time zones are defined in Ruby files. There is one file per time zone. Time zone files are loaded with `require` on demand. In the affected versions, `TZInfo::Timezone.get` fails to validate time zone identifiers correctly, allowing a new line character within the identifier. With Ruby version 1.9.3 and later, `TZInfo::Timezone.get` can be made to load unintended files with `require`, executing them within the Ruby process. Versions 0.3.61 and 1.2.10 include fixes to correctly validate time zone identifiers. Versions 2.0.0 and later are not vulnerable. Version 0.3.61 can still load arbitrary files from the Ruby load path if their name follows the rules for a valid time zone identifier and the file has a prefix of `tzinfo/definition` within a directory in the load path. Applications should ensure that untrusted files are not placed in a directory on the load path. As a workaround, the time zone identifier can be validated before passing to `TZInfo::Timezone.get` by ensuring it matches the regular expression `\\A[A-Za-z0-9+\\-_]+(?:\\/[A-Za-z0-9+\\-_]+)*\\z`.", "A flaw was found in rubygem-tzinfo. When using the Timezone.get function, it fails to validate time zone identifiers correctly, allowing a new line character input within the identifier. This flaw allows an attacker to use the new line character and write any code, which will be executed within the Ruby process." ],
  "affected_release" : [ {
    "product_name" : "Red Hat Gluster Storage 3.5 for RHEL 7",
    "release_date" : "2023-03-28T00:00:00Z",
    "advisory" : "RHSA-2023:1486",
    "cpe" : "cpe:/a:redhat:storage:3.5:wa:el7",
    "package" : "rubygem-tzinfo-0:1.2.10-1.el7rhgs"
  }, {
    "product_name" : "Red Hat Satellite 6.11 for RHEL 7",
    "release_date" : "2022-10-27T00:00:00Z",
    "advisory" : "RHSA-2022:7242",
    "cpe" : "cpe:/a:redhat:satellite:6.11::el7",
    "package" : "tfm-rubygem-tzinfo-0:1.2.10-1.el7sat"
  }, {
    "product_name" : "Red Hat Satellite 6.11 for RHEL 8",
    "release_date" : "2022-10-27T00:00:00Z",
    "advisory" : "RHSA-2022:7242",
    "cpe" : "cpe:/a:redhat:satellite:6.11::el8",
    "package" : "rubygem-tzinfo-0:1.2.10-1.el8sat"
  }, {
    "product_name" : "Red Hat Satellite 6.13 for RHEL 8",
    "release_date" : "2023-05-03T00:00:00Z",
    "advisory" : "RHSA-2023:2097",
    "cpe" : "cpe:/a:redhat:satellite:6.13::el8",
    "package" : "rubygem-tzinfo-0:2.0.5-1.el8sat"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat OpenShift Container Platform 3.11",
    "fix_state" : "Affected",
    "package_name" : "rubygem-tzinfo",
    "cpe" : "cpe:/a:redhat:openshift:3.11"
  }, {
    "product_name" : "Red Hat OpenStack Platform 13 (Queens) Operational Tools",
    "fix_state" : "Will not fix",
    "package_name" : "rubygem-tzinfo",
    "cpe" : "cpe:/a:redhat:openstack-optools:13",
    "impact" : "moderate"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2022-31163\nhttps://nvd.nist.gov/vuln/detail/CVE-2022-31163\nhttps://github.com/tzinfo/tzinfo/security/advisories/GHSA-5cm2-9h8c-rvfx" ],
  "name" : "CVE-2022-31163",
  "mitigation" : {
    "value" : "As a workaround, the time zone identifier can be validated before passing to TZInfo::Timezone.get by ensuring it matches the regular expression \\A[A-Za-z0-9+\\-_]+(?:\\/[A-Za-z0-9+\\-_]+)*\\z.",
    "lang" : "en:us"
  },
  "csaw" : false
}