fix(security): apply _is_ssrf_host() guard to wizard test endpoint orch_url and ollama_host #133
Labels
No labels
a11y
backlog
beta-feedback
bug
enhancement
feature-request
frontend
good first issue
needs-triage
question
status:blocked
status:in-progress
status:review
vue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/peregrine#133
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?
Issue
The
/api/wizard/testendpoint acceptsorch_urlandollama_hostfrom user input and makes outbound HTTP requests without applying the_is_ssrf_host()SSRF guard that already exists in dev-api.py.Affected code
dev-api.py— wizard test endpoint:payload.orch_url→ passed to_container_safe_url()but not_is_ssrf_host()checkpayload.ollama_host→ used directly without SSRF validationrequests.get()calls use defaultallow_redirects=Truewhich allows 302 redirect to internal addresses (e.g.169.254.169.254)Fix
orch_urlandollama_hostwithurllib.parse.urlparse(...).hostname_is_ssrf_host(hostname)returns True (same guard used bytest_email)allow_redirects=Falseto bothrequests.get()callsSeverity
Medium — requires authenticated wizard access; partially mitigated by
_container_safe_url()but redirect bypass is real.