CVE-2021-37665: TensorFlow CPU - Incomplete Validation in MKL Implementation of Requantization

tensorflow-cpu Updated 02 Oct 2025

Summary

12/08/2021
Yes i
Unrated
Not published

CVE-2021-37665: TensorFlow is an end-to-end open source platform for machine learning. Affects tensorflow-cpu across 4 version ranges.

>= 2.3.0, < 2.3.4 >= 2.4.0, < 2.4.3 < 9e62869465573cb2d9b5053f1fa02a81fce21d69 < 203214568f5bc237603dbab6e1fd389f1572f5c9

Fixed in 2.3.4 or 2.4.3, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2021-37665 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an end-to-end open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and community resources that enable researchers and developers to build and deploy machine learning models. TensorFlow is widely used in various domains, including computer vision, natural language processing, and reinforcement learning. The TensorFlow CPU package is a Python package that provides CPU support for TensorFlow. It allows users to run TensorFlow models on CPUs without the need for specialized hardware. However, the package is vulnerable to an incomplete validation issue in the MKL (Math Kernel Library) implementation of requantization.

Vulnerability Detail

The vulnerability in TensorFlow CPU arises from incomplete validation in the MKL implementation of requantization. This can lead to undefined behavior, such as triggering a null pointer reference or accessing data outside the bounds of heap allocated arrays. The issue is caused by the lack of dimension validation in the input tensor in the mkl_requantization_range_per_channel_op.cc and mkl_requantize_per_channel_op.cc files. An attacker can exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition. The vulnerability affects versions 2.3.0 to 2.3.4, 2.4.0 to 2.4.3, and 2.5.1, and has been patched in commits 9e62869465573cb2d9b5053f1fa02a81fce21d69 and 203214568f5bc237603dbab6e1fd389f1572f5c9 on the TensorFlow GitHub repository.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.3.0, < 2.3.4 2.3.4
    pip install --upgrade "tensorflow-cpu==2.3.4"
  • >= 2.4.0, < 2.4.3 2.4.3
    pip install --upgrade "tensorflow-cpu==2.4.3"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Conclusion

The incomplete validation vulnerability in the MKL implementation of requantization in TensorFlow CPU can have severe consequences, including arbitrary code execution and denial-of-service attacks. It is crucial to update the TensorFlow CPU package to version 2.6.0 or later to address this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow CPU is a Python package that provides CPU support for TensorFlow, allowing users to run TensorFlow models on CPUs without specialized hardware.

MKL stands for Math Kernel Library. It is a highly optimized, threaded, and vectorized math library for Intel processors. TensorFlow uses MKL for efficient numerical computations on CPUs.

Requantization is a process in machine learning that involves converting the numerical values of tensors to a different scale or precision. It is commonly used in quantized neural networks to reduce memory usage and improve inference performance.

This vulnerability can be exploited by an attacker to execute arbitrary code or cause a denial-of-service condition. It may lead to the compromise of sensitive data, unauthorized access, or disruption of services.

No, only versions 2.3.0 to 2.3.4, 2.4.0 to 2.4.3, and 2.5.1 are affected. It is recommended to update to version 2.6.0 or later to mitigate the vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.3.0, < 2.3.4 2.3.4
    pip install --upgrade "tensorflow-cpu==2.3.4"
  • >= 2.4.0, < 2.4.3 2.4.3
    pip install --upgrade "tensorflow-cpu==2.4.3"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback