Summary
The Kan project management tool exposes an unauthenticated attachment download endpoint that forwards a user-controlled URL directly to the server-side fetch() function and returns the full response body.
An attacker can abuse this behavior to perform Server-Side Request Forgery (SSRF), leveraging the Kan server to access internal services, cloud metadata endpoints, or other private network resources that are not directly exposed to the internet.
Affected context
This vulnerability affects Kan deployments running versions 0.5.4 and below where:
- The
/api/download/attatchmentendpoint is reachable from untrusted networks - No additional authentication or access control is enforced in front of the endpoint
- The application server has network visibility into internal services, cloud provider metadata endpoints, or other non-public HTTP resources
The risk is higher in environments where the Kan server is deployed inside a trusted network segment or has broad outbound network access.
Exploit preconditions
- Attack surface: HTTP(S) endpoint
/api/download/attatchment, exposed over the network. - Required access: None; the endpoint is accessible without authentication.
- Attacker control: Ability to supply an arbitrary
url(or equivalent) query parameter to the endpoint. - Trigger point: The server-side code passes the attacker-supplied URL directly to
fetch()and returns the response body. - Why exploitation is possible: There is no URL validation, allowlist, or network egress restriction, so the server will issue requests to attacker-chosen targets, including internal IPs or metadata services.
Why this happens
The root cause is a lack of validation and trust boundary enforcement on server-initiated HTTP requests, aligning with CWE-918: Server-Side Request Forgery (SSRF).
The design of the attachment download feature allows client input (the URL parameter) to directly control where the server issues outbound HTTP requests.
Without authentication on the endpoint or constraints on permissible destinations (e.g., restricting to trusted domains or enforcing allowlists), attackers can coerce the server into acting as an HTTP proxy for arbitrary targets, including internal or cloud-only endpoints that should not be internet-accessible.
Potential impact
- Unauthorized access to internal web applications and HTTP APIs not exposed publicly
- Access to cloud provider metadata services, potentially leaking credentials or access tokens
- Discovery and enumeration of internal network hosts and services via response differences
- Use of the Kan server as a pivot point for further attacks into the internal network
- Potential interaction with management interfaces, debugging endpoints, or admin panels restricted to the internal network
General mitigation guidance
Mitigation generally focuses on reducing trust in user-controlled URLs and limiting where the server can connect:
- Introduce authentication and authorization checks on download-related endpoints so only legitimate users can trigger server-side fetches.
- Implement strict URL validation with allowlists of trusted domains or paths, and reject or sanitize user-supplied URLs that do not match expected patterns.
- Explicitly block requests to private IP ranges, localhost, link-local addresses, and cloud metadata IPs (e.g., 169.254.169.254), using both application-level checks and network-level controls.
- Prefer design patterns where the client downloads attachments directly from known, trusted storage origins (e.g., signed URLs to object storage) rather than through a dynamic server-side proxy.
- Restrict outbound network access from the application server using firewall rules, security groups, or service meshes so that only required destinations are reachable.
How teams detect issues like this
Effective detection typically combines code-level review and runtime monitoring:
- Use static analysis or code search to identify patterns where user input is passed into HTTP client APIs (
fetch,axios,http.request, etc.) without sufficient validation, especially on unauthenticated endpoints. - During code review, flag endpoints that proxy arbitrary URLs, lack domain allowlists, or omit checks against private address ranges and metadata IPs.
- Configure web application firewalls (WAF) or API gateways to log and alert on suspicious outbound requests initiated by the application, such as calls to internal IP ranges or metadata endpoints.
- Monitor server logs for unusual usage of the
/api/download/attatchmentendpoint, including high request volume, diverse target hosts, or attempts to reach private or link-local addresses. - Incorporate SSRF checks into security testing (DAST/SAST) pipelines to automatically surface endpoints that behave like open HTTP proxies.

