Summary
LinkAce's link creation flow performs server-side HTTP requests to fetch HTML metadata from user-supplied URLs without enforcing private IP restrictions.
Because the NoPrivateIpRule is not applied to POST /links, an attacker can abuse this behavior to make the server issue requests to internal services, Docker hostnames, or cloud metadata endpoints.
Affected context
This vulnerability appears in LinkAce deployments where users can create links via the primary link creation endpoint (POST /links).
During link creation, the backend calls HtmlMeta::getFromUrl() to fetch metadata from the supplied URL.
In this path, the LinkStoreRequest validation does not apply the existing NoPrivateIpRule, so URLs pointing to private IP ranges, internal Docker hostnames, or cloud metadata services are not blocked.
The FetchController path does use this rule, but it does not protect the main link creation workflow, leaving a gap where SSRF can occur.
Exploit preconditions
- Attack surface: HTTP API endpoint
POST /linksexposed to users (typically authenticated, depending on deployment). - Required access: Ability to submit or influence link creation requests with arbitrary URLs.
- Trigger point: The server-side metadata fetch performed by
HtmlMeta::getFromUrl()during link creation. - Why exploitation is possible: The validation rules for
LinkStoreRequestdo not enforceNoPrivateIpRule, so the application accepts URLs that resolve to internal or sensitive network locations, and the server then issues outbound HTTP requests to those addresses on behalf of the attacker.
Why this happens
The core issue is a missing application of a network boundary validation rule on user-supplied URLs in one of the main data flows.
The codebase already contains a NoPrivateIpRule that checks and blocks requests to private or internal IP ranges, but this rule is only enforced in FetchController and not in the LinkStoreRequest used by LinkRepository::create().
This gap leads to CWE-918: Server-Side Request Forgery (SSRF), where an attacker-controlled URL is used as input to a server-side HTTP client, allowing the attacker to pivot the application into making arbitrary network requests and bypassing external network boundaries.
Potential impact
- Access to internal web services that are not directly reachable from the internet
- Interaction with Docker-internal service hostnames or cluster-only endpoints
- Retrieval of sensitive data from cloud provider metadata services (e.g., IAM credentials, instance data)
- Network reconnaissance of internal IP ranges by observing timing and error behavior
- Potential chaining with other weaknesses on internal services (e.g., exploiting admin-only panels exposed only on the local network)
General mitigation guidance
Mitigation generally involves tightening URL handling and enforcing strict network egress policies for server-side HTTP requests.
Useful defensive patterns include:
- Applying a consistent URL validation rule (such as
NoPrivateIpRule) to all inputs that are used as targets for server-side HTTP requests, including link creation forms and any auxiliary fetch endpoints. - Normalizing and resolving hostnames before validation so that DNS-based bypasses (e.g., internal hosts resolving from public-looking names) are detected.
- Maintaining a default-deny outbound network posture from application containers, allowing only necessary external destinations and blocking internal ranges and metadata endpoints by network policy or firewall rules.
- Using allowlists for acceptable domains or schemes where feasible, especially for metadata fetching functionalities.
- Separating metadata-fetching components into isolated, low-privilege services with constrained network access.
How teams detect issues like this
Organizations can identify and monitor this class of issue using several approaches:
- Static analysis and code review: Search for HTTP client usage (e.g., Guzzle, cURL wrappers,
HtmlMeta::getFromUrl()) that consume user-controlled URLs without passing through URL/IP validation components likeNoPrivateIpRule. - Configuration and policy checks: Enforce coding standards that require all external URL inputs to be validated with a shared rule or validator class before use.
- Dynamic and black-box testing: Use SSRF-focused security tests to supply internal IPs,
localhostvariants, and cloud metadata endpoints as URLs to link creation APIs and observe the responses and timing. - Runtime monitoring: Log outbound HTTP requests from the application and detect anomalies such as requests to RFC1918 address ranges, link-local addresses, or known metadata IPs (e.g., 169.254.169.254).

