🇰🇷 한글 설명
Nezha Monitoring 2.2.5 이전 버전에서 GET /api/v1/ddns 및 GET /api/v1/notification 엔드포인트가 필드 단위 마스킹 없이 전체 리소스 객체를 반환합니다. 이로 인해 Cloudflare API 토큰, TencentCloud SecretKey, Slack/Discord/Telegram 웹훅 URL(봇 토큰 포함) 및 Authorization 헤더 값이 평문으로 노출됩니다. 이 문제는 2.2.5 버전에서 수정되었습니다.
💡 쉬운 설명
모니터링 도구의 관리자 또는 특정 권한을 가진 토큰 사용자는 저장된 외부 서비스 인증정보를 그대로 조회할 수 있습니다. 이 정보가 유출되면 연결된 클라우드나 알림 서비스가 무단으로 사용될 수 있습니다.
🇺🇸 원문 (English)
Nezha Monitoring is a self-hostable, lightweight, servers and websites monitoring and O&M tool. Prior to 2.2.5, the GET /api/v1/ddns and GET /api/v1/notification endpoints return full resource objects including plaintext third-party API credentials, including Cloudflare API tokens, TencentCloud SecretKeys, Slack, Discord, and Telegram webhook URLs with embedded bot tokens, and Authorization header values, without any field-level redaction. Any authenticated admin or PAT with nezha:ddns:read or nezha:notification:read scope can receive stored credentials through the listDDNS and listNotification handlers in a single API response. This issue is fixed in version 2.2.5.
📍 영향받는 시스템
Nezha Monitoring 2.2.5 미만 버전
⚔️ 공격 벡터
인증된 관리자 또는 nezha:ddns:read / nezha:notification:read 권한의 PAT 소유자가 listDDNS/listNotification API를 호출해 저장된 자격증명을 평문으로 획득
🛡️ 대응 방법
Nezha Monitoring을 2.2.5 이상으로 업그레이드하고, 노출 가능성이 있는 Cloudflare·TencentCloud 토큰과 웹훅 URL을 즉시 재발급 및 교체
🔧 검증 코드
출력된 버전이 2.2.5 미만이면 취약하며, 2.2.5 이상이면 패치가 적용된 것입니다. 버전 정보를 얻지 못하면 실행 환경의 포트와 인증 설정을 확인해야 합니다.
curl -s -H 'Authorization: Bearer <TOKEN>' http://localhost:8008/api/v1/version 2>/dev/null | grep -oE '"version":"[^"]+"'