🇰🇷 한글 설명
NLTK 3.9.2 이하 버전의 여러 CorpusReader 클래스에서 경로 탐색(Path Traversal)을 통한 임의 파일 읽기 취약점이 발견되었습니다. 공격자는 적절히 검증되지 않은 파일 경로를 이용해 서버 내의 민감한 시스템 파일이나 SSH 키 등에 접근할 수 있습니다.
💡 쉬운 설명
프로그램이 파일 경로를 확인할 때 보안 검사를 제대로 하지 않아, 공격자가 원래 허용되지 않은 폴더의 파일을 몰래 읽을 수 있는 문제입니다. 이를 통해 서버의 중요한 비밀번호나 개인 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
A vulnerability in NLTK versions up to and including 3.9.2 allows arbitrary file read via path traversal in multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. These classes fail to properly sanitize or validate file paths, enabling attackers to traverse directories and access sensitive files on the server. This issue is particularly critical in scenarios where user-controlled file inputs are processed, such as in machine learning APIs, chatbots, or NLP pipelines. Exploitation of this vulnerability can lead to unauthorized access to sensitive files, including system files, SSH private keys, and API tokens, and may potentially escalate to remote code execution when combined with other vulnerabilities.
📍 영향받는 시스템
NLTK versions up to and including 3.9.2
⚔️ 공격 벡터
사용자 입력값이 포함된 파일 경로를 통한 경로 탐색(Path Traversal) 공격
🛡️ 대응 방법
NLTK를 최신 버전(3.9.2 초과 버전)으로 업데이트하거나 입력 파일 경로에 대한 엄격한 검증 로직을 구현하십시오.
🔧 검증 코드
출력된 버전이 3.9.2 이하이면 취약한 상태이며, 3.9.2보다 높으면 안전합니다.
pip show nltk | grep Version