🇰🇷 한글 설명
gRPC-Go 1.79.3 미만 버전에서 HTTP/2 :path 의사 헤더의 입력값 검증 미흡으로 인해 권한 우회 취약점이 발생합니다. 공격자가 경로 앞에 슬래시(/)를 생략한 비정상적인 경로를 전송할 경우, 서버의 라우팅은 정상 작동하지만 권한 검사 로직이 이를 인식하지 못해 차단 규칙을 우회할 수 있습니다.
💡 쉬운 설명
서버가 주소를 확인할 때 맨 앞에 '/'가 빠진 잘못된 주소를 받아들이면서, 보안 검사기가 이를 정상적인 주소로 인식하지 못해 보안 규칙을 통과해버리는 문제입니다. 이를 통해 공격자는 허가되지 않은 기능에 접근할 수 있습니다.
🇺🇸 원문 (English)
gRPC-Go is the Go language implementation of gRPC. Versions prior to 1.79.3 have an authorization bypass resulting from improper input validation of the HTTP/2 `:path` pseudo-header. The gRPC-Go server was too lenient in its routing logic, accepting requests where the `:path` omitted the mandatory leading slash (e.g., `Service/Method` instead of `/Service/Method`). While the server successfully routed these requests to the correct handler, authorization interceptors (including the official `grpc/authz` package) evaluated the raw, non-canonical path string. Consequently, "deny" rules defined using canonical paths (starting with `/`) failed to match the incoming request, allowing it to bypass the policy if a fallback "allow" rule was present. This affects gRPC-Go servers that use path-based authorization interceptors, such as the official RBAC implementation in `google.golang.org/grpc/authz` or custom interceptors relying on `info.FullMethod` or `grpc.Method(ctx)`; AND that have a security policy contains specific "deny" rules for canonical paths but allows other requests by default (a fallback "allow" rule). The vulnerability is exploitable by an attacker who can send raw HTTP/2 frames with malformed `:path` headers directly to the gRPC server. The fix in version 1.79.3 ensures that any request with a `:path` that does not start with a leading slash is immediately rejected with a `codes.Unimplemented` error, preventing it from reaching authorization interceptors or handlers with a non-canonical path string. While upgrading is the most secure and recommended path, users can mitigate the vulnerability using one of the following methods: Use a validating interceptor (recommended mitigation); infrastructure-level normalization; and/or policy hardening.
📍 영향받는 시스템
gRPC-Go 1.79.3 미만 버전 (경로 기반 권한 부여 인터셉터를 사용하는 서버)
⚔️ 공격 벡터
HTTP/2 프레임의 :path 헤더에 슬래시(/)를 생략한 비정상적인 경로를 직접 전송
🛡️ 대응 방법
gRPC-Go를 1.79.3 버전 이상으로 업그레이드하거나, 검증 인터셉터 및 인프라 수준의 경로 정규화를 적용
🔧 검증 코드
출력된 버전이 v1.79.3 미만인 경우 해당 취약점에 노출되어 있을 가능성이 높습니다.
go list -m github.com/grpc/grpc@latest 2>/dev/null | grep -E 'v1\.[0-9]+\.[0-9]+'