CVE-2026-100397 CRITICAL 10.0 난이도Difficulty 입문Intro

Rucio가 SSH 챌린지 nonce를 베어러 인증 토큰으로 받아들임Rucio accepts SSH challenge nonces as bearer authentication tokens

공식 참조Official references: NVDCVE.org

CVE-2026-100397는 Rucio의 Improper Authentication(CWE-287) 취약점으로, CVSS 10(CRITICAL)입니다. 영향 버전: 1.14.0 ≤ v < 35.9.1 / 38.6.1 / 40.4.2 / 41.1.1. 수정 버전: 35.9.1, 38.6.1, 40.4.2, 41.1.1.CVE-2026-100397 is an Improper Authentication (CWE-287) vulnerability in Rucio, rated CVSS 10 (CRITICAL). Affected: 1.14.0 ≤ v < 35.9.1 / 38.6.1 / 40.4.2 / 41.1.1. Fixed in: 35.9.1, 38.6.1, 40.4.2, 41.1.1.

제품Product Rucio
영향 버전Affected 1.14.0 ≤ v < 35.9.1 / 38.6.1 / 40.4.2 / 41.1.1
수정 버전Fixed in 35.9.1, 38.6.1, 40.4.2, 41.1.1
심각도Severity CVSS 10 CRITICAL
취약점 유형Weakness CWE-287 Improper Authentication
공격 조건Attack conditions 원격 (네트워크) · 인증 불필요 · 사용자 상호작용 불필요Remote (network) · No authentication · No user interaction

1. TL;DR

Rucio는 과학 데이터 관리 프레임워크입니다. 클라이언트는 사전 인증 없이, 요청 헤더에 지정한 계정 이름에 대해 “SSH 챌린지 토큰”을 요청할 수 있습니다. 이 토큰은 클라이언트가 나중에 SSH 키로 서명하게 될 수명이 짧은 nonce입니다.

챌린지 토큰은 실제 인증 토큰과 같은 데이터베이스 테이블에 저장됩니다. lib/rucio/core/authentication.py의 validate_auth_token 함수는 이 두 종류를 구분하지 않았습니다. 그 결과 챌린지 토큰을 일반 인증 토큰처럼 보내면 서버가 해당 계정의 로그인으로 받아들였습니다. 인증되지 않은 원격 사용자가 관리자 계정을 포함한 어떤 계정에 대해서도 이 방법을 쓸 수 있었습니다.

수정 사항은 챌린지 토큰을 자격 증명으로 사용하는 것을 앞단에서 거부하는 검사를 추가합니다. 35.9.1, 38.6.1, 40.4.2, 41.1.1 버전에 반영되었습니다(출처: 권고문).

2. Flaw 분류

항목값
주요 CWECWE-287 Improper Authentication (NVD 및 권고문과 일치)
공격 벡터네트워크, 비인증, 낮은 복잡도, 사용자 상호작용 없음 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H)
영향관리자 계정을 포함한 임의 계정으로 인증. 권고문은 Critical, 10.0으로 평가(기밀성, 무결성, 가용성 모두 High).
전제 조건Rucio 인증/REST API에 대한 네트워크 접근, 대상 계정 이름에 대한 지식. nonce는 제한된 시간 동안만 사용할 수 있음(정확한 수명은 공개 자료에서 확인되지 않음).
영향받는 버전1.14.0부터 패치 릴리스 35.9.1, 38.6.1, 40.4.2, 41.1.1 이전까지 (권고문 및 NVD 기준, REVIEW_NOTES 참조)
크레딧thebatou 보고 (권고문 기준)

3. 근본 원인

이 flaw는 토큰 유형 혼동(token-type confusion) 입니다. 서로 다른 두 종류의 비밀 값이 하나의 저장소와 검증 경로를 공유합니다.

  1. 인증 없이 발급되는 nonce. 챌린지 엔드포인트는 호출자가 헤더에 넣은 계정 이름에 대해 토큰을 만듭니다. SSH 챌린지-응답 방식에서 인증되지 않은 호출자에게 nonce를 주는 것은 문제가 아닙니다. 호출자가 계정 소유자임은 나중에 해당 개인 키로 nonce에 서명할 때 비로소 증명되기 때문입니다.
  2. 공유 저장소. 챌린지 nonce는 실제 세션 토큰과 같은 토큰 테이블에 저장됩니다.
  3. 존재 여부만 확인하는 검증. validate_auth_token은 제시된 토큰을 조회하고, 유효하며 만료되지 않았다면 호출자를 그 토큰의 계정으로 취급합니다. 이 함수에는 “이 행은 자격 증명이 아니라 nonce”라고 판단하는 부분이 없었습니다.

