Summary
Soft Serve's Git LFS import functionality allows an authenticated SSH user to coerce the server into making HTTP requests to internal or private IP addresses via a crafted --lfs-endpoint URL.
By hosting a fake LFS server and returning controlled download URLs, an attacker can pivot this behavior into full read access to internal HTTP services that are reachable from the Soft Serve host.
Affected context
This vulnerability affects deployments of Soft Serve (versions 0.6.0 to before 0.11.4) that:
- Expose SSH access to users who can run the
repo importcommand - Run in environments where the Soft Serve server can reach internal or private HTTP services (e.g., cloud metadata endpoints, internal APIs, admin panels)
- Allow user-controlled Git LFS endpoints to be configured or passed via the
--lfs-endpointparameter
The risk is higher when Soft Serve runs in a flat internal network or has outbound access to sensitive HTTP-based services that are not otherwise directly exposed.
Exploit preconditions
- Attack surface: SSH interface to the Soft Serve Git server, specifically the
repo importfunctionality with Git LFS support. - Required access: Valid authenticated SSH account on the Soft Serve instance, with permission to invoke
repo import. - Trigger point: Supplying a crafted
--lfs-endpointURL that points to an attacker-controlled server, which then returns download URLs targeting internal/private IPs. - Why exploitation is possible: The server implicitly trusts the LFS endpoint and follows download URLs returned by that endpoint, using its own network context, without enforcing strict allowlists, URL validation, or network egress controls to distinguish internal from external destinations.
Why this happens
The root cause lies in how Soft Serve handles user-specified Git LFS endpoints and the subsequent download URLs returned by those endpoints.
The application treats the --lfs-endpoint value and the LFS server's responses as trustworthy, and it uses them to perform outbound HTTP requests from the server's own network environment.
This aligns with CWE-918: Server-Side Request Forgery (SSRF), where an attacker can cause a server to initiate HTTP requests to arbitrary locations, including internal services, because:
- User-controlled URLs are accepted with minimal validation.
- There is no robust separation between internal and external network targets.
- Request logic is designed under the assumption that LFS endpoints are benign and under administrative control.
Potential impact
- Read access to internal HTTP services and APIs that are not directly exposed to the attacker
- Access to cloud instance metadata endpoints, potentially leaking credentials, tokens, or configuration
- Discovery and mapping of internal network hosts and services (basic internal reconnaissance)
- Retrieval of sensitive configuration, health, or debug endpoints from internal systems
- Potential escalation into other applications via exposed admin panels or misconfigured services reachable over HTTP
General mitigation guidance
Effective mitigation focuses on constraining where the server can connect and reducing trust in user-provided URLs:
- Limit or restrict user control over remote endpoints (e.g., disallow or tightly validate arbitrary
--lfs-endpointvalues). - Implement strict URL validation and normalization, including:
- Rejecting private, loopback, link-local, and link-local metadata IP ranges.
- Blocking non-HTTP(S) schemes and suspicious hostnames.
- Use network-layer egress controls (firewalls, security groups, outbound proxies) so the Soft Serve host cannot directly reach sensitive internal services or metadata endpoints.
- Apply a default-deny outbound policy and maintain an explicit allowlist of permitted external LFS domains.
- Run the Soft Serve process under least-privilege network and system permissions, minimizing its reach to only what is required.
- Isolate the Git server in a segmented network zone that has no direct path to critical internal services.
How teams detect issues like this
Detection typically combines network monitoring with code and configuration review:
- Static/code review:
- Identify code paths where user-supplied URLs (e.g.,
--lfs-endpoint) are used directly in HTTP clients. - Flag usages of generic HTTP clients that accept arbitrary hosts without allowlist or IP-range checks.
- Look for missing checks around internal IP ranges, loopback addresses, or host header validation.
- Configuration and policy checks:
- Review network firewall and security group settings to ensure Git servers do not have unnecessary outbound access.
- Enforce CI/CD policies that prevent introduction of new code paths that make unvalidated network calls based on user input.
- Runtime monitoring:
- Monitor outbound HTTP traffic from the Soft Serve host for requests to unusual or internal-looking destinations.
- Use network IDS/IPS or proxy logs to detect patterns where Git servers contact cloud metadata endpoints or reserved IP ranges.
- Automated security scanning tools can assist by flagging SSRF patterns in code and misconfigured network egress policies.

