Skip to content

← Actionable
Medium, CVSS 5.1

tar-rs unpack_in can chmod arbitrary directories by following symlinks

CVE-2026-33056GHSA-j4xf-2g29-59ph

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (tar 0.4.45), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • crates.io tar

    Affected
    <= 0.4.44
    Fixed in
    0.4.45

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
5.1 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N · score source
EPSS
  • CVE-2026-33056: 0.39% estimated exploitation activity in the next 30 days; percentile 32.68 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary When unpacking a tar archive, the tar crate's unpackdir function uses fs::metadata() to check whether a path that already exists is a directory. Because fs::metadata() follows symbolic links, a crafted tarball containing a symlink entry followed by a directory entry with the same name causes the crate to treat the symlink target as a valid existing directory — and subsequently apply chmod to it. This allows an attacker to modify the permissions of arbitrary directories outside the extraction root. Reproducer A malicious tarball contains two entries: (1) a symlink foo pointing to an arbitrary external directory, and (2) a directory entry foo/. (or just foo). When unpacked, createdir("foo") fails with EEXIST because the symlink is already on disk. The fs::metadata() check then follows the symlink, sees a directory at the target, and allows processing to continue. The directory entry's mode bits are then applied via chmod, which also follows the symlink — modifying the…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-j4xf-2g29-59ph

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-33056

Advisory: tar-rs `unpack_in` can chmod arbitrary directories by following symlinks
IDs: CVE-2026-33056, GHSA-j4xf-2g29-59ph
Record: https://patchnext.com/advisories/cve-2026-33056 (revision 1, source checked 26 Oct 2026, 15:42 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.1)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: tar 0.4.45. A vendor fix does not mean a deployment is fixed.

## Affected components
- crates.io tar: affected <= 0.4.44; fixed in 0.4.45

## Suggested inspection (read-only)
- crates.io tar: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on tar.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-j4xf-2g29-59ph (GitHub-reviewed advisory GHSA-j4xf-2g29-59ph lists affected ranges: crates.io tar >=0 <=0.4.44)

Commands are suggestions: review each one before running it.

Loading voting…