🇰🇷 한글 설명
Mako 템플릿 라이브러리의 Windows 환경에서 백슬래시를 이용한 경로 탐색 취약점으로, 템플릿 디렉터리 외부의 파일에 접근 가능. 1.3.12 버전에서 수정됨.
💡 쉬운 설명
Mako 템플릿 도구가 Windows에서 백슬래시 경로를 제대로 검증하지 않아, 설정된 폴더 밖의 파일을 읽을 수 있는 문제입니다. 민감한 파일이 노출될 수 있습니다.
🇺🇸 원문 (English)
Mako is a template library written in Python. Prior to 1.3.12, on Windows, a URI using backslash traversal (e.g. \..\..\ secret.txt) bypasses the directory traversal check in Template.__init__ and the posixpath-based normalization in TemplateLookup.get_template(), allowing reads of files outside the configured template directory. This vulnerability is fixed in 1.3.12.
📍 영향받는 시스템
Mako < 1.3.12 (Windows)
⚔️ 공격 벡터
백슬래시 경로 탐색 문자열(예: \..\..\ secret.txt)을 Template 초기화에 전달
🛡️ 대응 방법
Mako를 1.3.12 이상으로 업그레이드
🔧 검증 코드
safe가 출력되면 안전한 버전, vulnerable이면 업그레이드 필요
python -c "import mako; print('safe' if tuple(map(int, mako.__version__.split('.')[:2])) >= (1, 3) else 'vulnerable')" 2>/dev/null || echo 'mako not installed'