🇰🇷 한글 설명
Gotenberg 8.30.1 이하 버전의 메타데이터 엔드포인트에서 값 검증이 불충분하여, 줄바꿈 문자로 ExifTool 명령어를 주입할 수 있습니다. 인증 없이 PDF 파일을 임의 경로로 이동·변경하거나 파일을 덮어쓸 수 있으며, 심볼릭 링크를 생성할 수 있습니다.
💡 쉬운 설명
Gotenberg의 PDF 처리 기능에서 입력값 검증이 약해서, 특수 문자를 조작하면 서버의 파일을 임의로 삭제·변경·이동시킬 수 있습니다. 로그인 없이 누구나 공격할 수 있습니다.
🇺🇸 원문 (English)
Gotenberg is a Docker-powered stateless API for PDF files. In versions 8.30.1 and earlier, the metadata write endpoint validates metadata keys for control characters but leaves metadata values unsanitized. A newline character in a metadata value splits the ExifTool stdin line into two separate arguments, allowing injection of arbitrary ExifTool pseudo-tags such as -FileName, -Directory, -SymLink, and -HardLink. This is a bypass of the incomplete key-sanitization fix introduced in v8.30.1. An unauthenticated attacker can rename or move any PDF being processed to an arbitrary path in the container filesystem, overwrite arbitrary files, or create symlinks and hard links at arbitrary paths.
📍 영향받는 시스템
Gotenberg 8.30.1 이하 모든 버전
⚔️ 공격 벡터
메타데이터 쓰기 엔드포인트에 줄바꿈이 포함된 값 전송으로 ExifTool 명령어 주입 (-FileName, -Directory, -SymLink, -HardLink 등)
🛡️ 대응 방법
Gotenberg를 8.30.2 이상으로 업그레이드하거나 메타데이터 값에 대한 완전한 입력 검증 구현
🔧 검증 코드
설치된 Gotenberg 버전 확인. 버전이 8.30.1 이하면 취약, 8.30.2 이상이면 안전. 결과에 버전 정보 없으면 설치되지 않은 상태.
dpkg -l 2>/dev/null | grep gotenberg || docker images gotenberg --format '{{.Repository}}:{{.Tag}}' 2>/dev/null || echo 'Not found'