Summary
Vane versions up to 1.12.1 contain a server-side request forgery (SSRF) issue in the Model Provider API, where the baseURL argument is insufficiently validated.
An attacker who can influence the baseURL parameter may coerce the server into making arbitrary outbound HTTP requests, including to internal or protected services, leading to data exposure or pivoting inside the infrastructure.
Affected context
This vulnerability arises in the Model Provider API implementation, specifically within src/app/api/providers/route.ts, where outbound HTTP requests are constructed using a caller-controlled baseURL.
It typically manifests in deployments where:
- The API accepts or propagates a user-supplied URL or endpoint configuration
- The server has network connectivity to internal services, metadata endpoints, or other sensitive resources
- There is no robust allowlist, URL normalization, or host restriction applied before making outbound requests
Exploit preconditions
- Attack surface: Publicly or internally exposed Model Provider API endpoint(s) that accept a
baseURLor similar URL parameter. - Required access: Ability to send HTTP requests to the API (e.g., network access to the service; authentication requirements depend on deployment configuration).
- Trigger point: Supplying a crafted
baseURLthat points to attacker-chosen targets (such as internal IPs, loopback interfaces, or cloud metadata services). - Why exploitation is possible: The server constructs outbound requests using untrusted input without sufficient validation, normalization, or restriction, allowing attackers to redirect server-initiated traffic.
Why this happens
The root cause aligns with CWE-918: Server-Side Request Forgery (SSRF).
The Model Provider API appears to trust the baseURL parameter when building outbound HTTP requests, treating it as a benign configuration value instead of untrusted input.
Without enforcing strict host allowlists, prohibiting access to internal address ranges, or normalizing and revalidating URLs after redirects, the code enables attackers to route server-originated requests to arbitrary destinations.
This design pattern—where server-side HTTP clients directly consume user-controlled URLs—creates a classic SSRF condition.
Potential impact
- Unauthorized access to internal HTTP services that are not directly exposed to the internet
- Discovery of internal network structure or service endpoints through response analysis
- Access to cloud provider metadata services, which may leak credentials or tokens
- Use of the server as a pivot point for further attacks within the internal network
- Potential interaction with other internal APIs leading to data exfiltration or configuration tampering
General mitigation guidance
Effective mitigation focuses on treating any URL or host-related input as untrusted and strictly constraining where the server can connect.
Common defensive patterns include:
- Enforcing a strict allowlist of permitted domains or hosts for outbound requests and rejecting any URL that does not match.
- Normalizing and parsing URLs server-side, then validating the scheme, host, and port against approved values before initiating a connection.
- Blocking or rejecting requests to private, loopback, link-local, and metadata IP ranges (e.g., 127.0.0.0/8, 10.0.0.0/8, 169.254.169.254).
- Decoupling user input from direct network destinations by mapping user selections to preconfigured, server-side endpoints instead of raw URLs.
- Applying least-privilege networking controls (such as egress firewalls and network policies) so application servers cannot freely reach sensitive internal services.
- Logging outbound requests and applying rate limits or anomaly detection to identify unusual connection patterns.
How teams detect issues like this
Detecting SSRF risk and exploitation often involves both code-centric and operational approaches:
- Static analysis and code review:
- Search for HTTP client usage (e.g., fetch, axios, request libraries) where URL components derive from request parameters, headers, or body fields.
- Flag any path where
baseURL,endpoint, or similar variables are influenced by user input without host-based allowlists or IP range checks. - Review route handlers in
src/app/api/providers/route.tsand related modules for direct pass-through of user-controlled URLs.
- Policy and configuration checks:
- Enforce linting or policy rules in CI/CD to prevent new code paths that build outbound requests from raw user input.
- Ensure infrastructure-level egress controls restrict access to internal administration services and metadata endpoints.
- Runtime monitoring:
- Monitor outbound HTTP traffic from the application for connections to unusual internal IPs or unexpected domains.
- Correlate spikes in outbound requests or connections to sensitive endpoints with API request logs to identify potential SSRF attempts.
Automated code review and security scanning tools can be configured to highlight SSRF-prone patterns and enforce URL validation best practices.

