CVE-2026-59822 (GHSA-7488-6r32-c95q): LiteLLM MCP Auth Bypass, Versions, Fix and Rotation

Guilliano MolaireGuilliano MolaireUpdated 11 min read

CVE-2026-59822 (GHSA-7488-6r32-c95q) is an authentication bypass in LiteLLM’s MCP Streamable HTTP endpoint: any fabricated Bearer token opens an authenticated MCP session. It affects every LiteLLM version below 1.84.0, and CISA added it to its Known Exploited Vulnerabilities catalog on 2 September 2026 (CISA, Known Exploited Vulnerabilities Catalog feed). Upgrade to 1.84.0 or later, or block /mcp/ at your edge today, and then rotate your provider keys and MCP server credentials, because the advisory’s stated impact includes access to the services those credentials reach.

Item Detail
CVE CVE-2026-59822 (NVD)
GitHub advisory GHSA-7488-6r32-c95q, “MCP Authentication Bypass via OAuth2 Passthrough Fallback”, published 30 June 2026
Package litellm on PyPI (the LiteLLM proxy)
Affected versions All versions below 1.84.0 (advisory)
Fixed version 1.84.0 and later; 1.84.0 released 14 May 2026 (release v1.84.0)
Fix Pull request 26463, merged 30 April 2026
Severity CVSS 4.0 score 8.8 High, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N (advisory); NVD scores it 8.2 on CVSS 3.1 (NIST NVD, CVE-2026-59822 record)
Exploited Yes, per CISA: added to the CISA Known Exploited Vulnerabilities catalog on 2 September 2026, CISA due date 16 September 2026 (CISA, Known Exploited Vulnerabilities Catalog feed; NIST NVD, CVE-2026-59822 record)
Workaround Disable MCP routes or block /mcp/ and related MCP endpoints at your reverse proxy (advisory)
Reported by yaaras (advisory)

The fix shipped in the v1.84.0 release on 14 May 2026, before the advisory was published on 30 June 2026 and before the CISA listing on 2 September 2026. That gap is why your version number, and not the date you first heard about the CVE, tells you whether you were exposed.

The GitHub Security Advisory GHSA-7488-6r32-c95q for LiteLLM, showing affected versions below 1.84.0, patched version 1.84.0 and a High severity rating

Am I affected by CVE-2026-59822?

You are affected if a LiteLLM proxy below 1.84.0 serves MCP routes to anyone who can reach it. That holds whether or not you ever configured OAuth2 passthrough, because the same release also closed a second bypass that does not depend on it (more on that below). Run through these checks for every LiteLLM deployment you own, including the ones a team spun up for a demo and never decommissioned.

  1. Read the installed version. In the environment or container that runs the proxy, ask Python for the package version with importlib.metadata.version(), which returns “the installed distribution package version for the named distribution package” (Python documentation). In the commands below, swap litellm-proxy for your container’s name, and use the interpreter that actually runs the proxy if python is a different one. Anything below 1.84.0 is vulnerable.

    python -c "import importlib.metadata as m; print(m.version('litellm'))"
    # or, for a container:
    docker exec litellm-proxy python -c "import importlib.metadata as m; print(m.version('litellm'))"
  2. Check whether MCP routes are served at all. The LiteLLM MCP docs show clients connecting to http://localhost:4000/mcp/ for the gateway and to http://localhost:4000/github_mcp/mcp for one server, so look for /mcp/ and for /SERVER_NAME/mcp on your proxy. The docs add MCP servers through an mcp_servers block in config.yaml or through the admin UI, so if yours has any, check whether their routes answer from where an attacker could stand.

  3. Check who can reach them. A proxy on a public hostname, or reachable from a shared network that agents, IDE plugins and CI jobs also use, is the case to fix first. With network attack vector, low complexity and no privileges required in the advisory’s vector, reachability is most of the risk.

  4. Check your scanners. If one reports 8.2 and another 8.8, check which scoring system each one shows: in 2026, the National Vulnerability Database gives the issue 8.2 on CVSS 3.1 (NIST NVD, CVE-2026-59822 record), and the BerriAI advisory gives it 8.8 on CVSS 4.0 (BerriAI, GHSA-7488-6r32-c95q advisory).

