Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2022-31163

Опубликовано: 22 июл. 2022
Источник: redhat
CVSS3: 7.5
EPSS Низкий

Описание

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.

A flaw was found in rubygem-tzinfo. When using the Timezone.get function, it fails to validate time zone identifiers correctly, allowing a new line character input within the identifier. This flaw allows an attacker to use the new line character and write any code, which will be executed within the Ruby process.

Меры по смягчению последствий

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.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat OpenShift Container Platform 3.11rubygem-tzinfoAffected
Red Hat OpenStack Platform 13 (Queens) Operational Toolsrubygem-tzinfoWill not fix
Red Hat Gluster Storage 3.5 for RHEL 7rubygem-tzinfoFixedRHSA-2023:148628.03.2023
Red Hat Satellite 6.11 for RHEL 7tfm-rubygem-tzinfoFixedRHSA-2022:724227.10.2022
Red Hat Satellite 6.11 for RHEL 8rubygem-tzinfoFixedRHSA-2022:724227.10.2022
Red Hat Satellite 6.13 for RHEL 8rubygem-tzinfoFixedRHSA-2023:209703.05.2023

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-22
Дефект:
CWE-23
https://bugzilla.redhat.com/show_bug.cgi?id=2110551rubygem-tzinfo: arbitrary code execution

EPSS

Процентиль: 90%
0.05198
Низкий

7.5 High

CVSS3

Связанные уязвимости

CVSS3: 7.5
ubuntu
больше 3 лет назад

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

CVSS3: 7.5
nvd
больше 3 лет назад

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

CVSS3: 7.5
debian
больше 3 лет назад

TZInfo is a Ruby library that provides access to time zone data and al ...

suse-cvrf
больше 3 лет назад

Security update for rubygem-tzinfo

CVSS3: 7.5
github
больше 3 лет назад

TZInfo relative path traversal vulnerability allows loading of arbitrary files

EPSS

Процентиль: 90%
0.05198
Низкий

7.5 High

CVSS3

Уязвимость CVE-2022-31163