CVE-2021-37678CWE-502

Arbitrary code execution due to YAML deserialization

Critical · published August 12, 2021

CVSS v3.1
9.3
EPSS
0%
Percentile
37.9
In the wild
Unconfirmed
What it is

🚨 TensorFlow's YAML handling is a potential ticking time bomb! An attacker can execute arbitrary code just by sneaking in a crafty Keras model in YAML format. 🔥 Think of it like a chef blindly following a recipe that includes a secret ingredient nobody checked — if it's poison, the whole meal goes bad. In this case, the YAML input can lead to catastrophic consequences just by being misused! This vulnerability allows an attacker to craft a malicious Keras model that, when deserialized, can execute any code on the server — a nightmarish scenario! It’s like opening your front door to an uninvited guest who can then wreak havoc throughout your home, including accessing sensitive data or altering models.

Put simply

Think of it like a chef blindly following a recipe that includes a secret ingredient nobody checked — if it's poison, the whole meal goes bad. In this case, the YAML input can lead to catastrophic consequences just by being misused! The issue arises from the use of `yaml.unsafe_load`, which can lead to arbitrary code execution when deserializing untrusted YAML inputs in TensorFlow and Keras. This flaw exists in multiple versions, making it crucial to patch.

What to do

This vulnerability allows an attacker to craft a malicious Keras model that, when deserialized, can execute any code on the server — a nightmarish scenario! It’s like opening your front door to an uninvited guest who can then wreak havoc throughout your home, including accessing sensitive data or altering models. To protect yourself, upgrade to TensorFlow 2.6.0 or apply the fix from commit 23d6383eb6c14084a8fc3bdf164043b974818012 to versions 2.5.1, 2.4.3, and 2.3.4. Review any YAML models you're using and ensure they're sanitized before loading. Don’t wait on this one! You've got this! Follow these steps and lock down your TensorFlow setup. 🛡️

The record
Technical detail
CVSS v3.1
9.3 · CRITICAL
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00447 · 37.9th percentile
Weakness
CWE-502 · Deserialization of Untrusted Data
Published
2021-08-12T23:05Z
EPSS history
Timeline
  • 12 AUG 23:05Z
    Arbitrary code execution due to YAML deserialization
    cvelistv5