Summary
A critical server-side request forgery vulnerability in SeaweedFS allows an unauthenticated caller who can reach a volume server's gRPC port to make the server request attacker-selected endpoints and return their responses. This may expose cloud metadata, IAM credentials, loopback services, private-network applications, and other resources that are not directly reachable by the attacker.
Affected context
The vulnerability occurs in the SeaweedFS volume server's remote needle-fetching RPC when the gRPC service is reachable and does not enforce authentication or destination validation. It is especially risky in deployments where volume servers can access cloud metadata services, private network resources, or other privileged internal endpoints.
Exploit preconditions
- Attack surface: The volume server's gRPC port and the
VolumeServer.FetchAndWriteNeedleRPC - Required access: Network reachability to the volume server; the RPC is unauthenticated by default
- Trigger point: A request that causes the server to fetch data from a caller-supplied remote endpoint
- Why exploitation is possible: The server performs outbound requests without validating the destination or restricting access to loopback, link-local, private, or cloud metadata addresses
- Additional consideration: Documented JWT signing-key configuration does not protect this RPC
Why this happens
The underlying bug is an unchecked server-side outbound request based on caller-controlled endpoint data. The volume server uses the supplied destination to retrieve content and writes the response into a needle without establishing a trusted target policy or requiring authorization. This behavior maps to CWE-918: Server-Side Request Forgery, because an attacker can induce a server with broader network access to communicate with unintended hosts and disclose the resulting responses.
Potential impact
- An attacker may read cloud instance metadata and temporary IAM credentials
- An attacker could access loopback and RFC 1918 services that are not externally exposed
- Sensitive internal service responses may be disclosed
- The vulnerability can enable follow-on access to cloud or internal infrastructure
- Retrieved content could be written into storage and may support data tampering or poisoning
General mitigation guidance
Mitigation generally focuses on making outbound request behavior explicitly authorized and secure by default.
Common defensive patterns include:
- Require authentication and authorization for every remote-fetch RPC
- Validate and canonicalize destination addresses before making requests
- Deny loopback, link-local, RFC 1918, reserved, and cloud metadata ranges unless explicitly required
- Prefer allowlisted schemes, hosts, ports, and network destinations over caller-selected targets
- Apply egress network policies and firewall controls to volume servers
- Use cloud metadata protections and minimize instance or workload permissions
- Keep fetched data and request targets within narrowly defined trust boundaries
- Run volume servers with only the network and storage privileges they require
How teams detect issues like this
Organizations can look for SSRF exposure through:
- Static analysis rules identifying outbound HTTP, S3, or remote-storage requests that consume RPC or API input
- Code review checks for missing authentication, destination validation, DNS-rebinding resistance, and private-address filtering
- Configuration and policy checks confirming that volume-server gRPC endpoints are not broadly exposed
- Network telemetry showing volume servers making unexpected requests to metadata services, loopback addresses, private ranges, or unusual external hosts
- Egress firewall and service-mesh policies that alert on or block unauthorized destinations
- Automated security review tools that flag caller-controlled URL construction and unrestricted server-side fetch operations

