Summary
A high-severity server-side request forgery vulnerability affects the raw_sentry_api component of ddfourtwo sentry-selfhosted-mcp 0.4.0. A remote attacker may manipulate the endpoint argument to make the server issue requests to attacker-selected or otherwise unintended destinations.
Affected context
The issue occurs in deployments using the raw_sentry_api functionality of sentry-selfhosted-mcp 0.4.0. It becomes risky when externally influenced endpoint values are accepted by the server and used to initiate outbound requests without sufficiently restricting destination hosts, schemes, ports, or network locations.
Exploit preconditions
- Attack surface: The remotely reachable raw_sentry_api component
- Required access: Ability to send requests to the affected API; authentication requirements depend on deployment configuration
- Trigger point: Processing of the endpoint argument
- Why exploitation is possible: Server-side request handling may trust attacker-influenced destinations without adequate validation or network restrictions
Why this happens
The vulnerability is caused by insufficient validation and authorization of a user-controlled URL or endpoint before the application performs a server-side request.
This behavior maps to CWE-918: Server-Side Request Forgery, in which an application is induced to send requests on behalf of an attacker. The insecure pattern may allow access to internal services, loopback addresses, cloud metadata endpoints, or other destinations that are not intended to be reachable through the API.
Potential impact
- The server may make requests to internal or restricted network services
- Attackers could discover internal service information
- Sensitive metadata or response content could be exposed
- Internal administrative endpoints may be accessed if network controls permit
- The vulnerability could support follow-on compromise or lateral movement
General mitigation guidance
Mitigation generally focuses on reducing trust in endpoint input and limiting where server-side requests can go.
Common defensive patterns include:
- Allowlisting approved schemes, hostnames, ports, and destination paths
- Resolving and validating destinations before connecting, including protection against redirects and DNS rebinding
- Blocking loopback, link-local, private, and other restricted address ranges unless explicitly required
- Using a dedicated outbound request service with narrowly scoped network permissions
- Applying authentication and authorization controls to sensitive API operations
- Running the application with least-privilege network access and limiting access to metadata services
- Avoiding direct use of user-provided URLs when a fixed server-side resource identifier can be used instead
How teams detect issues like this
Detection approaches commonly include:
- Static analysis for HTTP client calls that consume request parameters without destination validation
- Code review checks for endpoint, URL, host, redirect, and proxy values derived from untrusted input
- Testing with blocked internal, loopback, link-local, and cloud metadata destinations
- Egress monitoring for unusual outbound requests from the MCP service
- Network policy enforcement that restricts application connectivity to approved destinations
- Logging request destinations, redirect chains, and denied outbound connection attempts without exposing sensitive data
Automated security review tools may help identify SSRF-prone data flows, but findings should be validated against deployment-specific network controls.

