Summary
A server-side request forgery (SSRF) vulnerability in Postiz's /public/v1/upload-from-url endpoint allows authenticated users to make the server fetch arbitrary URLs using axios without proper network restrictions.
By supplying attacker-controlled URLs, an authenticated API user can coerce the backend to access internal network services, instance metadata endpoints, and other non-public resources, with the fetched data ultimately returned to the attacker.
Affected context
The vulnerability occurs in the Postiz API endpoint POST /public/v1/upload-from-url, which is designed to fetch image content from a user-specified URL and upload it to storage.
Any deployment where this endpoint is exposed to authenticated users and the backend server has network access to internal services or cloud metadata endpoints is affected.
The only validation performed is a superficial file extension check on the URL (e.g., requiring .png, .jpg), which does not meaningfully restrict the target of the outbound HTTP request.
Exploit preconditions
- Attack surface: HTTP API endpoint
POST /public/v1/upload-from-url - Required access: Valid authenticated API user capable of invoking the upload-from-url functionality
- Trigger point: Submission of a crafted URL parameter that points to internal or non-public network resources
- Why exploitation is possible:
- The backend uses
axios.get()to fetch arbitrary URLs provided by the client. - There are no SSRF defenses such as allow-lists, block-lists for internal IP ranges, metadata endpoint blocking, or DNS/rewrite protections.
- URL validation is limited to checking the path's file extension, which can be trivially bypassed by appending an image-like suffix to any URL.
Why this happens
This vulnerability stems from treating user-supplied URLs as trustworthy targets for server-side HTTP requests without constraining where the server is allowed to connect.
The backend implementation calls axios.get() directly with the user-provided URL and only inspects its apparent file extension, which is not a reliable security control because the extension does not affect the actual destination or response.
Conceptually, this maps to CWE-918: Server-Side Request Forgery (SSRF), where an attacker abuses server-side HTTP capabilities to pivot into internal networks or privileged endpoints that are not otherwise reachable from the attacker's network position.
Potential impact
- Unauthorized retrieval of internal service responses (e.g., internal APIs, admin panels exposed only on private networks)
- Access to cloud instance metadata endpoints, which can expose credentials, tokens, and configuration data
- Discovery and enumeration of internal network topology and services
- Potential use of the server as a proxy to bypass network-based access controls
- Facilitation of further attacks such as credential theft, lateral movement, or privilege escalation in the hosting environment
General mitigation guidance
Effective mitigation focuses on constraining where server-side HTTP clients are allowed to connect and reducing trust in user-supplied URLs.
Common defensive patterns include:
- Implementing strict allow-lists for outbound URL targets (e.g., only specific domains or storage providers).
- Blocking requests to private IP ranges, localhost, and link-local addresses (including cloud metadata IPs).
- Normalizing and parsing URLs server-side to enforce schemes (e.g., HTTPS only) and disallow redirects to internal resources.
- Using application-layer proxies or egress filters that enforce network policies independent of application logic.
- Applying least-privilege principles to the runtime environment so that application servers have minimal access to internal services and metadata endpoints.
- Treating "upload from URL" as inherently high risk and, where possible, offloading the fetch to a hardened, isolated service.
How teams detect issues like this
Organizations can detect and monitor similar SSRF issues using several complementary approaches:
- Static analysis: Search for code paths that pass user-controlled URL parameters into HTTP client functions (e.g., axios, fetch, request) without domain or IP validation.
- Code review: Flag any "URL fetch" or "proxy" functionality where the target address is derived from client input; verify that outbound requests are restricted by policy, not just by file extension or basic regex checks.
- Runtime monitoring: Inspect HTTP logs and network telemetry for unusual outbound requests from application servers to internal IP ranges or metadata endpoints.
- Security testing: Incorporate SSRF test cases into API security testing, focusing on endpoints that accept URLs or perform server-side fetches.
- Policy enforcement: Use egress firewalls, service meshes, or cloud network policies to prevent application nodes from reaching sensitive infrastructure (e.g., metadata services, database management interfaces).

