TensorFlow, an open-source machine learning and artificial intelligence project provided by Google, has already given up support for YAML. The reason for the abandonment is that there may be security issues in continuing to support YAML. In the latest version, Google removes YAML support to solve the problem of untrusted deserialization vulnerability execution. The vulnerability number is CVE-2021-37678. The severity level is high and the CVSS score is 9.3. It was submitted to Google by researcher Arjun Shibu.
YAML is a more readable format for expressing data serialization. Researchers found that the TensorFlow code loads the yaml.unsafe_load() function, using the flaw, the attacker can execute arbitrary code when the application deserializes the Keras model provided in YAML format. Deserialization vulnerabilities usually occur when applications read malformed or malicious data from untrue sources. The deserialization vulnerability in TensorFlow may lead to DoS denial of service. Worse, this vulnerability can even execute arbitrary code. This is why the CVSS score of this vulnerability reaches 9.3 points (out of 10 points).
In addition, TensorFlow is expected to resolve the vulnerability in version 2.6.0, that is, to remove YAML support. The previous versions of 2.5.1, 2.4.3, and 2.3.4 will also be fixed. Developers who use this project should upgrade to the latest version in time.