핵심은 nonce가 원래 신원을 증명하는 값이 아니라는 점입니다. nonce는 증명(서명)의 입력값일 뿐입니다. 검증 로직은 저장된 토큰을 가지고 있다는 사실을 신원 증명으로 취급했고, 그 결과 서명 단계를 건너뛸 수 있었습니다. CWE-287 정의의 “주장이 올바르다는 것을 충분히 증명하지 못하는” 경우에 해당합니다.

4. 익스플로잇 흐름(개념)

각 단계는 개념 수준으로만 설명합니다. 정확한 요청은 권고문에 문서화되어 있으며, 이 초안에서는 재현하지 않습니다.

  1. 공격자가 관리자 계정 같은 대상 계정 이름을 고릅니다.
  2. 공격자가 챌린지 엔드포인트에 해당 계정용 nonce를 요청합니다. 자격 증명은 필요 없으며, 서버는 nonce를 발급해 토큰 테이블에 저장합니다.
  3. 공격자는 nonce에 서명하지 않습니다. 대신 일반적으로 세션 토큰에 쓰는 헤더에 nonce를 넣어 제시합니다.
  4. validate_auth_token이 테이블에서 nonce를 찾고, 이상한 점을 발견하지 못한 채 대상 계정으로 확인합니다.
  5. 다른 API 엔드포인트는 요청을 그 계정에서 온 것으로 취급하며, 관리자 계정이라면 전체 제어권을 의미합니다.
  1. 선택한 계정에 대한 챌린지 요청 — 인증 불필요
  2. 서버가 공유 토큰 테이블에 nonce 저장
  3. nonce를 일반 인증 토큰으로 제시
  4. validate_auth_token이 수락 — 유형 검사 없음
  5. API가 대상 계정으로 동작
  6. 관리자를 포함한 계정 탈취
개념 흐름도 — 실행 가능한 페이로드가 아닙니다

5. 트리거 조건

  • 서버가 영향받는 버전(1.14.0부터 패치 릴리스 이전까지)을 실행 중이며, 공격자가 인증 API에 접근할 수 있어야 합니다.
  • 공격자가 유효한 계정 이름을 알거나 추측할 수 있어야 합니다. 관리자 계정 같은 이름은 추측하기 쉬우며, 권고문 자체도 관리자 계정을 예시로 사용합니다.
  • 공격자는 nonce의 유효 기간 안에 사용해야 합니다. 유효 기간은 “일정 시간대”로만 설명되어 있으며, 정확한 값은 공개 자료에서 확인되지 않습니다.
  • 탈취한 자격 증명, 사용자 상호작용, 사전 거점은 필요하지 않습니다.
  • 챌린지 엔드포인트가 응답하려면 SSH 인증이 활성화되거나 설정되어 있어야 하는지는 공개 자료에서 확인되지 않습니다.

6. 패치 분석

커밋 4d4a585(“fix(Auth): reject SSH challenge tokens as bearer auth tokens”)는 파일 하나, lib/rucio/core/authentication.py만 변경하며 validate_auth_token에 5줄을 추가합니다. 커밋 f5db354는 제목과 추가된 줄이 같고 오프셋만 다르므로 백포트로 보입니다. 링크된 나머지 두 커밋은 확인하지 않았습니다(REVIEW_NOTES 참조).

커밋에 나타난 변경의 핵심 부분:

+5−0python
    token = token.strip()

    # SSH challenge tokens share this table but are nonces to be signed, not
    # credentials, so they must never authenticate a request on their own.
    if token.startswith('challenge-'):
        raise CannotAuthenticate("Challenge tokens cannot be used for authentication.")

    # Hash token for cache key to prevent exposure and handle long JWT tokens
    cache_key = _hash_token_for_cache(token)

이 변경이 흐름을 끊는 이유:

  • 흐름의 4단계가 차단됩니다. 검증 함수는 이제 조회 전에 챌린지 접두사가 붙은 모든 토큰을 거부합니다. nonce는 CannotAuthenticate로 거부되므로 “nonce를 세션 토큰으로 사용”하는 단계가 실패합니다.
  • 위치가 중요합니다. 검사는 공백 제거 직후, 캐시 키 계산 이전에 실행됩니다. 가장 먼저 실행되므로 이후의 조회나 캐싱이 챌린지 토큰을 받아들이기 전에 거부됩니다.
  • 설계상 절충. 이 방식은 별도 저장소나 저장된 토큰 유형 필드가 아니라 이름 규칙에 기반한 필터입니다. 접두사가 nonce만을 안정적으로 표시하고 다른 곳에서 그 접두사를 쓰지 않는 한 동작합니다. 구조적인 수정이라면 nonce를 별도 테이블에 보관하거나 토큰 유형 컬럼을 추가하는 것입니다. 업스트림이 그렇게 했는지는 확인하지 못했으며, 위에 나온 커밋들은 그렇게 하지 않았습니다.

