Skip to main content
Public proof of conceptFix available

CVE-2022-31163

A public proof of concept exists; no exploitation attested.

  • Published2022-07-22
  • Fixed in1.2.10 · 0.3.61
  • WeaknessCWE-22 · CWE-23

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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`.

Timeline

dates in UTC
  1. 2022-07-2204:15CVE publishedNVD

Versions per branch

NVD · OSV
Tzinfo project tzinfo
BranchAffectedFixed in
1.x≥ 1.0.0, < 1.2.101.2.10
0.3< 0.3.610.3.61
Debian debian linux
BranchAffectedFixed in
10.0= 10.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • tzinfo
    Affected
    • = < 0.3.61no fix stated
    • = >= 1.0.0, < 1.2.10no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2022-08-18

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • ansible-collection-redhat-satelliteRed Hat:satellite:6.13::el8all versions · fixed in 0:3.9.0-2.el8sat
  • ansible-collection-redhat-satelliteRed Hat:satellite_capsule:6.13::el8all versions · fixed in 0:3.9.0-2.el8sat
  • ansible-collection-redhat-satellite_operationsRed Hat:satellite:6.13::el8all versions · fixed in 0:1.3.0-2.el8sat
  • ansible-collection-redhat-satellite_operationsRed Hat:satellite_capsule:6.13::el8all versions · fixed in 0:1.3.0-2.el8sat
  • ansible-lintRed Hat:satellite:6.13::el8all versions · fixed in 0:5.0.8-4.el8pc
  • ansible-lintRed Hat:satellite_capsule:6.13::el8all versions · fixed in 0:5.0.8-4.el8pc
  • ansible-runnerRed Hat:satellite:6.13::el8all versions · fixed in 0:2.2.1-3.el8satand 1 other package
  • ansible-runnerRed Hat:satellite_capsule:6.13::el8all versions · fixed in 0:2.2.1-3.el8sat

551 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-31163 Red Hat Product Security9 products fixed · 4 known affected

    rubygem-tzinfo: arbitrary code execution

    rubygem-tzinfo as a component of Red Hat OpenShift Container Platform 3.11 · rubygem-tzinfo-doc as a component of Red Hat OpenShift Container Platform 3.11 · rubygem-tzinfo.src as a component of Red Hat OpenShift Container Platform 3.11 · +1 more

  • RHSA-2023:2097 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Satellite 6.13 Release

  • RHSA-2023:1486 Red Hat Product Security3 products fixed

    Red Hat Security Advisory: Red Hat Gluster Storage web-admin-build security update

  • RHSA-2022:7242 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: Satellite 6.11.4 Async Security Update

Full record on NVD

Fix

  1. Update Tzinfo project tzinfo to 1.2.10 · 0.3.61
  2. Vendor fix Red Hat Product Security RHSA-2023:2097 · 2 productsFor Red Hat Satellite 6.13, see the following documentation for the release. https://access.redhat.com/documentation/en-us/red_hat_satellite/6.13 The important instructions on how to upgrade are available below. https://access.redhat.com/documentation/en-us/red_hat_satellite/6.13/html/upgrading_an…
  3. Vendor fix Red Hat Product Security RHSA-2023:1486 · 3 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  4. Vendor fix Red Hat Product Security RHSA-2022:7242 · 4 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For detailed instructions how to apply this update, refer to: https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html/upgrading_and_updating_red_hat_satellite/index
  5. Workaround from the vendor Red Hat Product Security RHSA-2023:2097 · 1,938 productsAs 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.
  6. No fix available, says the vendor Red Hat Product Security CVE-2022-31163 · 3 productsAffected
  7. No fix planned, says the vendor Red Hat Product Security CVE-2022-31163 · 1 productWill not fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2024-09-05
  • CNACVSS 3.17.5known since 2026-10-23
  • NVDCVSS 3.18.1read 2026-10-23
  • CNAweakness (CWE)CWE-22, CWE-23known since 2026-10-23
  • NVDweakness (CWE)CWE-22read 2026-10-23
  • FIRST EPSSEPSS score2.4 %2026-12-04
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHigh2022-07-21

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2022-07-22
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-5cm2-9h8c-rvfx

Frequently asked questions

What is CVE-2022-31163?

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`.

Is CVE-2022-31163 actively exploited?

A proof-of-concept exploit exists for CVE-2022-31163, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2022-31163?

CVE-2022-31163 has a CVSS v3 base score of 8.1 (High severity), with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running tzinfo? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record