What should you do right now? Patch, block and rotate

Work through this list in order. The first step closes the hole, and the rest deal with what may already have gone through it.

  1. Upgrade to LiteLLM 1.84.0 or later. The release notes warn that this release contains breaking changes, so read them before you roll it out, and do not let that review delay the next step.

  2. If you cannot upgrade today, block MCP at the edge. The advisory’s workaround is: “If upgrading is not immediately possible, disable MCP routes or block access to /mcp/ and related MCP endpoints at your reverse proxy or API gateway” (advisory). The fix’s own route parser recognises both /mcp/SERVER_NAME and /SERVER_NAME/mcp (pull request 26463), so block both shapes. The nginx rules below are our own sketch rather than part of the advisory, built on nginx’s location and return directives, so test them against your own routes before you rely on them:

    # Temporary: deny LiteLLM MCP routes until the proxy runs 1.84.0+
    location ^~ /mcp { return 403; }
    location ~ ^/[^/]+/mcp(/|$) { return 403; }
  3. Rotate the upstream provider keys the proxy holds. That means every OpenAI, Anthropic, Bedrock, Vertex or other provider credential you gave it. The LiteLLM MCP docs show a provider api_key under litellm_params in config.yaml, and os.environ/ references for other credentials. The advisory’s stated impact is that an attacker could “list and call configured MCP tools and access connected services exposed through MCP” (advisory), and it does not say provider keys were readable through this endpoint. We would rotate them anyway as a precaution if you cannot show from your own logs what each MCP session touched, or if any connected tool has file or command access on the proxy host.

  4. Rotate the credentials of every connected MCP server. These are the values LiteLLM sends upstream for each server: the auth_value behind auth_type settings such as bearer_token, api_key, basic and token, any static_headers, and the client_secret of servers set to auth_type: oauth2 (LiteLLM MCP docs). The tools behind those servers were callable, so treat their service accounts as exposed.

  5. Reissue LiteLLM virtual keys and the master key where a tool could reach them. The advisory does not describe key disclosure, so this step is our own precaution: if any connected MCP tool has access to the proxy’s environment, config file or database, replace the master key and the virtual keys kept there.

  6. Search your logs for the two bypass patterns. Look at reverse proxy or LiteLLM access logs from before your upgrade date for:

    • requests to MCP routes that carried a Bearer token matching no LiteLLM key you issued, yet returned 200;
    • any MCP request whose query string contains .well-known, which is how the second bypass marked a private route as public.

    The command below is our own sketch for nginx’s combined log format, which records the request line in quotes. We have only tried it on sample lines in that format, so adjust the pattern to your own logs.

    # MCP requests with ".well-known" in the query string
    grep -E '"(GET|POST) /[^ ]*mcp[^ ]*\?[^ ]*\.well-known' access.log
  7. Take the proxy off the public internet if it does not need to be there. The advisory’s CVSS vector describes a network attack that needs no privileges, so limiting which networks can reach the proxy limits who can attempt it.

What exactly did CVE-2026-59822 allow?

The advisory says it directly: “LiteLLM’s MCP Streamable HTTP endpoint could allow an unauthenticated attacker to establish an authenticated MCP session using an arbitrary Bearer token” (GHSA-7488-6r32-c95q). No valid LiteLLM virtual key was needed, so anyone who could reach the route could list and call tools as though they had passed authentication.

The cause is a fallback with the wrong default. LiteLLM supports OAuth2 passthrough, where a token in the Authorization header is meant for an upstream MCP server rather than for LiteLLM itself. In the vulnerable code, when LiteLLM’s own key check failed, the fallback “could replace failed LiteLLM key validation with an empty UserAPIKeyAuth() object” instead of rejecting the request (advisory).

