🇰🇷 한글 설명
Hugo 정적 사이트 생성기 0.123.0에서 0.161.1 버전 사이에서 발생한 취약점입니다. 심볼릭 링크 처리 시 Lstat 대신 Stat을 사용하여, 로컬 마운트 내에 심볼릭 링크를 심어두면 Hugo 사용자가 접근 가능한 임의의 파일을 읽을 수 있습니다.
💡 쉬운 설명
해커가 특정 폴더에 가짜 연결 통로(심볼릭 링크)를 만들어 두면, Hugo 프로그램이 이를 통해 컴퓨터 내의 다른 중요한 파일들을 몰래 읽어갈 수 있는 문제입니다. 이는 주로 외부 테마를 가져올 때 발생할 수 있습니다.
🇺🇸 원문 (English)
Hugo is a static site generator. From 0.123.0 to 0.161.1, a regression made RootMappingFs.statRoot use Stat (follows symlinks) instead of Lstat , so a direct resources.Get of a symlink pointing outside its mount returned the target's contents — letting a symlink planted in a local mount (e.g. a vendored themes/ theme) read arbitrary files accessible to the Hugo user. Go-module themes from GitHub (symlinks stripped) and directory walks were unaffected. Fixed in 0.162.0.
📍 영향받는 시스템
Hugo version 0.123.0 to 0.161.1
⚔️ 공격 벡터
로컬 마운트 내(예: themes/ 폴더)에 외부 파일을 가리키는 심볼릭 링크를 배치하여 파일 읽기 권한 탈취
🛡️ 대응 방법
Hugo 버전을 0.162.0 이상으로 업데이트
🔧 검증 코드
명령어 결과에 취약한 버전 범위(0.123.0 ~ 0.161.1)가 나타나면 해당 버전이 설치된 상태입니다.
hugo version | grep -E 'extended 0\.(12[3-9]|1[3-5][0-9]|16[0-1])\.'