CVE-2021-37678Deserialization of Untrusted Data in Tensorflow

Severity
8.8HIGHNVD
CNA9.3
EPSS
1.0%
top 22.71%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedAug 12
Latest updateMar 12

Description

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

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HExploitability: 2.0 | Impact: 6.0

Affected Packages3 packages

NVDgoogle/tensorflow2.3.02.3.4+3
CVEListV5tensorflow/tensorflow< 2.3.4+2
PyPIintel/optimization_for_tensorflow2.4.02.4.3+4

Patches

🔴Vulnerability Details

4
GHSA
Arbitrary code execution due to YAML deserialization2021-08-25
OSV
Arbitrary code execution due to YAML deserialization2021-08-25
OSV
CVE-2021-37678: TensorFlow is an end-to-end open source platform for machine learning2021-08-12
CVEList
Arbitrary code execution due to YAML deserialization2021-08-12

📋Vendor Advisories

1
Debian
CVE-2021-37678: tensorflow - TensorFlow is an end-to-end open source platform for machine learning. In affect...2021

📄Research Papers

3
arXiv
On the (In)Security of Loading Machine Learning Models2026-03-12
arXiv
ZeroDayBench: Evaluating LLM Agents on Unseen Zero-Day Vulnerabilities for Cyberdefense2026-03-02
arXiv
Threat Assessment in Machine Learning based Systems2022-06-30
CVE-2021-37678 — Deserialization of Untrusted Data | cvebase