Implement extraction safety for tarfile context by jaraco · Pull Request #18 · jaraco/jaraco.context · GitHub
Skip to content

Implement extraction safety for tarfile context - #18

Merged
jaraco merged 9 commits into
mainfrom
security/extraction-safety
Jan 13, 2026
Merged

jaraco merged 9 commits into
mainfrom
security/extraction-safety

Conversation

@jaraco

@jaraco jaraco commented Jan 13, 2026

Copy link
Copy Markdown
Owner
  • Add repro as provided by tsigouris007
  • 👹 Feed the hobgoblins (delint).
  • Convert the repro to a parameterized unit test.
  • Update implementation to have different expectations for different cases.
  • In tarfile.context, ensure that the default filter honors the data filter to avoid path traversal vulnerabilities.
  • Add another case, demonstrating legitimate use of parent dir.
  • Also extract the member, for completeness.
  • Use the filter argument to tarfile.extract to avoid the deprecation warning.

@jaraco
jaraco merged commit 7b26a42 into main Jan 13, 2026
26 checks passed
@jaraco
jaraco deleted the security/extraction-safety branch January 13, 2026 02:49
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.

1 participant