google / google/clusterfuzz

Reject symbolic and hard links in untrusted TAR archives

Open
#5,364 1 comment 0 reactions 0 assignees View on GitHub
stale
Dominant language
Python
Stars
5.6k
Forks
629
Avg merge
4d 6h
Merged PRs (30d)
22

Description

TarArchiveReader validates the member pathname before extraction, but an untrusted TAR member can be a symbolic link or hard link whose target resolves outside the extraction directory.

This is unsafe for callers that later read extracted member paths as ordinary files, such as bundled testcase processing.

Reject TAR symbolic and hard-link members when trusted=False. Keep existing trusted-archive behavior unchanged, and add regression tests covering both unsafe link types.

Contributor guide

Open the contributing guide

Research direction

Start by locating TarArchiveReader and its existing member-path validation, then find the archive regression tests. Trace how symbolic and hard-link members are handled when trusted=False and compare that with trusted-archive behavior. Done means both unsafe link types are rejected only for untrusted archives, with regression coverage for each while trusted behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.