🇰🇷 한글 설명
ccyl13 Pentestify 1.0.0 이하 버전의 PDF 생성 엔드포인트에서 서버 측 요청 위조(SSRF) 취약점이 발견되었습니다. 공격자가 조작된 Host 헤더를 사용하여 서버가 내부 또는 외부의 임의 URL로 요청을 보내게 할 수 있으며, 그 결과가 PDF에 포함되어 반환될 수 있습니다.
💡 쉬운 설명
공격자가 가짜 주소를 보내 서버가 몰래 내부 데이터나 민감한 정보를 가져오게 만드는 보안 구멍입니다. 서버가 요청을 보낼 때 주소가 올바른지 확인하지 않아 발생합니다.
🇺🇸 원문 (English)
Server-Side Request Forgery (SSRF) (CWE-918) in the PDF generation endpoint GET /api/reports/{id}/pdf (backend/main.py) in ccyl13 Pentestify 1.0.0 and lower allows remote attackers to make the server issue requests to arbitrary internal or external URLs, including cloud metadata services, and return the rendered content in the resulting PDF via a crafted Host header, because the target URL is built from request.base_url without validation.
📍 영향받는 시스템
ccyl13 Pentestify 1.0.0 및 그 이하 모든 버전
⚔️ 공격 벡터
조작된 Host 헤더를 사용하여 PDF 생성 API(/api/reports/{id}/pdf)에 요청을 보냄
🛡️ 대응 방법
사용자 입력값(Host 헤더 등)에 대한 검증 로직을 추가하고, 허용된 도메인(Allowlist)만 사용하도록 수정해야 합니다.
🔧 검증 코드
응답 결과에 공격자가 지정한 도메인의 내용이 포함되거나 서버가 해당 도메인으로 요청을 시도하면 취약한 상태입니다.
curl -I -H 'Host: attacker-controlled-domain.com' http://<target-ip>/api/reports/1/pdf