BUG:Unrestricted access from other web origins

Đang mở
#1,677 4 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 3 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
28/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api, backend, security

Hướng nghiên cứu

The CORS setup the issue points to is at about line 185 of the API configuration, where Access-Control-Allow-Origin is set to a wildcard and preflight POST is approved. Start there, then find which routes (such as album listing) lack authentication. Done means untrusted origins no longer receive CORS approval and sensitive operations require auth, with tests covering a rejected origin. Authentication is a design decision, so confirm scope with maintainers first.

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

Mô tả

bug possible-duplicate
Is there an existing issue for this?
  • I have searched the existing issues
What happened?

Live API accepted https://attacker.example, returned wildcard CORS on album listing, and approved POST preflight. No API authentication protects these routes. Browser local-network restrictions may limit exploitation.

location: [API CORS configuration (line 185) restrict origins and authenticate sensitive operations.

PictoPy’s backend runs on your computer, but its [CORS settings (line 185)] tell browsers that any website may request data from it. The API also has no authentication on routes such as album listing.

For example, if you visit a malicious website while PictoPy is running, that site could try to request http://localhost:52123/albums/. In my test, the backend accepted a request claiming to come from an unrelated website and returned a CORS header allowing it to read the response.

The risk is that a website could read photo-library information or call sensitive API routes. I verified the server behavior, but I did not demonstrate a complete browser attack; browser protections for access to local services may affect whether a particular website can exploit it. Restricting allowed origins and adding authentication to sensitive routes would address the underlying problem.

Record
  • I agree to follow this project's Code of Conduct
Ngôn ngữ chính
Python
Star
322
Fork
793
Merge trung bình
6 ngày 10 giờ
Pull request đã merge (30 ngày)
20

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

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 AOSSIE-Org/PictoPy

Tất cả issue của AOSSIE-Org/PictoPy

Issue tương tự

Thêm issue về Python

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.