/

CVE-2026-50143

Severity:

HIGH RISK

(8.1)

SSRF (CWE-918) in Apify MCP Server URL Origin Validation

CVE-2026-50143

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Credential Disclosure and Unauthorized API Access

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A server-side request forgery vulnerability in the Apify MCP server allows a malicious Actor publisher to influence the destination used for MCP connections. When a victim invokes or inspects the malicious Actor, the server may send the victim's Apify API bearer token to a third-party host, potentially exposing account data and enabling unauthorized use of billable resources.

Affected context

The issue occurs in Apify MCP server deployments that construct an Actor MCP endpoint by combining a trusted standby URL with an Actor-provided path. Risk exists when the resulting URL is not validated to ensure it remains within the expected origin and when MCP client transports attach the victim's Authorization bearer token to the request. The affected flows include Actor invocation, Actor detail retrieval, and Actor MCP tool loading.

Exploit preconditions

  • Attack surface: Apify MCP server URL construction and outbound MCP client connections
  • Required access: The attacker must be able to publish or control an Actor definition; the victim must have an authenticated Apify session
  • Trigger point: The victim invokes or inspects the attacker-controlled Actor, causing an MCP client connection
  • Why exploitation is possible: An attacker-controlled URL component can alter the effective destination while the client continues to attach the victim's bearer token

Why this happens

The vulnerability results from constructing an outbound URL with attacker-controlled data without validating the final URL's origin and authority boundaries. URL parsing rules can interpret specially structured authority components in ways that redirect a request away from the trusted Apify host. Because the resulting URL is used by a client transport that forwards authentication headers, untrusted endpoint selection becomes a credential-forwarding SSRF condition. This maps to CWE-918: Server-Side Request Forgery.

Potential impact

  • A third-party host could receive the victim's Apify API token
  • An attacker could access Actors or stored data available to the compromised token
  • Unauthorized API operations could be performed on the victim's behalf
  • Billable compute or other account resources could be consumed
  • The affected account or connected workflows could be exposed to further compromise

General mitigation guidance

Mitigation typically focuses on validating outbound destinations before authentication material is attached.

Common defensive patterns include:

  • Parse and validate the complete URL after all components have been combined
  • Enforce an explicit allowed-origin or allowed-host policy for Actor MCP endpoints
  • Reject ambiguous authority, userinfo, scheme, port, and redirect-related URL forms
  • Avoid forwarding bearer tokens to destinations that are not explicitly trusted
  • Use narrowly scoped tokens with least-privilege permissions and limited lifetime
  • Treat Actor-published endpoint metadata as untrusted input
  • Apply network egress controls that restrict MCP server connections to approved destinations

How teams detect issues like this

Organizations commonly detect this class of issue through:

  • Static analysis rules for URL construction from untrusted fields
  • Code review checks for outbound requests that combine trusted URLs with attacker-controlled components
  • Tests covering origin changes, authority parsing, redirects, ports, and credential-header behavior
  • Runtime logging of normalized outbound destinations without recording bearer tokens
  • Egress policies and monitoring for connections to unexpected external hosts
  • Automated security review tools that flag SSRF patterns and authentication-header forwarding

Sources

SourceLink
github.comgithub.com/apify/apify-mcp-server/commit/ef686d77da3d3c86c30b2ae24218d756aa38e09c
github.comgithub.com/apify/apify-mcp-server/pull/927
github.comgithub.com/apify/apify-mcp-server/releases/tag/v0.10.11
github.comgithub.com/apify/apify-mcp-server/security/advisories/GHSA-6gr2-qh89-hxwm

Frequently asked

questions

Potentially. The attacker generally needs to publish or control an Actor, while the victim must invoke or inspect it through an authenticated Apify MCP server.

No. The risk arises because the MCP client may attach the victim's bearer token when connecting to an attacker-influenced destination.

Validate the fully resolved destination against a strict allowlist before making the request, and never forward credentials to an unapproved origin.

Treat all endpoint metadata as untrusted, test URL parsing edge cases, apply least-privilege tokens, and enforce outbound network policies for external connections.

Find out what's already
exploitable in your codebase.