/

CVE-2026-73030

Severity:

HIGH RISK

(8.1)

Path Traversal (CWE-22) in Unearth Archive Extraction

CVE-2026-73030

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Unearth through 0.18.2 contains a path traversal vulnerability in its directory-containment validation. Malicious tar archives containing traversal paths or symlink members may cause files to be written outside the intended extraction directory when processed by a vulnerable application.

Affected context

The vulnerability occurs in applications that use Unearth's archive extraction functionality and rely on the affected is_within_directory check to constrain extracted paths. Risk is higher when an attacker can provide or influence tar archives processed by a service or local workflow, and when the process has write access to sensitive filesystem locations.

Exploit preconditions

  • Attack surface: Tar archive extraction through Unearth
  • Required access: Ability to supply or influence an archive that the vulnerable process will extract
  • Trigger point: Path validation and file creation during archive extraction
  • Why exploitation is possible: The containment check does not normalize paths before validation, allowing traversal components or symlink-related archive members to evade the intended directory boundary

Why this happens

The underlying bug is an incomplete path containment check. The is_within_directory function validates paths before applying canonical normalization, so syntactic path components can make an unsafe destination appear to be inside the permitted directory. Archive extraction that follows symlinks or trusts member names can then write outside the extraction root, mapping to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

Potential impact

  • An attacker may write or overwrite files outside the intended extraction directory.
  • The process may modify configuration, application, or user-controlled files.
  • Arbitrary file writes could enable further code execution depending on permissions and file locations.
  • Sensitive data or system integrity may be affected.
  • A compromised extraction workflow could facilitate persistence or lateral impact.

General mitigation guidance

Mitigation generally focuses on making archive extraction path-safe by default and reducing trust in archive metadata.

Common defensive patterns include:

  • Canonicalizing and normalizing extraction paths before containment checks.
  • Rejecting absolute paths, traversal components, and unsafe symlink or hard-link members.
  • Verifying that every resolved destination remains beneath the intended extraction root.
  • Extracting into isolated, least-privileged temporary directories before moving approved files.
  • Applying restrictive filesystem permissions and avoiding privileged extraction processes.
  • Using archive libraries and APIs that provide safe extraction semantics by default.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying path checks performed before canonicalization.
  • Code review signals such as direct concatenation of archive member names with extraction directories.
  • Tests covering traversal components, absolute paths, symlinks, hard links, and canonical path boundary cases.
  • Runtime monitoring for extraction processes writing outside approved staging directories.
  • Policy enforcement requiring isolated, least-privileged archive processing.

Automated security review tools may help identify unsafe path-joining and archive-extraction patterns.

Sources

SourceLink
github.comgithub.com/frostming/unearth/commit/6c78164e7bfa28b8b3d6f247b87e560692e3c8ba
github.comgithub.com/frostming/unearth/issues/180
github.comgithub.com/frostming/unearth/pull/181
vulncheck.comvulncheck.com/advisories/unearth-path-traversal-via-unnormalized-paths-and-symlink-escape

Frequently asked

questions

It can be remotely exploitable when a network-facing service accepts attacker-controlled tar archives for processing. In local workflows, exploitation generally requires the ability to place or influence an archive that will be extracted.

The attacker needs a path to supply or influence an archive and a processing context that uses the vulnerable extraction logic. The impact also depends on the filesystem permissions of the Unearth process.

Use canonical, normalized destination checks and reject unsafe archive members, including traversal paths and links that resolve outside the extraction root.

Combine safe-by-default archive APIs, isolated extraction directories, least-privilege execution, adversarial archive tests, and monitoring for writes outside approved paths.

Find out what's already
exploitable in your codebase.