RubySec

Providing security resources for the Ruby community

GHSA-r6vf-943r-2wvw (minitar): minitar path traversal vulnerability on Windows with a maliciously crafted tarball

minitar path traversal vulnerability on Windows with a maliciously crafted tarball

Published: November 11, 2026

SECURITY IDENTIFIERS

GEM

minitar

SEVERITY

CVSS v3.x: 4.4 (Medium)

PATCHED VERSIONS

~> 1.1.1 >= 1.2.0

DESCRIPTION

On Windows, a maliciously crafted tarball can write files outside of the extraction directory.

Impact

Path traversal (CWE-22). A crafted tar archive can cause files to be created or overwritten outside the extraction directory.

Applications and scripts running on Windows Ruby (platforms where File::ALT_SEPARATOR is "\", such as mswin and mingw) that extract tar archives from sources they don't fully control, using Minitar.unpack, Minitar::Input#extract_entry, or Minitar::Input#each. Platforms where File::ALT_SEPARATOR is nil, including Linux, macOS, and the BSDs, are not affected, because \ is not a separator there and is extracted as a literal filename character.

A crafted archive can cause files to be created or overwritten outside the destination directory, limited to locations the extracting process can write to. Exploitation requires a user or process to extract the attacker-supplied archive. Further impact depends on what is writable and what the overwritten files are used for.

RELATED