🇰🇷 한글 설명
python-tuf의 클라이언트 구현체에서 rolename을 사용하여 파일명을 생성할 때 경로 탐색(Path Traversal) 취약점이 발생합니다. 공격자가 조작된 rolename을 사용하면 클라이언트 시스템 내의 임의의 .json 파일을 덮어쓸 수 있습니다. 이 취약점은 python-tuf 0.19 버전 이상에서 수정되었습니다.
💡 쉬운 설명
프로그램이 파일 이름을 만들 때 보안 검사를 제대로 하지 않아, 공격자가 파일 경로를 조작해 시스템의 중요한 파일을 망가뜨릴 수 있는 문제입니다. 파일 이름에 '상위 폴더로 이동'하는 특수 문자를 넣어 엉뚱한 위치에 파일을 저장하게 만드는 방식입니다.
🇺🇸 원문 (English)
python-tuf is a Python reference implementation of The Update Framework (TUF). In both clients (`tuf/client` and `tuf/ngclient`), there is a path traversal vulnerability that in the worst case can overwrite files ending in `.json` anywhere on the client system on a call to `get_one_valid_targetinfo()`. It occurs because the rolename is used to form the filename, and may contain path traversal characters (ie `../../name.json`). The impact is mitigated by a few facts: It only affects implementations that allow arbitrary rolename selection for delegated targets metadata, The attack requires the ability to A) insert new metadata for the path-traversing role and B) get the role delegated by an existing targets metadata, The written file content is heavily restricted since it needs to be a valid, signed targets file. The file extension is always .json. A fix is available in version 0.19 or newer. There are no workarounds that do not require code changes. Clients can restrict the allowed character set for rolenames, or they can store metadata in files named in a way that is not vulnerable: neither of these approaches is possible without modifying python-tuf.
📍 영향받는 시스템
python-tuf 0.19 미만 버전 (tuf/client 및 tuf/ngclient 포함)
⚔️ 공격 벡터
조작된 rolename(예: ../../name.json)을 포함한 메타데이터를 삽입하여 시스템 내 임의의 .json 파일 덮어쓰기
🛡️ 대응 방법
python-tuf를 0.19 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 0.19 미만이면 취약한 상태이며, 0.19 이상이면 안전합니다.
pip show python-tuf | grep Version