🇰🇷 한글 설명
@zereight/mcp-gitlab 서버에서 환경 변수 ENABLE_DYNAMIC_API_URL이 활성화된 경우, X-GitLab-API-URL 헤더를 통해 공격자가 지정한 외부 URL로 요청을 보낼 수 있습니다. 이 과정에서 서버는 사용자의 Private-Token을 공격자의 서버로 전송하게 되어 인증 정보가 탈취될 수 있습니다.
💡 쉬운 설명
프로그램이 GitLab과 통신할 때 주소를 마음대로 바꿀 수 있는 허점이 발견되었습니다. 공격자가 가짜 주소를 알려주면 사용자의 중요한 비밀번호(토큰)가 공격자에게 그대로 전달됩니다.
🇺🇸 원문 (English)
`@zereight/mcp-gitlab` is a Model Context Protocol server for GitLab. Starting in version 0.0.1 and prior to version 2.1.27, when the environment variable `ENABLE_DYNAMIC_API_URL=true` is set, the server reads the `X-GitLab-API-URL` HTTP request header and uses it as the base URL for all outbound GitLab API calls made within that request. The server validates that the value is a well-formed URL (`new URL(dynamicApiUrl)`) but applies no allowlist or hostname restriction. The server then attaches the victim's `Private-Token` to every outbound fetch that uses the redirected URL. Any caller who can reach the HTTP transport can set `X-GitLab-API-URL` to an attacker-controlled host. The next GitLab API call the server makes delivers the victim's token to that host. Version 2.1.27 contains a patch.
📍 영향받는 시스템
@zereight/mcp-gitlab version 0.0.1 to 2.1.26
⚔️ 공격 벡터
HTTP 요청 헤더의 X-GitLab-API-URL 값을 공격자 제어 호스트로 조작하여 인증 토큰 탈취
🛡️ 대응 방법
@zereight/mcp-gitlab 버전을 2.1.27 이상으로 업데이트하거나 ENABLE_DYNAMIC_API_URL 설정을 비활성화하십시오.
🔧 검증 코드
출력된 버전이 2.1.27 미만(0.0.1 ~ 2.1.26)인지 확인하십시오.
npm list @zereight/mcp-gitlab