LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31163: TZInfo relative path traversal vulnerability allows loading of arbitrary files

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

HighCVSS 7.5Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

TZInfo, a Ruby time zone library, could be tricked into loading unintended Ruby files when vulnerable versions process malformed time zone identifiers. If an application accepts untrusted time zone input, this can expose the Ruby process to arbitrary code execution under specific conditions.

Executive priority

Treat this as a high-priority dependency fix for Ruby systems that accept user-selected time zones. It is not confirmed as actively exploited in the supplied sources, but the potential impact includes code execution inside an application process.

Technical view

Affected TZInfo versions fail to validate time zone identifiers correctly, allowing newline characters. With the Ruby data source, time zone definitions are loaded on demand via Ruby require, so malformed identifiers can cause unintended files to load and execute inside the process.

Likely exposure

Exposure is most likely in Ruby applications using tzinfo versions below 0.3.61 or 1.0.0 through below 1.2.10 with tzinfo-data, especially where user-controlled time zone identifiers reach TZInfo::Timezone.get.

Exploitation context

The bundle reports no CISA KEV listing and does not cite active exploitation. Practical risk depends on vulnerable TZInfo use, attacker-influenced time zone identifiers, and load-path conditions that allow an unintended Ruby file to be loaded.

Researcher notes

The key condition is identifier validation failure before Ruby require loads time zone definition files. Version 0.3.61 fixes validation but still requires care with load-path hygiene for valid-looking paths under tzinfo/definition.

Mitigation direction

  • Upgrade TZInfo to 0.3.61, 1.2.10, or a non-vulnerable 2.x release.
  • Apply relevant operating-system package updates where TZInfo is supplied by the distribution.
  • Validate time zone identifiers before passing them to TZInfo::Timezone.get.
  • Keep untrusted files out of directories on the Ruby load path.
  • Review vendor guidance before relying on any workaround.

Validation and detection

  • Inventory Ruby dependency manifests and runtime gem versions for affected TZInfo ranges.
  • Confirm whether vulnerable 1.x deployments use the Ruby data source tzinfo-data.
  • Trace application paths where user input becomes a time zone identifier.
  • Check whether Ruby load-path directories can contain untrusted files.
  • Verify patched versions reject invalid time zone identifiers in regression tests.
Prepared
Confidence
high
Sources
9

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-22: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · medium confidence lookup

CWE-23: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

File access behavior lookup

The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31163 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
8Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H1.65.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.5High
CVSS 3.1 vector shape for CVE-2022-31163Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
tzinfotzinfo< 0.3.61, >= 1.0.0, < 1.2.10Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-22 · source CWE mapping

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-23 · source CWE mapping

Relative Path Traversal

Relative Path Traversal represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.