Security: local HTTP API is unauthenticated with wildcard CORS — any webpage can load configs, launch or delete files and read disk
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
- 45/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ệ
- python
- Lĩnh vực
- api, authentication, backend, security
Hướng nghiên cứu
Begin at src/profiles/server/app.py:40-46 to replace wildcard CORS with the UI origin and add Host-header validation. Reuse the instance_token from routes/instance.py:29-39 as a bearer on all /api routes, including routes/config.py and routes/actions.py. Done means every non-instance API requires the token, CORS denies foreign origins, and server binds loopback by default.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Everything except /api/instance/* is served with no authentication, and CORSMiddleware is configured with allow_origins=["*"] and allow_credentials=True (src/profiles/server/app.py:40-46). With that combination Starlette echoes any requesting origin back with Access-Control-Allow-Credentials: true, so any page open in any browser on the user's machine can send POSTs to http://127.0.0.1:8088/api/... and read the responses. There is no CSRF token, no same-origin check, and no Host header validation anywhere (the only header check in the codebase is the handoff token in routes/instance.py:29-39).
Drive-by chain (no user interaction beyond visiting a webpage while ProFiles runs)
POST /api/config/load-content(src/profiles/server/routes/config.py:160-188) uploads raw YAML content that becomes the live config after schema validation only. Confighooks:entries are arbitrary shell commands (see the companion shell=True issue).POST /api/actions/launch(src/profiles/server/routes/actions.py:113-134) accepts any directory/filename pair and runs the matching workflow.POST /api/actions/delete(routes/actions.py:164-176→src/profiles/core/actions.py:357-406) deletes any file on disk — "confirmation" is client-side only; a drive-by client simply lies.POST /api/actions/launch-with-args,/open-folder,/open-terminal,/reveal,/hash,/metadataaccept absolute paths with no scoping;GET /api/fs/browse(routes/fs.py:33-67) lists any directory on any drive;GET /api/configandGET /api/systemleak scan directories, username, hostname and IP.- On
--server-onlythe server binds0.0.0.0(src/profiles/app.py:262) — everything above is then reachable by any LAN device with zero auth.
Additionally there is no Host-header check, so DNS rebinding bypasses any CORS-only fix.
Suggested fix
- Require the existing
instance_token(already generated per-instance and used by/api/instance/*) as a bearer token on all/apiroutes; the web client is served by the same server and can receive it at bootstrap. - Set
allow_originsto the actual UI origin instead of["*"]+ credentials. - Validate the
Hostheader (accept only127.0.0.1:<port>/localhost:<port>) — this also closes DNS rebinding. - Keep the default bind on loopback; if LAN sharing via
--server-onlystays a feature, gate it behind the token or an explicit opt-in flag.
Severity: HIGH. Compounding factor: a forced config load turns into command execution via the workflow shell=True issue.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 1
- Merge trung bình
- 4 giờ 46 phút
- Pull request đã merge (30 ngày)
- 55
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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.
Issue khác của falbany/ProFiles
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
falbany/ProFiles#187 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Web UI: config handoff from a second launch leaves the open YAML editor showing stale contentĐang mởbug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của falbany/ProFiles
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ip-tools/patzilla#219 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushesĐang mởpriority:p3 technical-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jimmy058910/jmo-security-repo#1673 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
integration: frontier_silicon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
home-assistant/core#193176 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
task create and task update take --body-file and --stdinCó thể đã có người làm @JuanBarriosS đã nhận hôm nay. Đang mởcli enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
pyrite-wiki/pyrite#1687 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày