#VU68860 Path traversal in Tzinfo


Published: 2022-10-31

Vulnerability identifier: #VU68860

Vulnerability risk: Medium

CVSSv3.1: 5.3 [CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N/E:P/RL:O/RC:C]

CVE-ID: CVE-2022-31163

CWE-ID: CWE-22

Exploitation vector: Network

Exploit availability: No

Vulnerable software:
Tzinfo
Universal components / Libraries / Libraries used by multiple products

Vendor: Tzinfo Project

Description

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to input validation error when processing a new line character in the TZInfo::Timezone.get. 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. A remote attacker can pass specially crafted input to the application and execute arbitrary code on the system.

Exploitation example:

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

Mitigation
Install update from vendor's website.

Vulnerable software versions

Tzinfo: 1.2.0 - 1.2.9, 1.1.0, 1.0.0 - 1.0.1, 0.3.0 - 0.3.60, 0.2.0 - 0.2.2, 0.1.0 - 0.1.2, 0.0.1 - 0.0.4


External links
http://github.com/tzinfo/tzinfo/releases/tag/v0.3.61
http://github.com/tzinfo/tzinfo/security/advisories/GHSA-5cm2-9h8c-rvfx
http://github.com/tzinfo/tzinfo/releases/tag/v1.2.10
http://github.com/tzinfo/tzinfo/commit/9eddbb5c0e682736f61d0dd803b6031a5db9eadf
http://github.com/tzinfo/tzinfo/commit/9905ca93abf7bf3e387bd592406e403cd18334c7


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, proof of concept for this vulnerability is available.


Latest bulletins with this vulnerability