SSRF protection — no IP range blocking on remote dereference #4
Reference in New Issue
Block a user
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?
When dereferencing remote object or actor URLs, there is no validation that the resolved IP is not in a private/reserved range (127.0.0.0/8, 10.0.0.0/8, 169.254.0.0/16, fc00::/7, etc.).
A malicious actor could craft an actor URL pointing at internal services, causing the server to make requests to the local network.
Suggested fix: resolve the hostname before connecting and reject private/loopback/link-local IP ranges. Consider a configurable allowlist for legitimate internal federation scenarios.