tarfile `data`/`tar` filter bypass via hard link to a symlink
Đang mở
@StanFromIreland đang làm issue này rồi.
Từ ngày 8/9/2026.
3.10
3.11
3.12
3.13
stdlib
type-security
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
On CPython 3.13.15 for Linux, an attacker-controlled tar archive extracted with the tar or data filter can make tarfile change the permissions and modification time of an existing file outside the extraction directory. The archive also leaves a path inside the extracted tree that resolves to the outside file. Opening that path returns the outside file's content.
This was incidentally fixed by https://github.com/python/cpython/commit/5a57248b22ad3b9aafcaaadae2c304a1923daeca for 3.14+ which changed os.link to use AT_SYMLINK_FOLLOW.
Linked PRs
- gh-157191
- gh-157192
- gh-157261
- gh-157262
- gh-157454
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.