Lookup for vulnerable packages by Package URL.

Purlpkg:gem/tzinfo@0.2.2
Typegem
Namespace
Nametzinfo
Version0.2.2
Qualifiers
Subpath
Is_vulnerabletrue
Next_non_vulnerable_version0.3.61
Latest_non_vulnerable_version1.2.10
Affected_by_vulnerabilities
0
url VCID-kkef-q9fm-xuhw
vulnerability_id VCID-kkef-q9fm-xuhw
summary
TZInfo relative path traversal vulnerability allows loading of arbitrary files
### Impact

#### Affected versions

  - 0.3.60 and earlier.
  - 1.0.0 to 1.2.9 when used with the Ruby data source (tzinfo-data).

#### Vulnerability 

With the Ruby data source (the tzinfo-data gem for tzinfo version 1.0.0 and later and built-in to earlier versions), 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.

For example, with version 1.2.9, you can run the following to load a file with path `/tmp/payload.rb`:

```ruby
TZInfo::Timezone.get("foo\n/../../../../../../../../../../../../../../../../tmp/payload")
```

The exact number of parent directory traversals needed will vary depending on the location of the tzinfo-data gem.

TZInfo versions 1.2.6 to 1.2.9 can be made to load files from outside of the Ruby load path. Versions up to and including 1.2.5 can only be made to load files from directories within the load path. 

This could be exploited in, for example, a Ruby on Rails application using tzinfo version 1.2.9, that allows file uploads and has a time zone selector that accepts arbitrary time zone identifiers. The CVSS score and severity have been set on this basis.

Versions 2.0.0 and later are not vulnerable.

### Patches

Versions 0.3.61 and 1.2.10 include fixes to correctly validate time zone identifiers (commit 9eddbb5c0e682736f61d0dd803b6031a5db9eadf for 0.3.x and commit 9905ca93abf7bf3e387bd592406e403cd18334c7 for 1.2.x).

Note that 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. For example if `/tmp/upload` was in the load path, then `TZInfo::Timezone.get('foo')` could load a file with path `/tmp/upload/tzinfo/definition/foo.rb`. Applications should ensure that untrusted files are not placed in a directory on the load path.

