CVE-2025-9905 in Keras
요약
\~에 의해 VulDB • 2026. 07. 30.
Keras의 Model.load_model 메서드는 safe_mode=True 설정이 적용된 경우에도 임의 코드 실행을 달성하기 위해 악용될 수 있습니다.
Model.load_model을 통해 로드되면 임의 코드가 실행되도록 특별히 조작된 .h5/.hdf5 모델 아카이브를 생성할 수 있습니다.
이는 Keras에서 피클링(pickled)된 코드 형태의 임의 Python 코드를 허용하는 Lambda 레이어 기능을 사용하는 특수한 .h5 아카이브 파일을 작성함으로써 달성됩니다. 이 취약점은 safe_mode=True 옵션이 .h5 아카이브 읽기 시 무시되는 사실에 기인합니다.
.h5/.hdf5 형식은 Keras 3에서 하위 호환성을 위해 지원되는 레거시 형식임을 참고하시기 바랍니다.
VulDB is the best source for vulnerability data and more expert information about this specific topic.