Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

fix(security): zip decode limits trust the size declared in the archive header (zip-bomb bypass)

Đang mở
#1,561 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart, flutter
Lĩnh vực
desktop, security

Hướng nghiên cứu

Start with lib/core/security/safe_zip_extractor.dart:141-166 and inspect how archive 4.4.0 exposes entry content and size; the issue points to codecs/zip/zip_file.dart for the size hint behavior. Then trace extraction paths for marketplace installs, sideloads, and the updater. Done when extraction counts actual inflated bytes per entry and in total, aborts at the limits, retains the header pre-check, and a test uses a zip with a false declared size.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug core P1 stability

Problem

SafeZipExtractor._validateArchive (lib/core/security/safe_zip_extractor.dart:141-166) enforces the per-entry, total and compression-ratio limits using entry.size, which is the uncompressed size declared in the zip header.

In archive 4.4.0 that value is only a hint for the initial buffer (codecs/zip/zip_file.dart: "uncompressedSize is only a hint for the initial buffer"). A crafted zip that declares 1 KB can inflate to gigabytes on file.content, so all four limits can be bypassed. Affects marketplace install, sideload (no sha256 there, the file is user-chosen) and the updater.

Expected

  • Extract with a bounded streaming inflate that counts actual bytes written, per entry and in total, and aborts when a limit is exceeded.
  • Keep the header-based pre-check as a cheap early reject.
  • Test with a zip whose header lies about the size.
Ngôn ngữ chính
Dart
Star
23
Fork
1
Merge trung bình
31 phút
Pull request đã merge (30 ngày)
570

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của QueryaHub/Querya-Desktop

Tất cả issue của QueryaHub/Querya-Desktop

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.