CVE-2022-31163
CVSS v3
8.1
HIGH
EPSS Score
2.4 %
exploit probability, as of 2026-10-19
CISA KEV
No
known exploited
Exploitation
—
SSVC status
Get an alert for each new CVE published for tzinfo.
Affected and fixed versions
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
- tzinfoRubyGemsfrom 1.0.0 · fixed in 1.2.10
Vendor advisories
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
Red Hat Security Advisory: Satellite 6.13 Release
Red Hat Security Advisory: Red Hat Gluster Storage web-admin-build security update
Red Hat Security Advisory: Satellite 6.11.4 Async Security Update
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`.
Technical details
- Published
- 2022-07-22
Frequently asked questions
What is CVE-2022-31163?
Is CVE-2022-31163 actively exploited?
What is the CVSS score for CVE-2022-31163?
Running tzinfo? Hear about its next vulnerability
CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.
Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? CVE Watch alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.