Summary
Ghostfolio's manual asset import feature can be abused to make the server issue arbitrary outbound HTTP requests on behalf of an attacker.
When an attacker controls the target of these server-side requests, they can read responses from internal services or cloud metadata endpoints, leading to sensitive data exfiltration and internal network probing.
Affected context
The vulnerability exists in Ghostfolio instances that expose the manual asset import feature and allow user-supplied URLs or remote resources to be fetched by the backend.
It primarily affects deployments where Ghostfolio runs in environments with access to:
- Internal network services not otherwise exposed to users
- Cloud provider Instance Metadata Service (IMDS) endpoints
The risk increases when Ghostfolio is deployed in production with broad egress connectivity or without strict network egress controls.
Exploit preconditions
- Attack surface: HTTP(S) endpoint used for the manual asset import feature.
- Required access: Ability to authenticate or otherwise invoke manual asset import requests that cause the server to fetch remote resources.
- Trigger point: Submission of crafted import input that controls the destination URL or host used by the server-side HTTP client.
- Why exploitation is possible: The backend trusts user-controlled URLs and performs server-side HTTP requests without adequate validation, allowlisting, or network-level restrictions on reachable destinations.
Why this happens
This vulnerability is a classic case of Server-Side Request Forgery (CWE-918).
The backend component responsible for manual asset import accepts attacker-influenced input (such as URLs or source locations) and uses it directly in outbound HTTP requests.
Because the server resides inside a privileged network boundary, these requests can reach internal addresses or metadata endpoints that are not directly accessible to the attacker.
Lack of strict validation, allowlisted domains, and network segmentation around the Ghostfolio instance enables the attacker to leverage the application as a proxy to read internal responses.
Potential impact
- Exfiltration of cloud instance metadata (IMDS), including temporary credentials or tokens, where available.
- Discovery and probing of internal network services (e.g., databases, admin panels, APIs) from the Ghostfolio host's perspective.
- Potential pivot to further compromise infrastructure if sensitive credentials or internal service details are exposed.
- Increased attack surface for subsequent exploits, such as targeting internal services with known vulnerabilities.
General mitigation guidance
Effective mitigation focuses on treating outbound requests as sensitive and strictly constraining where they can go.
Common defensive patterns include:
- Implementing strict allowlists for outbound HTTP(S) destinations used by manual asset import, limiting requests to known, trusted domains.
- Blocking access to link-local and metadata IP ranges (e.g., 169.254.169.254) and internal address ranges (RFC1918, internal hostnames) at the application or HTTP client level.
- Enforcing URL validation and normalization, rejecting requests with ambiguous schemes, IP literals, or redirects to non-allowed targets.
- Applying least-privilege network controls (e.g., egress firewalls, security groups) so the Ghostfolio server cannot directly reach sensitive internal services or metadata endpoints.
- Designing import workflows to rely on pre-curated data sources instead of arbitrary user-specified URLs whenever possible.
How teams detect issues like this
Detection strategies generally focus on identifying suspicious outbound request patterns and insecure URL handling in code:
- Static analysis & code review:
- Flag functions where user input flows into HTTP client calls (e.g., fetch, axios, request, http.get) without validation.
- Look for missing allowlist checks, IP range filters, or hostname verification in request-building logic.
- Review manual import and integration code paths for direct use of user-supplied URLs.
- Runtime monitoring & logging:
- Log outbound HTTP requests from the application, including destination host, IP, and path, and alert on requests to internal or non-standard ranges.
- Monitor for access attempts to metadata endpoints and other sensitive internal addresses.
- Policy & tooling:
- Use automated code scanning tools with SSRF-specific rules to continuously analyze changes.
- Enforce security gates in CI/CD to prevent merging code that introduces unvalidated outbound requests.

