PT-2021-21796 · Google · Tensorflow

Arjun Shibu

·

Published

2021-08-12

·

Updated

2024-03-06

·

CVE-2021-37678

CVSS v3.1

9.3

Critical

VectorAV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions TensorFlow versions prior to 2.6.0 TensorFlow versions 2.5.1 and earlier TensorFlow versions 2.4.3 and earlier TensorFlow versions 2.3.4 and earlier
Description TensorFlow and Keras can be tricked to perform arbitrary code execution when deserializing a Keras model from YAML format. The implementation uses yaml.unsafe load which can perform arbitrary code execution on the input.
Recommendations For versions prior to 2.6.0, update to TensorFlow 2.6.0 or later. For versions 2.5.1 and earlier, update to TensorFlow 2.5.1 or later. For versions 2.4.3 and earlier, update to TensorFlow 2.4.3 or later. For versions 2.3.4 and earlier, update to TensorFlow 2.3.4 or later. As a temporary workaround, consider disabling YAML format support until a patch is available. Restrict access to the models.model from yaml function to minimize the risk of exploitation. Avoid using the yaml.unsafe load function in the affected API endpoint until the issue is resolved.

Exploit

Fix

Deserialization of Untrusted Data

Weakness Enumeration

Related Identifiers

BIT-TENSORFLOW-2021-37678
CVE-2021-37678
GHSA-R6JX-9G48-2R5R
OPENSUSE-SU-2022:10014-1
OPENSUSE-SU-2024:12116-1
PYSEC-2021-300
PYSEC-2021-591
PYSEC-2021-789

Affected Products

Tensorflow