cve.bz

CVE-2022-31163 Path traversal

8.1 highExploit referenceEPSS 2.4%Fix available

High (8.1). EPSS 2.4% estimated probability of exploitation activity in the next 30 days. Fixed in tzinfo 0.3.61, 1.2.10.

On this page
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`.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
2.4% (unchanged from 2.4% a week ago; 2.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 85th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2024-09-05. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
CWE-23 Relative Path Traversal
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-31163 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-31163?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-31163?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-31163 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
tzinfo_project:tzinfobefore 0.3.61
tzinfo_project:tzinfofrom 1.0.0 before 1.2.10
debian:debian_linux10.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-5cm2-9h8c-rvfxRubyGemstzinfo<0.3.610.3.61
GHSA-5cm2-9h8c-rvfxRubyGemstzinfo>=1.0.0 <1.2.101.2.10

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10ruby-tzinfo1.2.5-1+deb10u1DLA-3077-1
Debian11ruby-tzinfo1.2.6-1+deb11u1DLA-3866-1
Debian12, 13, 14ruby-tzinfo2.0.4-2DEBIAN-CVE-2022-31163
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 5 moreruby-tzinfono fix listedUBUNTU-CVE-2022-31163
Red Hatsatellite:6.11::el7tfm-rubygem-tzinfo0:1.2.10-1.el7satRHSA-2022:7242
Red Hatsatellite:6.11::el7, satellite_capsule:6.11::el7tfm-rubygem-rack0:2.2.3.1-1.el7satRHSA-2022:7242
Red Hatsatellite:6.11::el8rubygem-tzinfo0:1.2.10-1.el8satRHSA-2022:7242
Red Hatsatellite:6.11::el8, satellite_capsule:6.11::el8rubygem-rack0:2.2.3.1-1.el8satRHSA-2022:7242
Red Hatsatellite:6.13::el8foreman-obsolete-packages0:1.1-1.el8satRHSA-2023:2097
Red Hatsatellite:6.13::el8postgresql-evr0:0.0.2-1.el8satRHSA-2023:2097
Red Hatsatellite:6.13::el8python-websockify, python3-websockify0:0.10.0-3.el8satRHSA-2023:2097
Red Hatsatellite:6.13::el8qpid-dispatch, qpid-dispatch-tools, qpid-dispatch-router and 2 more0:1.14.0-6.el8RHSA-2023:2097
Red Hatsatellite:6.13::el8qpid-proton, qpid-proton-c, python3-qpid-proton and 5 more0:0.33.0-4.el8RHSA-2023:2097
Red Hatsatellite:6.13::el8rubygem-acts_as_list0:1.0.3-2.el8satRHSA-2023:2097
Red Hatsatellite:6.13::el8rubygem-algebrick, rubygem-websocket-driver, rubygem-websocket-driver-debuginfo and 1 more0:0.7.5-1.el8satRHSA-2023:2097
Red Hatsatellite:6.13::el8rubygem-anemone0:0.7.2-23.el8satRHSA-2023:2097
196 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise High Availability Extension 15, Linux Enterprise High Availability Extension 15 SP1, Linux Enterprise High Availability Extension 15 SP2 and 2 morerubygem-tzinfo1.2.4-150000.3.3.1SUSE-SU-2022:2592-1
SUSEOpenStack Cloud Crowbar 8, OpenStack Cloud Crowbar 9rubygem-tzinfo1.2.2-3.3.1SUSE-SU-2022:2765-1
openSUSELeap 15.3, Leap 15.4rubygem-tzinfo1.2.4-150000.3.3.1SUSE-SU-2022:2592-1
openSUSETumbleweedruby3.2-rubygem-tzinfo-1.21.2.10-1.4openSUSE-SU-2024:13171-1
openSUSETumbleweedrubygem-tzinfo-1.21.2.10-1.1openSUSE-SU-2024:12249-1
openSUSETumbleweedrubygem-tzinfo-1.21.2.11-1.5openSUSE-SU-2024:14178-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Red Hat Gluster Storage 3.5 for RHEL 7rubygem-tzinfo-0:1.2.10-1.el7rhgsFixed 2023-03-28RHSA-2023:1486
Red Hat Satellite 6.11 for RHEL 7tfm-rubygem-tzinfo-0:1.2.10-1.el7satFixed 2022-10-27RHSA-2022:7242
Red Hat Satellite 6.11 for RHEL 8rubygem-tzinfo-0:1.2.10-1.el8satFixed 2022-10-27RHSA-2022:7242
Red Hat Satellite 6.13 for RHEL 8rubygem-tzinfo-0:2.0.5-1.el8satFixed 2023-05-03RHSA-2023:2097
Red Hat OpenShift Container Platform 3.11rubygem-tzinfoAffected
Red Hat OpenStack Platform 13 (Queens) Operational Toolsrubygem-tzinfoWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-31163.

Attack patterns (CAPEC)

  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-139 Relative Path Traversal Likelihood: High · Severity: High
  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON