8.1

CVE-2022-31163: TZInfo relative path traversal vulnerability allows loading of arbitrary files

Modified
AliasesSUSE-SU-2022:2592-1SUSE-SU-2022:2765-1UBUNTU-CVE-2022-31163
Published 21-07-2022Last modified 05-09-2024

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.

Priority
Prioritisepublic exploit

Public exploit (GitHub, Date unknown)

Source freshness unavailable

How is this decided?
CVSS score
8.1/10
010
High · v3.1 (NVD)
EPSS score
2.45%
0%100%
Low · +0.07 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 3

Timeline

  1. 21-07-2022
    PublishedVulnerability first disclosed.
  2. 05-09-2024
    Last 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

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

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Tzinfo

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

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
Show all 18 references