🇰🇷 한글 설명
PIA의 OIDC 발행자 허용 목록 검증 과정에서 단순 문자열 접두사 비교 방식을 사용하여 발생하는 취약점입니다. 공격자는 특수하게 조작된 URL을 통해 검증을 우회하고, PIA가 공격자의 서버에서 JWKS를 가져오게 하거나 공격자가 서명한 JWT를 수락하도록 유도할 수 있습니다.
💡 쉬운 설명
인증 주소를 확인할 때 앞부분만 대충 확인하는 허점을 이용한 공격입니다. 이를 통해 공격자는 가짜 인증 서버를 진짜처럼 속여 시스템에 허가되지 않은 접근을 할 수 있습니다.
🇺🇸 원문 (English)
PIA's OIDC issuer allowlist for Jenkins tokens uses a bare string-prefix check (issuer.startswith(' https://ci.eclipse.org ') in is_issuer_known, pia/models.py:139) instead of validating the issuer as a properly host-bounded URL. An attacker can craft an issuer such as https://
[email protected] (userinfo trick) or https://ci.eclipse.org.evil.host (suffix trick) that satisfies the prefix check while pointing the OIDC discovery and JWKS fetches at a server the attacker controls. An unauthenticated caller of POST /v1/upload/sbom can use this to force PIA to make outbound HTTP(S) requests to an arbitrary attacker-chosen host, and to have oidc.verify_token accept a JWT signed with the attacker's own key.
📍 영향받는 시스템
PIA (pia/models.py:139의 취약한 로직이 포함된 버전)
⚔️ 공격 벡터
조작된 OIDC issuer URL(userinfo trick 또는 suffix trick)을 이용한 POST /v1/upload/sbom 요청
🛡️ 대응 방법
단순 접두사 비교 대신 호스트 경계가 명확한 URL 검증 로직으로 수정
🔧 검증 코드
명령어 결과에 해당 코드 라인이 나타나면 취약한 로직이 존재하는 것으로 판단합니다.
grep -n "issuer.startswith(' https://ci.eclipse.org ')" pia/models.py