🛡️ CVE-2026-46341 — actors-mcp-server

🟡 CVSS 6.1 — Medium ✅ No Known Exploit CWE-183 NVD
6.1
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Apify Model Context Protocol (MCP) server: Domain Allowlist Bypass in fetch-apify-docs via String Prefix Matching

Summary

The fetch-apify-docs tool validates URLs against a domain allowlist using String.startsWith() instead of proper URL hostname comparison. This allows bypass via attacker-controlled subdomains (e.g., https://docs.apify.com.evil.com/), enabling the tool to fetch and return arbitrary web content to the LLM.

Details

Vulnerable component

src/tools/common/fetch_apify_docs.ts, line 51:

```typescript

const isAllowedDomain = ALLOWED_DOC_DOMAINS.some((domain) => url.startsWith(domain));

```

src/const.ts, lines 167-170:

```typescript

export const ALLOWED_DOC_DOMAINS = [

'https://docs.apify.com',

'https://crawlee.dev',

] as const;

```

How the bypass works

String.startsWith('https://docs.apify.com') matches any string beginning with that prefix, including:

  • https://docs.apify.com.evil.com/payload - attacker-controlled subdomain
  • https://[email protected]/payload - userinfo component in URL (browser behavior varies, but fetch() in Node.js may follow this)
  • https://docs.apify.com.evil.com:8080/path - custom port on attacker domain

All of these pass the startsWith check because they begin with the exact string https://docs.apify.com.

The fetched content is returned to the LLM

After the allowlist check passes, the tool fetches the URL and returns the full page content as markdown (fetch_apify_docs.ts:69-103):

```typescript

const response = await fetch(url);

// ...

const html = await response.text();

markdown = htmlToMarkdown(html);

// ...

return buildMCPResponse({ texts: [Fetched content from ${url}:\n\n${markdown}], ... });

```

The HTML is converted to markdown and returned verbatim to the LLM. This creates a prompt injection vector - the attacker's page can contain instructions that the LLM may follow.

While tools like get-html-skeleton have no domain allowlist at all - it accepts any URL. The fetch-apify-docs tool was clearly intended to be more restricted (documentation-only), but the startsWith check defeats that intent.

PoC

```json

{

"method": "tools/call",

"params": {

"name": "fetch-apify-docs",

"arguments": {

"url": "https://docs.apify.com.evil.com/prompt-injection-payload"

}

}

}

```

The URL passes the startsWith('https://docs.apify.com') check, fetches the attacker's page, and returns its content to the LLM.

Impact

  • Prompt injection via fetched content: Attacker hosts a page at docs.apify.com.evil.com containing LLM instructions. When the tool fetches and returns this content, the LLM may follow the injected instructions.
  • Security boundary violation: The allowlist was explicitly designed to restrict fetching to trusted documentation domains. The bypass defeats this intent.
  • SSRF (limited): The tool can fetch from attacker-controlled servers, though the primary risk is the content returned to the LLM rather than network access.
  • Account compromise via _meta.apifyToken: Injected prompt instructions can direct the LLM to include a specific _meta.apifyToken (the server's per-request token feature) in subsequent call-actor invocations, redirecting billable operations to a victim's account or accessing their private Actors

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality low, integrity low, availability none.

Affected software

CVE-2026-46341 is recorded against 2 packages.

  • @apify/actors-mcp-server
  • unknown

Timeline and source

Published on 19 May 2026 and last revised on 2 June 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
github.com (Package)

Details

Severity Medium
CVSS Score 6.1
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CWE CWE-183
Public Exploit ✅ No
Source NVD
Published 2026-05-19
Updated 2026-08-12
Modified 2026-06-02
Fix URL N/A

Affected Packages

Software From version Fixed in
@apify/actors-mcp-server
unknown

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in actors-mcp-server

CVE-2026-46341 is rated CVSS 6.1 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.