CVE-2026-48039: Meta Ads MCP: Unauthenticated HTTP MCP Tool Execution Leaks Operator Meta Access Token
meta-ads-mcp up to 1.0.108, run with its HTTP transport, accepts unauthenticated MCP tool calls. It falls back to the operator's META_ACCESS_TOKEN and can return that token in Graph API error output. Anyone who can reach the port can use the ad accounts and steal the token. Upgrade to 1.0.109.
Published Jun 11, 2026 · Updated Aug 7, 2026 · Analysis Nov 2, 2026
What an attacker can do
In the Streamable HTTP mode, AuthInjectionMiddleware.dispatch() in http_auth_integration.py logged a warning when no token was present but still passed the request on. Tool handlers then used the META_ACCESS_TOKEN environment variable as a fallback, so an anonymous caller acted as the operator.
The second flaw leaks the credential. make_api_request() in api.py puts access_token in the query string. When the Graph API returns an error, the code includes the full url and request_url in the JSON-RPC reply, token included. The reporter's proof of concept sent a single tools/call for get_ad_accounts to /mcp with no headers and got the token back in a 200 OK response.
The attacker needs network access to the server's HTTP port (8080 by default), nothing else. They can read or change data on every ad account the token reaches, spend API quota, and keep the long-lived token to use against the Graph API directly. Servers bound to localhost behind a trusted setup are far less exposed than ones published on a network. The stdio mode is not described as affected.
Who is affected
The meta-ads-mcp package on PyPI at 1.0.108 and below, when run with the HTTP transport and META_ACCESS_TOKEN set. Check your version:
pip show meta-ads-mcpThen check whether the server listens on a non-loopback interface, for example with a container that publishes port 8080.
meta-ads-mcp
- Ecosystem
- PyPI
- Affected
- <= 1.0.108
- Fixed in
- 1.0.109
- Check
pip show meta-ads-mcp
How to fix it
Upgrade to meta-ads-mcp 1.0.109.
pip install --upgrade meta-ads-mcp==1.0.109The release returns 401 with a WWW-Authenticate: Bearer challenge when a request has neither a bearer token nor the X-PIPEBOARD-API-TOKEN header, and removes the environment variable fallback for HTTP. Clients must send Authorization: Bearer with the Meta access token on every request. Error payloads no longer include access_token or appsecret_proof. If an older version was reachable from an untrusted network, rotate the Meta access token and review Graph API access logs.
How to tell if you were hit
Look in the server's logs for the warning HTTP Auth Middleware: No authentication tokens found in headers. Each occurrence is a request that got through without credentials. Check access logs for POST requests to /mcp from addresses you do not recognize. In the Meta Business and Graph API logs, look for calls made with the operator token from unknown IPs or at odd times, and for changes to ad accounts, campaigns or budgets nobody on your team made. If the server was ever exposed, assume the token leaked and replace it.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Unauthenticated HTTP MCP Tool Execution Leaks Operator Meta Access Token
| Field | Value | | Repository | pipeboard-co/meta-ads-mcp | | Affected version | ≤ 1.0.101 (commit 496c988 ~ 7d14226); Versions 1.0.102–1.0.105 lack git tags, so patch status is unconfirmed. | | Vulnerability | CWE-287 — Improper Authentication | | Severity | Critical | | CVSS 3.1 | 9.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N) |
Summary
AuthInjectionMiddleware.dispatch() at http_auth_integration.py:272 unconditionally forwards unauthenticated Streamable HTTP requests to downstream MCP tool handlers without issuing a 401 response, allowing any network-reachable caller to invoke MCP tools without authentication. When no per-request credential is present, tool handlers fall back to the META_ACCESS_TOKEN environment variable, and when the downstream Meta Graph API call fails, api.py:263–269 serialises the raw httpx request URL—including the operator's access_token as a query parameter—into the JSON-RPC response body, delivering the credential to the unauthenticated caller.
Affected Code
meta_ads_mcp/core/http_auth_integration.py:272 — middleware unconditionally calls call_next(request) even when no auth headers are present
if not auth_token and not pipeboard_token:
logger.warning("HTTP Auth Middleware: No authentication tokens found in headers")
try:
response = await call_next(request) # line 272: no 401 returned
return response
finally:
if auth_token:
FastMCPAuthIntegration.clear_auth_token()
if pipeboard_token:
FastMCPAuthIntegration.clear_pipeboard_token()meta_ads_mcp/core/api.py:136 — operator token appended to URL query parameters, exposed verbatim in Graph API error response request_url
request_params = params or {}
request_params["access_token"] = access_tokenUnauthenticated HTTP POST /mcp → AuthInjectionMiddleware.dispatch():272 (no 401 returned) → tool handler invokes make_api_request() using META_ACCESS_TOKEN env fallback → request_params["access_token"]:136 (token in URL) → Graph API error path at api.py:263–269 returns request_url containing access_token=… in 200 OK JSON-RPC response.
Proof of Concept
Step 1 — POST /mcp with no auth headers: HTTP 200 OK with operator access_token in request_url — proves unauthenticated tool execution and operator credential leakage.
docker run --rm -p 127.0.0.1:8080:8080 -e META_ACCESS_TOKEN=FAKE_TOKEN_FOR_POC_DEMO_123456789 meta-ads-mcp-vuln001 &
python3 poc.pyPOST /mcp HTTP/1.1
Host: 127.0.0.1:8080
Content-Type: application/json
Accept: application/json, text/event-stream
{"jsonrpc":"2.0","method":"tools/call","id":2,"params":{"name":"get_ad_accounts","arguments":{"limit":1}}}HTTP/1.1 200 OK
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "{\"data\": \"{\\n \\\"error\\\": {\\n \\\"message\\\": \\\"HTTP Error: 400\\\",\\n \\\"details\\\": {\\n \\\"error\\\": {\\n \\\"message\\\": \\\"Invalid OAuth access token data.\\\",\\n \\\"type\\\": \\\"OAuthException\\\",\\n \\\"code\\\": 190\\n }\\n },\\n \\\"full_response\\\": {\\n \\\"status_code\\\": 400,\\n \\\"url\\\": \\\"https://graph.facebook.com/v24.0/me/adaccounts?...&access_token=FAKE_TOKEN_FOR_POC_DEMO_123456789\\\",\\n \\\"request_url\\\": \\\"https://graph.facebook.com/v24.0/me/adaccounts?fields=id%2Cname%2Caccount_id%2Caccount_status%2Camount_spent%2Cbalance%2Ccurrency%2Cage%2Cbusiness_city%2Cbusiness_country_code&limit=1&access_token=FAKE_TOKEN_FOR_POC_DEMO_123456789\\\"\\n }\\n }\\n}\"}"
}
],
"isError": false
}
}Impact
An unauthenticated attacker who can reach the MCP server's HTTP port (default 8080) can invoke any registered MCP tool as the operator, consuming the operator's Meta Ads API quota and performing read or write operations on connected Meta ad accounts. When any tool call triggers a Graph API error, the operator's META_ACCESS_TOKEN is returned verbatim in the request_url field of the 200 OK JSON-RPC response, enabling the attacker to exfiltrate the long-lived credential and subsequently access the Meta Graph API directly outside the MCP interface.
Remediation
In AuthInjectionMiddleware.dispatch() (http_auth_integration.py), return a 401 Unauthorized response when neither auth_token nor pipeboard_token is present, instead of falling through to call_next:
from starlette.responses import Response
if not auth_token and not pipeboard_token:
return Response(
content='{"error":"Unauthorized"}',
status_code=401,
media_type="application/json",
)In make_api_request() (api.py), strip access_token from the request_url in error payloads, or transmit the token via an Authorization: Bearer header rather than a URL query parameter to prevent it from appearing in URLs, server logs, or error responses.
Credited to 232-323.
Questions
- Which meta-ads-mcp version fixes CVE-2026-48039?
1.0.109. The package data lists 1.0.108 and below as vulnerable. The advisory text notes versions 1.0.102 to 1.0.105 lacked git tags, so use the PyPI version, not the tag.
- Does CVE-2026-48039 affect the stdio transport?
The advisory and release notes describe the flaw only for the streamable HTTP transport. Servers that run only over stdio do not expose the HTTP port.
- Do I need to rotate the Meta token after upgrading?
Yes, if the server was reachable from an untrusted network before the upgrade. The release notes advise rotating the Meta access token and reviewing Graph API access logs.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-102943
Dagu MCP DAG specification read bypasses path containment and workspace isolation
medium6.5Nov 10, 2026CVE-2026-102610
fast-agent: `fast-agent serve` binds HTTP to 0.0.0.0 with no authentication by default; with --shell this is unauthenticated remote command execution
medium6.4Nov 9, 2026CVE-2026-63655
tsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS
high7.5Nov 9, 2026CVE-2026-76892
tsParticles: Malformed JSON requests can terminate the @tsparticles/mcp-server HTTP process
high8.7Nov 9, 2026CVE-2026-76893
tsParticles: A single anonymous MCP session can monopolize HTTP mode and deny new clients
medium6.9Nov 9, 2026CVE-2026-77604
Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read
high7.5Nov 9, 2026
