Summary
A server-side request forgery vulnerability in the Deno backend of NonceGeek dim-sum-app allows a remote attacker to influence the supabase_url argument used by textSearchV2Handler.
Under deployment conditions where this value is accepted without strict validation, the server may be induced to send requests to attacker-selected or internal destinations.
Affected context
The vulnerability occurs in the Deno Backend component, specifically the textSearchV2Handler function in deno/main.tsx. It becomes risky when the handler accepts a remotely influenced supabase_url value and uses it to make outbound requests without sufficiently restricting destination schemes, hosts, ports, or network ranges.
Exploit preconditions
- Attack surface: A remotely reachable request-handling endpoint exposed by the Deno backend
- Required access: The ability to submit or influence input accepted by
textSearchV2Handler - Trigger point: Processing of the
supabase_urlargument during server-side request construction - Why exploitation is possible: Destination validation may permit attacker-controlled URLs, allowing the backend to originate requests beyond the intended external service boundary
Why this happens
The underlying bug is insufficient validation and trust-boundary enforcement for a user-influenced URL. When server-side code treats a supplied URL as an authoritative destination, an attacker may redirect backend requests to unintended hosts or network locations.
This behavior maps to CWE-918: Server-Side Request Forgery, in which an application makes outbound requests based on attacker-controlled addressing information.
Potential impact
- The attacker may access services reachable from the application network
- Internal administrative or metadata endpoints could be exposed
- The application could send authenticated requests to unintended destinations
- Network segmentation boundaries may be weakened
- Sensitive response data could be disclosed through the vulnerable endpoint
- Availability may be affected if the server is directed to unsuitable or slow destinations
General mitigation guidance
Mitigation generally focuses on reducing trust in client-supplied destinations and enforcing an explicit outbound request policy.
Common defensive patterns include:
- Allowlisting approved schemes, hosts, ports, and path patterns
- Resolving and validating destinations before connecting, including protection against redirects and DNS-based bypasses
- Rejecting loopback, link-local, private, reserved, and other non-public network ranges unless explicitly required
- Using a fixed server-side service configuration instead of accepting arbitrary URLs from requests
- Applying outbound network egress controls and least-privilege service permissions
- Limiting response handling, request timeouts, and connection targets
- Avoiding unnecessary credentials on outbound requests
How teams detect issues like this
Organizations commonly detect SSRF risks through:
- Static analysis rules for HTTP clients that consume request parameters as URLs
- Code review checks for URL construction, redirect handling, DNS resolution, and IP-range validation
- Tests covering localhost, private-network, link-local, metadata-service, alternate-scheme, and redirect destinations
- Runtime egress monitoring for unexpected internal targets or unusual outbound hosts
- Network policies that restrict backend workloads to approved destinations
- Automated security review tools that identify attacker-controlled data reaching outbound request APIs

