CustomAlerts.getAlert discloses alert existence to any authenticated user, including accounts with no site access

Đang mở Phù hợp với người mới
#310 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
65/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ệ
php

Hướng nghiên cứu

Bắt đầu tại plugins/CustomAlerts/API.php, ở getAlert(), rồi so sánh bước kiểm tra quyền sở hữu với getAlerts() và getTriggeredAlerts(), mà theo issue, giới hạn kết quả trong SQL. Đảm bảo phản hồi cho người không sở hữu không thể phân biệt với phản hồi cho một cảnh báo không tồn tại, rồi xác minh cả hai trường hợp đều trả về cùng một lỗi không tìm thấy.

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

Mô tả

Reported to the Matomo HackerOne program (report #4220417) and closed as Informative — the program confirmed the code reading, ruled it a hardening gap rather than a bounty-eligible vulnerability, and suggested filing here; the fix shape below is the one the program itself proposed.

Behavior (CustomAlerts 5.3.3, plugins/CustomAlerts/API.php)
getAlert() throws CustomAlerts_AlertDoesNotExist (line 73) before Validator::checkUserHasPermissionForAlert is called (line 77). Any authenticated caller — including an account with no site access at all — can distinguish a nonexistent alert ID from a foreign-owned one purely from the error message. No alert definition, name, recipients, or history is exposed.

Suggested fix
Merge the existence and ownership responses into a single not-found error for any non-owner, the same way getAlerts / getTriggeredAlerts already scope their results in SQL.

Happy to provide the controlled-fixture reproduction details from the original report if useful.

Ngôn ngữ chính
PHP
Star
17
Fork
24
Merge trung bình
20 giờ 38 phút
Pull request đã merge (30 ngày)
11

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

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

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 matomo-org/plugin-CustomAlerts

Tất cả issue của matomo-org/plugin-CustomAlerts

Issue tương tự

Thêm issue về PHP

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.