🇰🇷 한글 설명
웹훅 리졸버가 사용자로부터 입력받은 URL에 대해 주소 검증을 수행하지 않아 발생하는 취약점입니다. 인증된 사용자가 악의적인 URL을 등록하면, 서버가 내부 네트워크나 메타데이터 주소로 임의의 HTTP 요청을 보내게 만드는 SSRF 공격이 가능합니다.
💡 쉬운 설명
해커가 서버에게 '이 주소로 데이터를 보내줘'라고 거짓 명령을 내려, 서버가 내부의 중요한 정보가 담긴 곳에 몰래 접속하게 만드는 공격입니다. 서버가 직접 공격자의 명령을 수행하는 도구로 악용될 수 있습니다.
🇺🇸 원문 (English)
The setWebhookResolver in packages/api/src/resolvers/webhooks/index.ts stores the caller-supplied url without any address validation, and the file imports no validation helper. When a subscribed event fires, callWebhook in packages/api/src/jobs/call_webhook.ts issues axios.request with that url, the method and Content-Type recorded on the webhook, and a JSON body carrying the event data, so an authenticated user can make the server send repeated attacker-shaped requests to internal endpoints, including link-local metadata addresses. The request is blind: callWebhook discards the result and writes only a success line or the axios error to the server log, so the response is not returned through the API.
📍 영향받는 시스템
packages/api/src/resolvers/webhooks/index.ts 및 packages/api/src/jobs/call_webhook.ts를 포함하는 시스템
⚔️ 공격 벡터
인증된 사용자가 검증되지 않은 내부 네트워크 주소(link-local 등)를 웹훅 URL로 등록하여 서버가 요청을 보내도록 유도
🛡️ 대응 방법
웹훅 URL 등록 시 허용된 도메인/IP만 허용하는 화이트리스트 기반의 주소 검증 로직을 구현하고, 내부 네트워크 접근을 차단해야 합니다.
🔧 검증 코드
해당 파일 내에 URL 검증 로직(validation helper)이 누락되어 있는지 소스 코드를 확인합니다.
grep -r "setWebhookResolver" packages/api/src/resolvers/webhooks/ && grep -r "callWebhook" packages/api/src/jobs/call_webhook.ts