Kestrel
대시보드로 돌아가기
CVE-2026-63127HIGH· 8.2MITRENVDGHSA대응게시일: 2026. 09. 16.수정일: 2026. 09. 16.

RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
8.2high

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한불필요
사용자 상호작용필요
범위변경
영향
기밀성 영향높음
무결성 영향낮음
가용성 영향없음
버전별 점수
CVSS 3.18.2HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

상세 설명

Summary

The rmcp library does not validate the resource parameter in OAuth Protected Resource metadata (RFC 9728), allowing a malicious MCP server to redirect OAuth flows to a legitimate authorization server and steal the resulting access tokens.

Details

RFC 9728 specifies two MUST requirements for resource parameter validation:

  • Section 7.3: the client MUST ensure that the resource identifier URL it is using as the prefix for the metadata request exactly matches the resource value in the returned metadata document.
  • Section 3.3: if the resource value returned is not identical to the URL the client used, the data MUST NOT be used.

In the current implementation (crates/rmcp/src/transport/auth.rs), the ResourceServerMetadata struct (lines 390–394) does not include a resource field:

text
1struct ResourceServerMetadata {
2 authorization_server: Option<String>,
3 authorization_servers: Option<Vec<String>>,
4 scopes_supported: Option<Vec<String>>,
5}

And discover_oauth_server_via_resource_metadata() (lines 1446–1465) proceeds without any resource URL validation.

Recommended fix
  1. Add the resource field to the struct:
    text
    1struct ResourceServerMetadata {
    2 resource: Option<String>, // RFC 9728 REQUIRED field
    3 authorization_server: Option<String>,
    4 authorization_servers: Option<Vec<String>>,
    5 scopes_supported: Option<Vec<String>>,
    6}
  2. Add validation logic after fetching metadata:
    text
    1let Some(resource_metadata) = self
    2 .fetch_resource_metadata_from_url(&resource_metadata_url)
    3 .await?
    4else {
    5 return Ok(None);
    6};
    7
    8// RFC 9728: validate that the resource identifier matches our target server
    9if let Some(resource) = &resource_metadata.resource {
    10 if resource.trim_end_matches('/') != self.base_url.as_str().trim_end_matches('/') {
    11 return Err(AuthError::MetadataError(format!(
    12 "Resource metadata mismatch: expected '{}', got '{}'",
    13 self.base_url, resource
    14 )));
    15 }
    16}

PoC

  1. Attacker sets up a malicious MCP server at fake-mcp.com/mcp.

  2. At fake-mcp.com/mcp/.well-known/oauth-protected-resource, the attacker serves metadata declaring:

    • resource: real-mcp.com/mcp (the legitimate server)
    • authorization_servers: the legitimate authorization server(s) of real-mcp.com/mcp
  3. Victim configures any MCP client using rmcp to connect to fake-mcp.com/mcp.

  4. rmcp fetches the protected resource metadata and, without validating that the resource field (real-mcp.com/mcp) differs from the configured server (fake-mcp.com/mcp), initiates an OAuth flow with the legitimate authorization server.

  5. The victim sees a legitimate authorization prompt and completes the flow.

  6. The resulting access token — valid for real-mcp.com/mcp — is sent to fake-mcp.com/mcp in subsequent requests.

  7. The attacker captures the token and can impersonate the victim on real-mcp.com/mcp.

Impact

This is an access token theft vulnerability via OAuth resource metadata spoofing. All MCP clients built on rmcp that rely on OAuth-protected MCP servers are affected. An attacker who tricks a user into connecting to a malicious MCP server can steal valid access tokens for any legitimate MCP server, enabling full impersonation of the victim.

Credit

Jian Cui, Minsun Shim, Zhou Li, Xiaojing Liao
University of Illinois Urbana-Champaign (UIUC)
University of California, Irvine (UCI)

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.