### Workarounds

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`.

### For more information

If you have any questions or comments about this advisory:
  - Open an issue in [the tzinfo repository](https://github.com/tzinfo/tzinfo).
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-31163.json
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-31163.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2022-31163
reference_id
reference_type
scores
0
value 0.05032
scoring_system epss
scoring_elements 0.89774
published_at 2026-04-26T12:55:00Z
1
value 0.05032
scoring_system epss
scoring_elements 0.89773
published_at 2026-04-29T12:55:00Z
2
value 0.05032
scoring_system epss
scoring_elements 0.89758
published_at 2026-04-21T12:55:00Z
3
value 0.05032
scoring_system epss
scoring_elements 0.89764
published_at 2026-04-18T12:55:00Z
4
value 0.05032
scoring_system epss
scoring_elements 0.89763
published_at 2026-04-16T12:55:00Z
5
value 0.05032
scoring_system epss
scoring_elements 0.89747
published_at 2026-04-13T12:55:00Z
6
value 0.05032
scoring_system epss
scoring_elements 0.89708
published_at 2026-04-02T12:55:00Z
7
value 0.05032
scoring_system epss
scoring_elements 0.89749
published_at 2026-04-09T12:55:00Z
8
value 0.05032
scoring_system epss
scoring_elements 0.89742
published_at 2026-04-08T12:55:00Z
9
value 0.05032
scoring_system epss
scoring_elements 0.89723
published_at 2026-04-04T12:55:00Z
10
value 0.05032
scoring_system epss
scoring_elements 0.89725
published_at 2026-04-07T12:55:00Z
11
value 0.05032
scoring_system epss
scoring_elements 0.89754
published_at 2026-04-12T12:55:00Z
12
value 0.05032
scoring_system epss
scoring_elements 0.89756
published_at 2026-04-11T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2022-31163
2
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-31163
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-31163
3
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
4
reference_url https://github.com/rubysec/ruby-advisory-db/blob/master/gems/tzinfo/CVE-2022-31163.yml
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/rubysec/ruby-advisory-db/blob/master/gems/tzinfo/CVE-2022-31163.yml
5
reference_url https://github.com/tzinfo/tzinfo
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/tzinfo/tzinfo
6
reference_url https://github.com/tzinfo/tzinfo/commit/9905ca93abf7bf3e387bd592406e403cd18334c7
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2024-09-05T14:09:24Z/
url https://github.com/tzinfo/tzinfo/commit/9905ca93abf7bf3e387bd592406e403cd18334c7
7
reference_url https://github.com/tzinfo/tzinfo/commit/9eddbb5c0e682736f61d0dd803b6031a5db9eadf
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2024-09-05T14:09:24Z/
url https://github.com/tzinfo/tzinfo/commit/9eddbb5c0e682736f61d0dd803b6031a5db9eadf
8
reference_url https://github.com/tzinfo/tzinfo/commit/ca29f349856d62cb2b2edb3257d9ddd2f97b3c27
reference_id
reference_type
scores
url https://github.com/tzinfo/tzinfo/commit/ca29f349856d62cb2b2edb3257d9ddd2f97b3c27
9
reference_url https://github.com/tzinfo/tzinfo/releases/tag/v0.3.61
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2024-09-05T14:09:24Z/
url https://github.com/tzinfo/tzinfo/releases/tag/v0.3.61
10
reference_url https://github.com/tzinfo/tzinfo/releases/tag/v1.2.10
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2024-09-05T14:09:24Z/
url https://github.com/tzinfo/tzinfo/releases/tag/v1.2.10
11
reference_url https://github.com/tzinfo/tzinfo/security/advisories/GHSA-5cm2-9h8c-rvfx
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3
scoring_elements
1
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
2
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
3
value HIGH
scoring_system generic_textual
scoring_elements
4
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2024-09-05T14:09:24Z/
url https://github.com/tzinfo/tzinfo/security/advisories/GHSA-5cm2-9h8c-rvfx
12
reference_url https://lists.debian.org/debian-lts-announce/2022/08/msg00009.html
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2024-09-05T14:09:24Z/
url https://lists.debian.org/debian-lts-announce/2022/08/msg00009.html
13
reference_url https://nvd.nist.gov/vuln/detail/CVE-2022-31163
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2022-31163
14
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2110551
reference_id 2110551
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2110551
15
reference_url https://github.com/advisories/GHSA-5cm2-9h8c-rvfx
reference_id GHSA-5cm2-9h8c-rvfx
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-5cm2-9h8c-rvfx
16
reference_url https://access.redhat.com/errata/RHSA-2022:7242
reference_id RHSA-2022:7242
reference_type
scores
url https://access.redhat.com/errata/RHSA-2022:7242
17
reference_url https://access.redhat.com/errata/RHSA-2023:1486
reference_id RHSA-2023:1486
reference_type
scores
url https://access.redhat.com/errata/RHSA-2023:1486
18
reference_url https://access.redhat.com/errata/RHSA-2023:2097
reference_id RHSA-2023:2097
reference_type
scores
url https://access.redhat.com/errata/RHSA-2023:2097
fixed_packages
0
url pkg:gem/tzinfo@0.3.61
purl pkg:gem/tzinfo@0.3.61
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:gem/tzinfo@0.3.61
1
url pkg:gem/tzinfo@1.2.10
purl pkg:gem/tzinfo@1.2.10
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:gem/tzinfo@1.2.10
aliases CVE-2022-31163, GHSA-5cm2-9h8c-rvfx
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-kkef-q9fm-xuhw
Fixing_vulnerabilities
Risk_score4.0
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:gem/tzinfo@0.2.2