In shape, rather than in LiteLLM’s actual source, the bug and its fix look like this:

# Wrong: a failed check falls through to a default identity
try:
    auth = validate_litellm_key(request)
except AuthError:
    auth = UserAPIKeyAuth()      # empty, but accepted downstream

# Right: passthrough only where the operator configured it
try:
    auth = validate_litellm_key(request)
except AuthError:
    if not all_target_servers_use_oauth2(request):
        raise HTTPException(status_code=401)
    auth = UserAPIKeyAuth()

The fix takes the second form. A new helper, _target_servers_use_oauth2, allows the fallback only when every target server is configured by the operator with auth_type: oauth2, and an empty target list, an unknown server name or any non-OAuth2 target now fails closed with a rejection (pull request 26463).

What else did the 1.84.0 fix close?

The same pull request closed a second bypass that the advisory does not mention. LiteLLM treats .well-known URLs as public routes. The old check asked whether the string .well-known appeared anywhere in the full request URL, so appending ?.well-known to an MCP route marked that route as public. The fix narrows the test to the path with request.url.path.startswith("/.well-known/"), so a query string can no longer carry the marker (pull request 26463).

This matters for triage, because the query-string bypass had nothing to do with OAuth2 passthrough. “We never configured passthrough” is therefore not a reason to leave an old version running, and it is why the log search above looks for .well-known in query strings as well as for unknown Bearer tokens.

Is CVE-2026-59822 being exploited?

Yes, according to CISA. CISA added CVE-2026-59822 to the Known Exploited Vulnerabilities catalog on 2 September 2026 as “BerriAI LiteLLM Improper Authentication Vulnerability”, with a due date of 16 September 2026 (CISA, Known Exploited Vulnerabilities Catalog feed), and the NIST NVD record repeats that name and both dates. We read the listing as CISA reporting exploitation because of what the feed calls itself, the “CISA Catalog of Known Exploited Vulnerabilities”; the entry gives no details of who was attacked or how. Its required action refers to BOD 26-04. The due date has passed, and we would handle an exposed proxy below 1.84.0 as an incident rather than as routine patching.

Identity you do not have to patch yourself

Skycloak is a managed identity platform for SSO, MFA, SCIM and audit logs. When an advisory lands, the fix is ours to ship: Keycloak 26.7.2 closed an account takeover through password reset and customers had it the same day upstream published it.

Where should authentication for LiteLLM MCP routes live?

LiteLLM holds upstream provider keys and the credentials its MCP servers use to reach your internal systems, so this CVE shows the cost of having the gateway’s own handler as the only check in front of them. The pattern we recommend is a separate policy enforcement point, such as a gateway set up as in our Kong with Keycloak guide, where Kong’s OIDC plugin validates Keycloak-issued JWTs, so that a token issued by Keycloak is checked on every MCP request before LiteLLM sees it.

An enforcement point in front of LiteLLM rejects a fabricated token with 401 and passes a valid Keycloak token with the right audience through to LiteLLM and the MCP server

In this design, an agent calls the MCP route with a Bearer token (1), and the enforcement point is set to check its signature, expiry and audience against Keycloak (2). It is set to answer a fabricated token with a 401, so the token stops there (3), and to pass a valid token whose audience names the route to LiteLLM 1.84.0 or later (4), which does its own key check and calls the MCP server with that server’s own credential (5).

In this design the caller sends two credentials. LiteLLM’s MCP documentation shows clients sending their key as x-litellm-api-key: Bearer sk-..., so the agent can keep its LiteLLM virtual key in that header and put its Keycloak access token in Authorization for the enforcement point. Those docs do not describe this exact setup, and LiteLLM’s handling of Authorization depends on each server’s auth_type, so test the arrangement against your own servers before you rely on it.

The enforcement point should do the checks described in Keycloak token validation for APIs: verify the signature against the realm’s published keys, reject expired tokens, and check the aud (audience) claim. The MCP authorization specification requires that “MCP servers MUST validate that access tokens were issued specifically for them as the intended audience”, following RFC 8707 resource indicators, and that “Invalid or expired tokens MUST receive a HTTP 401 response”.

