Summary
A server-side request forgery (SSRF) vulnerability in Penpot's remote image import feature allows authenticated file editors to cause the backend to make HTTP requests to arbitrary URLs.
By controlling the image URL, an attacker can pivot the shared HTTP client toward internal-only endpoints, becoming risky wherever internal services are accessible over HTTP from the Penpot server.
Affected context
The vulnerability occurs in Penpot deployments where the remote image import functionality is enabled and the backend HTTP client can reach internal network endpoints.
It manifests when user-supplied URLs from the frontend are forwarded to the backend RPC layer without sufficient destination validation or filtering.
Risk increases in environments where the Penpot server shares a network with sensitive services (e.g., admin APIs, metadata endpoints, or internal HTTP applications).
Exploit preconditions
- Attack surface: Remote image import feature exposed to authenticated users with file editor permissions.
- Required access: Valid authenticated session and ability to edit a file or workspace that permits importing remote images.
- Trigger point: Supplying a crafted URL to the image import flow, which is forwarded to
:create-file-media-object-from-urland then tomedia/download-image. - Why exploitation is possible: The shared HTTP client performs outbound requests without destination filtering or network segmentation, enabling user-controlled URLs to target internal-only HTTP endpoints.
Why this happens
This issue stems from trusting a user-controlled URL when performing backend HTTP requests, a classic CWE-918: Server-Side Request Forgery pattern.
The remote image import workflow propagates the URL from the frontend into backend RPC code, where a shared HTTP client fetches the resource without validating whether the destination is external, safe, or allowed.
Conceptually, the bug class is an "unrestricted backend fetch" of attacker-specified URLs, allowing the server to act as an unwilling proxy to internal infrastructure or cloud metadata services.
Potential impact
- An attacker may reach internal-only HTTP services that are not directly exposed to the internet.
- Attackers could enumerate or access sensitive information from admin APIs or internal dashboards reachable from the Penpot server.
- The vulnerability can allow probing of network topology or internal hosts through timing and error responses.
- Under certain configurations, attackers could access cloud instance metadata or service credentials exposed via HTTP.
- The issue may facilitate further lateral movement if internal endpoints accept requests from the application server.
General mitigation guidance
Mitigation focuses on constraining where the backend can send HTTP requests and reducing trust in user-provided URLs.
Recommended design patterns include:
- Implement strict allowlists or blocklists for outbound destinations on remote fetch functionality.
- Enforce URL validation that rejects private IP ranges, loopback addresses, link-local ranges, and internal hostnames.
- Separate HTTP clients or outbound routes so that user-driven fetches cannot reach sensitive services.
- Apply network-level egress controls and segmentation, ensuring application servers cannot directly contact high-value internal APIs.
- Log and monitor remote fetch operations and failures to detect anomalous internal probing behavior.
How teams detect issues like this
High-level detection approaches include:
- Static analysis or manual code review to identify patterns where user-supplied URLs are used in backend HTTP clients without destination filtering.
- Searching for functions that accept arbitrary URLs and feed them to shared HTTP client utilities, particularly in media or import workflows.
- Policy enforcement that requires URL normalization and checks against reserved IP ranges or internal hostnames before any server-side fetch.
- Runtime monitoring of outbound HTTP requests from the application, flagging requests to internal IP ranges or unexpected hosts initiated by user actions.
- Integration of automated security review tools that highlight HTTP client usage driven by untrusted input.

