CVE-2025-12058: 
Python 취약성 분석 및 완화
개요
The Keras.Model.loadmodel method contains a vulnerability (CVE-2025-12058) that allows arbitrary local file loading and Server-Side Request Forgery (SSRF), even when using the intended security mitigation safemode=True. The vulnerability was discovered in October 2025 and affects the StringLookup layer handling during model loading from specially crafted .keras archives (NVD).
기술적 세부 사항
The vulnerability stems from the way the StringLookup layer is handled during model loading. The constructor accepts a vocabulary argument that can specify local or remote file paths. When loading a malicious .keras file with embedded local paths in the StringLookup layer's configuration, Keras attempts to read the specified local file content and incorporate it into the model state. Additionally, since Keras uses tf.io.gfile for file operations which supports remote filesystem handlers (GCS, HDFS) and HTTP/HTTPS protocols, this can be exploited for SSRF attacks. The vulnerability has been assigned a CVSS v4.0 score of 5.9 (Medium) with vector CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:H/VI:L/VA:L/SC:H/SI:L/SA:L (NVD).
영향
The vulnerability has two main impact vectors: 1) Arbitrary Local File Read - attackers can read arbitrary local files on the hosting system through the model state, and 2) Server-Side Request Forgery (SSRF) - attackers can make the server fetch content from arbitrary network endpoints, potentially bypassing network security controls (NVD).
완화 및 해결 방법
A fix has been implemented that modifies StringLookup and IntegerLookup to embed vocabularies loaded from files directly into the .keras model archive, making the archive self-contained and removing dependencies on external vocabulary files. The fix also includes a security check to prevent loading arbitrary files when safe_mode is enabled (Github PR).
추가 자료
근원: 이 보고서는 AI를 사용하여 생성되었습니다.
관련 Python 취약점:
무료 취약성 평가
클라우드 보안 태세를 벤치마킹합니다
9개의 보안 도메인에서 클라우드 보안 관행을 평가하여 위험 수준을 벤치마킹하고 방어의 허점을 식별합니다.
추가 Wiz 리소스
맞춤형 데모 받기
맞춤형 데모 신청하기
"내가 본 최고의 사용자 경험은 클라우드 워크로드에 대한 완전한 가시성을 제공합니다."
"Wiz는 클라우드 환경에서 무슨 일이 일어나고 있는지 볼 수 있는 단일 창을 제공합니다."
"우리는 Wiz가 무언가를 중요한 것으로 식별하면 실제로 중요하다는 것을 알고 있습니다."