CVE-2022-31163: TZInfo relative path traversal vulnerability allows loading of arbitrary files
Vulnerability summary
CVE-2022-31163 is a high (CVSS 8.1) vulnerability in debian debian_linux. EPSS estimates a 2.45% chance of exploitation in the next 30 days, higher than 84.3% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (GitHub, Date unknown)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 3Timeline
- 21-07-2022PublishedVulnerability first disclosed.
- 05-09-2024Last modifiedVulnerability information updated.
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`.
CVSS metrics
5 scores · 5 sources · 1 version- CVE.orgCNA7.5HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · RubygemsEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HDiffers
EPSS trend
Probability
2.45%
Chance of exploitation in the next 30 days
Percentile
84%
Versus all other CVEs
30-day change
Increase +0.07 pp
From 2.38% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundTzinfo
Maturity: poc
Weaknesses
CWE · root cause- CWE-22Improper Limitation of a Pathname to a Restricted DirectoryThe product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- CWE-23Relative Path TraversalThe product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.
Affected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Suse7 products
- rubygem-tzinfo&distro=SUSE Linux Enterprise High Availability Extension 15< 1.2.4-150000.3.3.1
- rubygem-tzinfo&distro=SUSE Linux Enterprise High Availability Extension 15 SP1< 1.2.4-150000.3.3.1
- rubygem-tzinfo&distro=SUSE Linux Enterprise High Availability Extension 15 SP2< 1.2.4-150000.3.3.1
- rubygem-tzinfo&distro=SUSE Linux Enterprise High Availability Extension 15 SP3< 1.2.4-150000.3.3.1
- rubygem-tzinfo&distro=SUSE Linux Enterprise High Availability Extension 15 SP4< 1.2.4-150000.3.3.1
Opensuse4 products
- ruby3.2-rubygem-tzinfo-1.2&distro=openSUSE Tumbleweed< 1.2.10-1.4
- rubygem-tzinfo-1.2&distro=openSUSE Tumbleweed< 1.2.10-1.1 | < 1.2.11-1.5
- rubygem-tzinfo&distro=openSUSE Leap 15.3< 1.2.4-150000.3.3.1
- rubygem-tzinfo&distro=openSUSE Leap 15.4< 1.2.4-150000.3.3.1
Debian2 products
- ruby-tzinfo< 1.2.5-1+deb10u1 | < 1.2.6-1+deb11u1 | < 2.0.4-2
- debian_linuxEOL10.0
RubyGems1 product
- tzinfo< 0.3.61 | ≥ 1.0.0, < 1.2.10
Tzinfo1 product
- tzinfo< 0.3.61 | ≥ 1.0.0, < 1.2.10
Tzinfo_project1 product
- tzinfo< 0.3.61 | ≥ 1.0.0, < 1.2.10
Ubuntu1 product
- ruby-tzinfoAll versions (No fix recorded)
7 vendors · 17 products
References
18 links- github.com/tzinfo/tzinfo/security/advisories/GHSA-5cm2-9h8c-rvfxX Refsource CONFIRMREPORTWEBExploitThird Party Advisory
- github.com/tzinfo/tzinfo/releases/tag/v0.3.61X Refsource MISCREPORTWEBRelease NotesThird Party Advisory
- github.com/tzinfo/tzinfo/releases/tag/v1.2.10X Refsource MISCREPORTWEBRelease NotesThird Party Advisory
- github.com/tzinfo/tzinfo/commit/9eddbb5c0e682736f61d0dd803b6031a5db9eadfX Refsource MISCWEBPatchThird Party Advisory
- github.com/tzinfo/tzinfo/commit/9905ca93abf7bf3e387bd592406e403cd18334c7X Refsource MISCWEBPatchThird Party Advisory
- lists.debian.org/debian-lts-announce/2022/08/msg00009.htmlMailing ListX Refsource MLISTWEBThird Party Advisory
Show all 18 references
- github.com/tzinfo/tzinfoPACKAGE