CVE-2022-31163TZInfo relative path traversal vulnerability allows loading of arbitrary files
- 7.5HighCVSS base score
- 2.4%Exploitation in 30 daysEPSS · top 15% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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`.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
ID reserved
By GitHub_M
- 2 months later
· 2 months later
Published
- 2 years later
· 2 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | High8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 2.4% · top 15% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.5.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- RubyGemstzinfoGHSA-5cm2-9h8c-rvfx (opens in a new tab)
References
References7
- https://github.com/tzinfo/tzinfo/security/advisories/GHSA-5cm2-9h8c-rvfx (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/tzinfo/tzinfo/releases/tag/v0.3.61 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tzinfo/tzinfo/releases/tag/v1.2.10 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tzinfo/tzinfo/commit/9eddbb5c0e682736f61d0dd803b6031a5db9eadf (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tzinfo/tzinfo/commit/9905ca93abf7bf3e387bd592406e403cd18334c7 (opens in a new tab)x_refsource_MISCx_transferred
- [debian-lts-announce] 20220818 [SECURITY] [DLA 3077-1] ruby-tzinfo security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- https://lists.debian.org/debian-lts-announce/2024/09/msg00008.html (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-6242 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-5cm2-9h8c-rvfx (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-31163)Record last updated .