Skip to content

fix(archive): prevent tar path traversal in VFS#455

Merged
chaliy merged 1 commit intomainfrom
claude/fix-416-Y2nIj
Mar 2, 2026
Merged

fix(archive): prevent tar path traversal in VFS#455
chaliy merged 1 commit intomainfrom
claude/fix-416-Y2nIj

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Mar 1, 2026

Summary

  • Reject tar entries with .. components, absolute paths, or resolved paths outside extraction directory
  • Three-layer defense: component check, prefix check, resolved path validation

Test plan

  • test_tar_extract_path_traversal_dotdot_blocked
  • test_tar_extract_path_traversal_absolute_blocked
  • test_tar_extract_path_traversal_dir_dotdot_blocked
  • test_tar_extract_safe_paths_still_work

Closes #416

Reject tar entries with ".." components, absolute paths, or resolved
paths outside the extraction directory.

Closes #416
@chaliy chaliy merged commit bdee626 into main Mar 2, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M-2] Tar path traversal allows writing to arbitrary VFS paths

2 participants