🔍 CVE-2025-12060

0.0
CVSS Score
UNKNOWN
2025-10-30
2026-10-19 13:10
✅ 완료

🇰🇷 한글 설명

Keras의 get_file API는 tar 아카이브를 추출할 때 Python의 tarfile.extractall 함수를 filter="data" 옵션 없이 사용하여 경로 순회 취약점이 발생합니다. 악의적인 심볼링크가 포함된 tar 파일을 통해 의도된 폴더 외부의 임의의 위치에 파일을 쓸 수 있습니다.

💡 쉬운 설명

Keras 라이브러리에서 압축 파일을 풀 때 나쁜 사람이 조작한 파일을 통해 컴퓨터의 다른 폴더에 악성 파일을 심을 수 있습니다. Keras 버전을 업그레이드하면 이 문제를 해결할 수 있습니다.

🇺🇸 원문 (English)

The keras.utils.get_file API in Keras, when used with the extract=True option for tar archives, is vulnerable to a path traversal attack. The utility uses Python's tarfile.extractall function without the filter="data" feature. A remote attacker can craft a malicious tar archive containing special symlinks, which, when extracted, allows them to write arbitrary files to any location on the filesystem outside of the intended destination folder. This vulnerability is linked to the underlying Python tarfile weakness, identified as CVE-2025-4517. Note that upgrading Python to one of the versions that fix CVE-2025-4517 (e.g. Python 3.13.4) is not enough. One additionally needs to upgrade Keras to a version with the fix (Keras 3.12).

📍 영향받는 시스템

Keras 3.12 미만 버전 (Python 버전 업그레이드만으로는 해결 안됨)

⚔️ 공격 벡터

악의적인 심볼링크가 포함된 tar 아카이브를 원격에서 제공하여 extract=True 옵션으로 추출 시 파일시스템 임의 위치에 파일 쓰기 공격

🛡️ 대응 방법

Keras를 3.12 이상으로 업그레이드

🔧 검증 코드

설치된 Keras 버전이 3.12 미만이면 'Vulnerable', 3.12 이상이면 'Patched'로 표시됩니다.

Shell / Script
python3 -c "import keras; print(keras.__version__)" | grep -E '^(3\.(1[2-9]|[2-9][0-9])|[4-9]\.)' && echo 'Vulnerable' || echo 'Patched'

💻 영향받는 소프트웨어

Python