🔍 CVE-2021-37678

9.3
CVSS Score
CRITICAL
2021-08-12
2026-06-17 04:00
✅ 완료

🇰🇷 한글 설명

TensorFlow와 Keras에서 YAML 형식의 모델을 역직렬화할 때 임의의 코드가 실행될 수 있는 취약점이 발견되었습니다. 이는 `yaml.unsafe_load` 함수를 사용하여 입력 데이터를 처리하기 때문에 발생하며, 공격자가 악성 YAML 파일을 통해 시스템 권한을 탈취할 수 있습니다.

💡 쉬운 설명

머신러닝 모델 설정 파일을 읽어오는 과정에서 해커가 심어놓은 위험한 명령어가 컴퓨터에서 자동으로 실행될 수 있는 문제입니다. 신뢰할 수 없는 출처의 모델 파일을 불러올 때 발생할 수 있습니다.

🇺🇸 원문 (English)

TensorFlow is an end-to-end open source platform for machine learning. In affected versions TensorFlow and Keras can be tricked to perform arbitrary code execution when deserializing a Keras model from YAML format. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/python/keras/saving/model_config.py#L66-L104) uses `yaml.unsafe_load` which can perform arbitrary code execution on the input. Given that YAML format support requires a significant amount of work, we have removed it for now. We have patched the issue in GitHub commit 23d6383eb6c14084a8fc3bdf164043b974818012. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

📍 영향받는 시스템

TensorFlow 2.6.0 미만 버전 (2.5.1, 2.4.3, 2.3.4 포함)

⚔️ 공격 벡터

악의적으로 조작된 YAML 형식의 Keras 모델 파일을 시스템에 로드하여 임의 코드 실행

🛡️ 대응 방법

TensorFlow를 2.6.0 이상의 버전으로 업데이트하거나, 패치가 적용된 2.5.1, 2.4.3, 2.3.4 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 버전 번호가 2.6.0 미만인지 확인하여 취약 여부를 판단합니다.

Shell / Script
python3 -c 'import tensorflow as tf; print(tf.__version__)'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

💻 영향받는 소프트웨어

Azure Machine Learning