7. 탐지·완화

즉시 조치

  • 사용 중인 릴리스 라인에 맞는 수정 버전(35.9.1, 38.6.1, 40.4.2, 41.1.1)으로 업그레이드합니다(권고문 기준).
  • 즉시 업그레이드할 수 없는 경우, 확인한 자료에서는 벤더가 문서화한 우회책을 찾지 못했습니다. Rucio 인증/API 엔드포인트에 대한 네트워크 접근을 신뢰할 수 있는 클라이언트로 제한하면 노출을 줄일 수 있습니다. 이는 일반적인 조치이며 벤더가 확인한 수정이 아닙니다.
  • 패치 후에는 노출 기간의 관리자 활동을 검토합니다. 설명되지 않는 관리자 수준 변경은 침해 가능성이 있는 것으로 취급합니다.

탐지

  • 웹 또는 리버스 프록시 로그에서, SSH 키 인증을 끝까지 완료하지 않는 클라이언트가 챌린지 토큰 엔드포인트로 보낸 요청을 찾습니다. 정상적인 사용은 서명된 챌린지 교환으로 끝나야 합니다.
  • 인증 토큰 헤더에 일반 세션 토큰이 아니라 챌린지 형태의 토큰이 담긴 API 요청을 찾습니다. 이는 로그에 해당 값이 기록되는 경우에만 가능합니다. 토큰 값을 로그에 저장할 때는 주의해야 합니다.
  • 낯선 출발지 주소에서 발생한 관리자 계정 활동을 찾습니다.

격리된 실습(로컬 Docker 랩)

인터넷으로의 경로가 없고 폐기 가능한 데이터만 있는 로컬 Docker 랩에서만 재현하십시오. 소유하지 않았거나 서면 테스트 허가가 없는 시스템에는 절대 테스트하지 마십시오.

  • 격리된 Docker 네트워크에서 영향받는 Rucio 버전과 패치된 버전을 나란히 실행합니다.
  • 챌린지 nonce를 세션 토큰으로 제시했을 때 각 버전이 어떻게 처리하는지 개념 수준에서 관찰합니다. 영향받는 버전은 이를 수락하고, 패치된 버전은 새로 추가된 거부를 발생시킵니다.
  • 6장의 diff를 읽고, 앞단 검사가 검증 함수의 동작을 어떻게 바꾸는지 추적합니다.

8. References

1. TL;DR

Rucio is a scientific data management framework. It lets a client ask for an “SSH challenge token” for an account name given in a request header, with no prior authentication. That token is meant to be a short-lived nonce that the client later signs with an SSH key.

The challenge tokens are stored in the same database table as real authentication tokens. The function validate_auth_token in lib/rucio/core/authentication.py did not tell the two kinds apart. A challenge token could therefore be sent as an ordinary auth token, and the server accepted it as a login for that account. An unauthenticated remote user could do this for any account, including an administrative one.

The fix adds an early check that rejects challenge tokens as credentials. It is in 35.9.1, 38.6.1, 40.4.2 and 41.1.1 (source: the advisory).

2. Flaw classification

ItemValue
Primary CWECWE-287 Improper Authentication (matches NVD and the advisory)
Attack vectorNetwork, unauthenticated, low complexity, no user interaction (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H)
ImpactAuthentication as an arbitrary account, including an administrative one. The advisory rates it Critical, 10.0 (Confidentiality, Integrity and Availability all High).
PrerequisitesNetwork access to the Rucio auth/REST API, and knowledge of a target account name. The nonce is only usable for a limited time (exact lifetime not confirmed in public sources).
Affected versionsFrom 1.14.0 until the patched releases 35.9.1, 38.6.1, 40.4.2 and 41.1.1 (per the advisory and NVD; see REVIEW_NOTES)
CreditReported by thebatou (per the advisory)

3. Root cause

The flaw is a token-type confusion. Two different kinds of secret share one storage and validation path.

  1. A nonce handed out without authentication. The challenge endpoint creates a token for whatever account name the caller puts in a header. Giving a nonce to an unauthenticated caller is fine in an SSH challenge-response scheme. The caller is only proven to be the account holder later, when they sign the nonce with the matching private key.
  2. Shared storage. The challenge nonce is saved in the same token table as real session tokens.
  3. Validation that checks only existence. validate_auth_token looks the presented token up and, if it is valid and unexpired, treats the caller as the token’s account. Nothing in it said “this row is a nonce, not a credential”.