In Keycloak you set that audience with an audience mapper on a client scope, which is the fix described in why a Keycloak-backed MCP server returns 401 on audience.

You can check a token’s signature and claims against your realm’s keys with the JWKS and JWT signature verifier. For more on validation code, see JWT Vulnerabilities: Algorithm Confusion, None Alg and Safe Validation.

This pattern adds to the upgrade rather than replacing it, and it only helps when all MCP traffic has to pass through the enforcement point. If Skycloak hosts that Keycloak, its audit logs record authentication events and export them to a SIEM, next to your LiteLLM access logs. For more on identity for agents, see Keycloak AI agent authentication, client ID metadata documents for MCP and agentic IAM in 2026.

Frequently asked questions

Which LiteLLM versions are affected by CVE-2026-59822?

Every version below 1.84.0. GHSA-7488-6r32-c95q lists affected versions as below 1.84.0 and patched versions as 1.84.0 and later. The fix shipped in the v1.84.0 release on 14 May 2026, before the advisory was published on 30 June 2026.

What is GHSA-7488-6r32-c95q?

It is the GitHub Security Advisory ID for the same vulnerability as CVE-2026-59822, titled “MCP Authentication Bypass via OAuth2 Passthrough Fallback”. The GitHub Advisory Database record lists both identifiers for this one issue.

Is CVE-2026-59822 being exploited in the wild?

Yes, according to CISA, which added it to the Known Exploited Vulnerabilities catalog on 2 September 2026 and set a due date of 16 September 2026 (NIST NVD, CVE-2026-59822 record). The entry does not describe the attacks themselves.

What can I do if I cannot upgrade LiteLLM right away?

Disable the MCP routes, or block /mcp/ and the per-server /SERVER_NAME/mcp routes at your reverse proxy or API gateway, as the advisory recommends. The bypass is specific to the MCP endpoints, so blocking them closes it until you can upgrade.

Does upgrading LiteLLM mean my provider keys are safe?

No. The advisory says the issue is fixed in 1.84.0 and says an attacker could reach connected services through MCP, but it offers no way to review or undo what happened before you upgraded. Rotate your provider keys and the credentials of every MCP server the proxy could call, and reissue LiteLLM keys where a connected tool could have read them.

Would an OAuth authorization server have prevented this bug?

Not the bug itself, which lived in LiteLLM’s own request handler. A separate enforcement point that validates Keycloak-issued tokens before requests reach LiteLLM checks each token’s signature against the realm’s keys, and the arbitrary Bearer tokens the advisory describes were not signed by your realm. Short-lived, audience-restricted tokens also limit what a stolen legitimate token is worth.

Changelog: checked against the advisory

What to do next

Check the LiteLLM version of every proxy you run against the table above, then upgrade to 1.84.0 or later, or block /mcp/ at the edge today if you cannot. Rotate the provider keys and MCP server credentials those proxies held, search your logs for the two patterns, and then put an enforcement point that validates Keycloak tokens in front of your MCP routes so the next gateway bug is not the only thing between the internet and your tools. If you would rather not run that Keycloak yourself, Skycloak hosts and operates it for you.

Sources

Identity you do not have to patch yourself

Skycloak is a managed identity platform for SSO, MFA, SCIM and audit logs. When an advisory lands, the fix is ours to ship: Keycloak 26.7.2 closed an account takeover through password reset and customers had it the same day upstream published it.

Guilliano Molaire
Written by
Founder, Skycloak

Guilliano is the founder of Skycloak and a cloud infrastructure specialist with deep expertise in product development and scaling SaaS products. He discovered Keycloak while consulting on enterprise IAM and built Skycloak to make managed Keycloak accessible to teams of every size.

© 2026 Skycloak. All Rights Reserved. Design by Yasser SolimanKeycloak™ is a trademark of the Linux Foundation. Skycloak is not affiliated with the Keycloak project.