Security: /proxy endpoint is an open SSRF proxy #16
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
paul_loth/krautspaceTV#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
GET /proxy?url=<any-url>(backend/app.py:160-222) fetches whatever URL is passed and returns the response, with no allowlist, no auth, and no restriction on scheme/host. It's reachable unauthenticated on the public HTTPS/HTTP listeners (backend-tls-443.serviceandbackend-http.serviceboth bind0.0.0.0).This makes the signage server an open SSRF proxy:
http://192.168.254.147/..., the 3D printer), confirming the internal network is reachable from this host.Suggested fix
Restrict
/proxywhen called with a rawurlparam (theslide_id-driven path is fine, since that's server-controlled) to:http/httpsschemes (already partially checked viaurlparse(url).scheme, but doesn't reject other schemes likefile://explicitly)url/cookiespath to be authenticated or removed entirely, since in practice every current caller goes throughslide_idWhere
backend/app.py:160-222