The key point is that the nonce was never supposed to prove identity. It is only the input to a proof, which is the signature. The validator treated holding a stored token as proof of identity, so the signature step could be skipped. This is the “insufficiently proves that the claim is correct” case from the CWE-287 definition.

4. Exploit flow (conceptual)

Each step is described as a concept only. The advisory documents the exact requests, and this draft does not reproduce them.

  1. The attacker picks a target account name, such as an administrative account.
  2. The attacker asks the challenge endpoint for a nonce for that account. No credentials are needed, and the server issues one and stores it in the token table.
  3. The attacker does not sign the nonce. They present it in the header normally used for session tokens.
  4. validate_auth_token finds the nonce in the table, sees nothing wrong with it, and resolves it to the target account.
  5. Other API endpoints treat the request as coming from that account, which for an administrative account means full control.
  1. request challenge for chosen account — no auth needed
  2. server stores nonce in the shared token table
  3. nonce presented as a normal auth token
  4. validate_auth_token accepts it — no type check
  5. API acts as the target account
  6. account takeover, including admin
Conceptual flow — not an executable payload

5. Trigger conditions

  • The server runs an affected version (from 1.14.0 up to, but not including, the patched releases) and the auth API is reachable by the attacker.
  • The attacker knows or can guess a valid account name. Names such as an administrative account are easy to guess, and the advisory itself uses an administrative account as its example.
  • The attacker uses the nonce within its validity window. The window is described only as “a certain time-frame”, and the exact value is not confirmed in public sources.
  • No stolen credentials, user interaction or prior foothold is needed.
  • Whether SSH authentication has to be enabled or configured for the challenge endpoint to respond is not confirmed in public sources.

6. Patch analysis

Commit 4d4a585 (“fix(Auth): reject SSH challenge tokens as bearer auth tokens”) changes one file, lib/rucio/core/authentication.py, adding 5 lines to validate_auth_token. Commit f5db354 has the same title and the same added lines at a different offset, so it is presumably a backport. I have not checked the two other linked commits (see REVIEW_NOTES).

Key part of the change, as shown in the commit:

+5−0python
    token = token.strip()

    # SSH challenge tokens share this table but are nonces to be signed, not
    # credentials, so they must never authenticate a request on their own.
    if token.startswith('challenge-'):
        raise CannotAuthenticate("Challenge tokens cannot be used for authentication.")

    # Hash token for cache key to prevent exposure and handle long JWT tokens
    cache_key = _hash_token_for_cache(token)

Why this breaks the flow:

  • Step 4 of the flow is blocked. The validator now refuses any token carrying the challenge prefix before looking it up. The nonce is rejected with CannotAuthenticate, so the “nonce as session token” step fails.
  • Placement matters. The check runs right after whitespace stripping and before the cache-key computation. Because it runs first, a challenge token is refused before any later lookup or caching can accept it.
  • Design trade-off. This is a naming-convention filter, not a separate store or a stored token-type field. It works as long as the prefix reliably marks nonces and nothing else uses that prefix. A structural fix would keep nonces in a separate table or add a token-type column. I did not confirm whether upstream did that, and the commits shown do not.

7. Detection & mitigation

Immediate actions

  • Upgrade to a fixed release: 35.9.1, 38.6.1, 40.4.2 or 41.1.1, whichever matches your release line (per the advisory).
  • If you cannot upgrade immediately, I found no vendor-documented workaround in the sources I confirmed. Restricting network access to the Rucio auth/API endpoints to trusted clients reduces exposure. This is a general measure, not a vendor-confirmed fix.
  • After patching, review administrative activity from the exposure period. Treat any unexplained admin-level changes as possible compromise.

Detection

  • Look in web or reverse-proxy logs for requests to the challenge-token endpoint from clients that never go on to complete an SSH-key authentication. Legitimate use should end with a signed-challenge exchange.
  • Look for API requests whose auth-token header carries a challenge-style token rather than a normal session token. This only works if your logs record that value. Be careful about storing token values in logs.
  • Look for admin-account activity from unfamiliar source addresses.

Isolated practice (local Docker lab)

Reproduce this only in a local Docker lab that has no route to the internet and holds only throwaway data. Never test against a system you do not own or lack written permission to test.

  • Run an affected Rucio version and a patched version side by side in an isolated Docker network.
  • Observe at the concept level how each version treats a challenge nonce presented as a session token. The affected version accepts it and the patched version raises the new rejection.
  • Read the diff in section 6 and trace how the early check changes the validator’s behaviour.

8. References