🇰🇷 한글 설명
Temporal 서버는 워크플로 히스토리 페이지네이션 토큰을 요청에 명시된 네임스페이스 및 워크플로 식별자에 바인딩하지 않습니다. 인증된 사용자가 다른 네임스페이스에서 발급된 연속 토큰을 제출하면, 같은 History 샤드에 속하는 워크플로 식별자를 지정하여 해당 네임스페이스의 워크플로 히스토리를 조회할 수 있습니다.
💡 쉬운 설명
한 네임스페이스에 읽기 권한이 있는 사용자가 다른 네임스페이스에서 받아둔 페이지 토큰을 재사용하면 그 네임스페이스의 워크플로 기록을 볼 수 있습니다. 취약한 버전에는 이를 막는 검사가 없어 설정으로는 차단할 수 없습니다.
🇺🇸 원문 (English)
Temporal Server does not bind a workflow-history pagination token to the namespace and workflow named in the request that presents it. GetWorkflowExecutionHistory and GetWorkflowExecutionHistoryReverse authorize the caller against the namespace in the request, then select history from the branch recorded inside the caller-supplied next_page_token. The normal history continuation carries a run identifier, event bounds, a persistence cursor, and a branch token, but no namespace or workflow identity, and it is serialized as unauthenticated protobuf bytes. An authenticated caller holding read permission on one namespace, together with a genuine non-final continuation issued earlier for a workflow in a second namespace, can submit that continuation with a request naming the first namespace and receive the second namespace's workflow history, provided the supplied workflow identifier selects the same History shard as the continuation's branch. No workflow with the supplied identifier needs to exist. Because the token is unauthenticated, a holder can also advance its event range and clear its persistence cursor, which returns history events created after that caller's current credential no longer granted access to the continuation's namespace. Determining exposure is a version question rather than a configuration question: every release listed as affected omits the binding check on the forward history path, and on the reverse history path in releases from 1.16.0, which introduced GetWorkflowExecutionHistoryReverse; no setting in an affected release restores it, and affected releases emit no metric or log for the condition, so their telemetry provides no detection. Fixed releases add the check and, when a page token's branch token is not the requested execution's current branch token, record the counter pagination_token_branch_mismatch tagged with namespace and reason and write a History-service warning log reading "Pagination branch token is not the execution's current branch token" with the fields wf-namespace, wf-id, wf-run-id, reason, wf-branch-token, and wf-request-branch-token. Search History warning logs for that message, or for reason=foreign_branch, which denotes a branch token the requested execution never recorded and is not expected in normal operation; reason=non_current_branch denotes a retained but superseded branch of the same execution and can occur legitimately after conflict resolution or failover. A foreign_branch record does not by itself prove the read was refused, because the counter and log are emitted before the enforcement decision and therefore appear both when the check rejects the request and when history.enablePaginationTokenBranchValidationShadowMode is enabled and the read is served; confirm refusal from the gRPC response, which is InvalidArgument carrying a CurrentBranchChangedFailure detail. The metric and log are tagged with the requesting namespace, not the namespace whose history the token selects, so a foreign_branch alert does not name the exposed namespace. The issue does not provide unauthenticated access, construction of a usable continuation from public workflow identifiers, enumeration of workflows for which the caller holds no continuation, or any modification of workflow state.
📍 영향받는 시스템
Temporal Server 취약 버전 (1.16.0 이상 포함 다수 릴리스; 정확한 영향 버전은 벤더 권고문 확인 필요)
⚔️ 공격 벡터
인증된 사용자가 자신이 읽기 권한을 가진 네임스페이스 요청에 다른 네임스페이스에서 발급된 연속 페이지 토큰을 담아 GetWorkflowExecutionHistory 또는 GetWorkflowExecutionHistoryReverse를 호출
🛡️ 대응 방법
패치된 Temporal Server 버전으로 업그레이드하고, 업그레이드 전까지 History 서비스 로그에서 'Pagination branch token is not the execution's current branch token' 메시지 및 reason=foreign_branch 기록을 점검
🔧 검증 코드
출력된 Temporal 버전을 벤더 보안 권고문의 영향/수정 버전 목록과 비교하여 취약 여부를 판단하며, 버전 정보를 얻을 수 없으면 설치 방식과 버전을 수동으로 확인해야 합니다.
temporal --version 2>/dev/null || (command -v temporal-server >/dev/null && temporal-server --version 2>/dev/null) || docker images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | grep -i temporal