CVE-2021-37685
Python vulnerability analysis and mitigation

Overview

TensorFlow, an end-to-end open source platform for machine learning, was found to contain a vulnerability (CVE-2021-37685) in TFLite's expand_dims.cc implementation. The vulnerability was discovered and disclosed in August 2021, affecting TensorFlow versions 2.3.0 through 2.3.4, 2.4.0 through 2.4.3, 2.5.0, and 2.6.0 release candidates (GitHub Advisory).

Technical details

The vulnerability allows reading one element outside of bounds of heap allocated data. When the 'axis' parameter is provided with a large negative value (e.g., -100000), after the initial check it remains negative. The subsequent validation check passes incorrectly, leading to the for loop reading one element before the start of input_dims.data when i = 0. This results in a heap out-of-bounds read vulnerability. The issue has been assigned a CVSS v3.1 Base Score of 5.5 MEDIUM (Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N) (NVD).

Impact

The vulnerability allows attackers to read data outside the bounds of heap allocated memory, potentially exposing sensitive information from the application's memory space (GitHub Advisory).

Mitigation and workarounds

The issue has been patched in GitHub commit d94ffe08a65400f898241c0374e9edc6fa8ed257 and included in TensorFlow 2.6.0. The fix was also backported to TensorFlow versions 2.5.1, 2.4.3, and 2.3.4. Users are recommended to upgrade to these patched versions (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-67511CRITICAL9.6
  • PythonPython
  • cai-framework
NoNoDec 09, 2025
CVE-2025-66645HIGH7.5
  • PythonPython
  • nicegui
NoYesDec 09, 2025
GHSA-9rwj-6rc7-p77cHIGH7.3
  • PythonPython
  • langgraph-checkpoint-sqlite
NoYesDec 10, 2025
CVE-2025-67502MEDIUM5.4
  • PythonPython
  • taguette
NoYesDec 10, 2025
CVE-2025-67485MEDIUM5.3
  • PythonPython
  • mad-proxy
NoNoDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management