Summary
A Server-Side Request Forgery (SSRF) vulnerability in Wallos allows attackers to abuse the logo/icon URL upload feature to make HTTP requests from the Wallos server to internal network resources.
Because redirects from initially validated URLs are automatically followed without re-checking the destination IP, an attacker can potentially reach private services, including cloud instance metadata endpoints, when they can control the logo URL.
Affected context
The vulnerability appears in Wallos deployments where users can supply external URLs for subscription or payment logos/icons.
The application performs an initial IP validation of the hostname in getLogoFromUrl(), rejecting hostnames that resolve to private or reserved IP ranges.
However, the subsequent cURL request is configured to follow HTTP redirects automatically, and the redirected targets are not subjected to the same IP range checks.
This creates exposure in environments where the Wallos server has network access to internal services or cloud metadata endpoints that are otherwise inaccessible from the public internet.
Exploit preconditions
- Attack surface: The logo/icon upload feature that accepts a URL pointing to an image for subscriptions or payments.
- Required access: Ability to interact with the Wallos web interface or API endpoint that triggers
getLogoFromUrl()(typically authenticated user access, depending on deployment configuration). - Trigger point: Supplying a crafted URL that initially passes hostname/IP validation but responds with one or more HTTP redirects to internal or sensitive endpoints.
- Why exploitation is possible:
- The application validates only the IP of the original hostname using
filter_varwithFILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE. - The cURL client is configured with
CURLOPT_FOLLOWLOCATION = trueandCURLOPT_MAXREDIRS = 3, so it follows up to three HTTP redirects. - Redirect targets are not re-validated, allowing the final request to reach private or reserved IP ranges if the server can route to them.
Why this happens
The core issue is an incomplete SSRF protection strategy that validates only the initial request destination while allowing transparent redirects to unvalidated locations.
In secure designs, any server-side HTTP client exposed to user-controlled URLs must ensure that:
- All effective targets (including redirects) respect the same network access policy, and
- Private, loopback, link-local, and metadata address ranges are consistently blocked.
Here, getLogoFromUrl() correctly checks the resolved IP for private/reserved ranges at the start, but the use of CURLOPT_FOLLOWLOCATION = true without reapplying those checks to each redirect path breaks the trust boundary.
This maps to CWE-918: Server-Side Request Forgery, where attackers induce the server to initiate network requests to internal or protected endpoints.
Potential impact
- Access to cloud instance metadata endpoints, which may expose:
- Temporary credentials or access tokens
- Instance identity documents
- Configuration data intended only for workloads
- Unauthorized interaction with internal HTTP services (e.g., admin panels, internal APIs, orchestration endpoints) reachable only from the Wallos server's network.
- Use of Wallos as a pivot point for internal network reconnaissance, including service discovery and banner grabbing.
- Possible data exfiltration from internal services that respond over HTTP/HTTPS to the forged requests.
- Augmented impact in environments where internal endpoints allow state-changing operations via simple HTTP calls from trusted internal clients.
General mitigation guidance
Effective mitigation focuses on hardening server-side HTTP requests that depend on user-controlled URLs and maintaining strict network boundaries:
- Apply uniform IP and host validation to all effective destinations of a request, including redirects and DNS rebinding scenarios.
- Disable automatic redirect following for user-supplied URLs, or implement a redirect handler that:
- Resolves each redirect target
- Re-validates the IP against a denylist or allowlist (blocking private, loopback, link-local, and metadata ranges by default)
- Enforce network egress controls at the infrastructure level (firewalls, security groups, service mesh policies) so application servers cannot access:
- Cloud metadata endpoints
- Internal management interfaces
- Sensitive control planes
- Limit the functionality of URL-based logo/icon fetching where possible:
- Prefer direct file uploads instead of fetching remote URLs
- Restrict URLs to a well-defined set of trusted domains or CDNs
- Implement least-privilege for the application runtime so that even if HTTP requests are abused, the process has minimal ability to interact with critical internal services.
How teams detect issues like this
Detection can combine code-level analysis with runtime monitoring:
- Static analysis and code review:
- Flag use of HTTP client options that follow redirects (
CURLOPT_FOLLOWLOCATION, equivalent flags in other libraries) when the initial URL is user-controlled. - Verify that every code path performing network calls with external URLs applies consistent IP/host validation, including on redirects.
- Look for absence of explicit checks against internal IP ranges (e.g., 127.0.0.0/8, 10.0.0.0/8, 169.254.169.254, 192.168.0.0/16, link-local and IPv6 local ranges).
- Runtime monitoring and logging:
- Log outbound requests from the application, including final destination IP and URL after redirects.
- Alert on requests from application servers to known sensitive endpoints such as cloud metadata IPs or internal admin services.
- Use network-level observability (firewall logs, egress proxies, service mesh) to detect unusual patterns of outbound traffic sourced from the Wallos host.
- Security testing:
- Incorporate SSRF test cases in regular application security assessments, focusing on features that accept URLs (e.g., logo fetching, webhooks, importers).
- Use automated scanners or custom test harnesses to probe for redirect-based SSRF behavior.

