CVE-2021-29529

Description

TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a heap buffer overflow in `tf.raw_ops.QuantizedResizeBilinear` by manipulating input values so that float rounding results in off-by-one error in accessing image elements. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/44b7f486c0143f68b56c34e2d01e146ee445134a/tensorflow/core/kernels/quantized_resize_bilinear_op.cc#L62-L66) computes two integers (representing the upper and lower bounds for interpolation) by ceiling and flooring a floating point value. For some values of `in`, `interpolation->upper[i]` might be smaller than `interpolation->lower[i]`. This is an issue if `interpolation->upper[i]` is capped at `in_size-1` as it means that `interpolation->lower[i]` points outside of the image. Then, in the interpolation code(https://github.com/tensorflow/tensorflow/blob/44b7f486c0143f68b56c34e2d01e146ee445134a/tensorflow/core/kernels/quantized_resize_bilinear_op.cc#L245-L264), this would result in heap buffer overflow. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

Severity
LOW
CVSS v3
2.5
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L · source cna
Exploit chance (EPSS)
0.251%
chance of exploitation in the next 30 days
higher than 16.6% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
Yes
Exploit references (NVD and CNA): 1
Metasploit modules: 0
Nuclei templates: 0

Weakness

Timeline

  1. 2021-05-14Published by the CNA19:12 UTC
  2. 2021-05-21GitHub advisory published (GHSA-jfp7-4j67-8r3q)7 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-jfp7-4j67-8r3q, affected packages:

PackageVulnerable versionsFixed in
PyPI tensorflowbefore 2.1.42.1.4
PyPI tensorflowfrom 2.2.0 before 2.2.32.2.3
PyPI tensorflowfrom 2.3.0 before 2.3.32.3.3
PyPI tensorflowfrom 2.4.0 before 2.4.22.4.2
PyPI tensorflow-cpubefore 2.1.42.1.4

7 more affected packages in the advisory.

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
google tensorflowbefore 2.1.4fixed in 2.1.4from 2.2.0 before 2.2.3fixed in 2.2.3from 2.3.0 before 2.3.3fixed in 2.3.3from 2.4.0 before 2.4.2fixed in 2.4.22.1.42.2.32.3.32.4.2

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources