/proxy is an open, unauthenticated SSRF-capable server-side fetcher #2
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#2
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>&cookies=<any-cookie-header>(backend/app.py) fetches an arbitrary caller-supplied URL server-side withhttpx, no allowlist/scheme restriction, and echoes the (lightly rewritten) response back to the caller — with whatevercookiesstring the caller supplies forwarded as a rawCookie:header.There is currently no authentication anywhere on the admin UI or API (see separate issue), and the backend listens on
0.0.0.0:80/443/8080— reachable by anyone on the hackerspace LAN/WiFi.Impact
Combined, this means any device on the LAN can use the Pi as an open server-side HTTP proxy:
cookiesparam (e.g. exfiltrate a cookie value to a third party by pointingurlat an attacker-controlled endpoint).Suggested fix
/proxyto an allowlist of hostnames actually configured in existing slides (or require it to be invoked only with aslide_id, looking up the URL/cookies server-side from stored config rather than accepting them as free-form request params)./admin,/proxy, and the mutating/admin/*POST routes (see separate issue).By design: /proxy fetching arbitrary public URLs is the intended behavior (embedding whatever content people want). Leaving it fully open per explicit decision — no IP-range restrictions added.