tensorflow@2.9.2 vulnerabilities

TensorFlow is an open source machine learning framework for everyone.

Direct Vulnerabilities

Known vulnerabilities in the tensorflow package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Integer Overflow or Wraparound

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Integer Overflow or Wraparound due to the array_ops.upper_bound function. An attacker can cause a denial of service by providing input that is not a rank 2 tensor.

How to fix Integer Overflow or Wraparound?

Upgrade tensorflow to version 2.12.0 or higher.

[,2.12.0)
  • M
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) due to a malicious invalid input with zero dimension, which crashes a TensorFlow model (Check Failed).

Note: An attacker must have privilege to provide input to a Convolution3DTranspose call.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.11.1 or higher.

[,2.11.1)
  • H
Heap-based Buffer Overflow

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Heap-based Buffer Overflow. Attackers can access heap memory which is not in the control of user, leading to a crash or remote code execution. The fix will be included in TensorFlow version 2.12.0 and will also cherrypick this commit on TensorFlow version 2.11.1.

How to fix Heap-based Buffer Overflow?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
NULL Pointer Dereference

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to NULL Pointer Dereference when SparseSparseMaximum is given invalid sparse tensors as inputs.

How to fix NULL Pointer Dereference?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) when running with XLA, tf.raw_ops.ParallelConcat segfaults with a nullptr dereference when given a parameter shape with rank that is not greater than zero.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
NULL Pointer Dereference

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to NULL Pointer Dereference due to a null pointer error in RandomShuffle with XLA enabled.

How to fix NULL Pointer Dereference?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) due to a floating point exception in TensorListSplit with XLA.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
NULL Pointer Dereference

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to NULL Pointer Dereference. The function tf.raw_ops.LookupTableImportV2 cannot handle scalars in the values parameter and gives a null pointer exception.

How to fix NULL Pointer Dereference?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Incorrect Comparison

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Incorrect Comparison. Constructing a tflite model with a paramater filter_input_channel of less than 1 gives a float pointer exception.

How to fix Incorrect Comparison?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS). When running with XLA, tf.raw_ops.Bincount segfaults when given a parameter weights that is neither the same shape as parameter arr nor a length-0 tensor.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Buffer Overflow

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Buffer Overflow in TAvgPoolGrad.

How to fix Buffer Overflow?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Integer Overflow to Buffer Overflow

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Integer Overflow to Buffer Overflow when 2^31 <= num_frames * height * width * channels < 2^32, for example Full HD screencast of at least 346 frames.

How to fix Integer Overflow to Buffer Overflow?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Integer Overflow or Wraparound

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Integer Overflow or Wraparound in EditDistance. A fix is included in TensorFlow version 2.12.0 and version 2.11.1.

How to fix Integer Overflow or Wraparound?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Out-of-Bounds

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Out-of-Bounds due to mismatched integer type sizes in ValueMap::Manager::GetValueOrCreatePlaceholder, because there is a bug with the tfg-translate call to InitMlir.

How to fix Out-of-Bounds?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) due to a floating point exception if the stride and window size are not positive for tf.raw_ops.AvgPoolGrad.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
NULL Pointer Dereference

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to NULL Pointer Dereference. When ctx->step_containter() is a null ptr, the Lookup function will be executed with a null pointer.

How to fix NULL Pointer Dereference?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS). When the parameter summarize of tf.raw_ops.Print is zero, the new method SummarizeArray<bool> will reference to a nullptr, leading to a seg fault.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Double Free

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Double Free. The nn_ops.fractional_avg_pool_v2 and nn_ops.fractional_max_pool_v2 functions require the first and fourth elements of their parameter pooling_ratio to be equal to 1.0, as pooling on batch and channel dimensions is not supported.

How to fix Double Free?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • M
NULL Pointer Dereference

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to NULL Pointer Dereference in QuantizedMatMulWithBiasAndDequantize with MKL enabled.

How to fix NULL Pointer Dereference?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) due to a floating point exception in AudioSpectrogram.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Out-of-bounds Read

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Out-of-bounds Read if the parameter indices for DynamicStitch does not match the shape of the parameter data.

How to fix Out-of-bounds Read?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • H
Out-of-bounds Read

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Out-of-bounds Read in GRUBlockCellGrad.

How to fix Out-of-bounds Read?

Upgrade tensorflow to version 2.11.1, 2.12.0 or higher.

[,2.11.1) [2.12.0rc0,2.12.0)
  • M
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) due to another discovered instance of CVE-2022-35991, in TensorListScatter and TensorListScatterV2 via non scalar inputs.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1)
  • H
Heap-based Buffer Overflow

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Heap-based Buffer Overflow in QuantizeAndDequantizeV2, via the MakeGrapplerFunctionItem function, if the inputs are greater than or equal to the sizes of outputs.

How to fix Heap-based Buffer Overflow?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1)
  • H
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) due to another discovered instance of CVE-2022-35935 in SobolSample via assumed scalar inputs.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1)
  • H
Out-of-bounds Write

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Out-of-bounds Write via the MakeGrapplerFunctionItem function, if the inputs given are greater than or equal to the sizes of the outputs.

How to fix Out-of-bounds Write?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1)
  • M
Out-of-Bounds

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Out-of-Bounds in DynamicStitch due to missing validation when it receives a differing number of inputs, such as when it is called with an indices size 1 and a data size 2.

How to fix Out-of-Bounds?

Upgrade tensorflow to version 2.10.1, 2.11.0 or higher.

[,2.10.1) [2.11.0rc0,2.11.0)
  • L
Always-Incorrect Control Flow Implementation

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Always-Incorrect Control Flow Implementation when a numpy array is created with a shape such that one element is zero and the sum of others is a large number.

How to fix Always-Incorrect Control Flow Implementation?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Buffer Overflow

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Buffer Overflow via tf.raw_ops.ImageProjectiveTransformV2 when a large output shape is given.

How to fix Buffer Overflow?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • M
Incorrect Calculation of Buffer Size

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Incorrect Calculation of Buffer Size via tf.keras.losses.poisson which receives a y_pred and y_true that are passed through functor::mul in BinaryOp. If the resulting dimensions overflow an int32, TensorFlow will crash due to a size mismatch during broadcast assignment.

How to fix Incorrect Calculation of Buffer Size?

Upgrade tensorflow to version 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • M
Out-of-bounds Read

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Out-of-bounds Read when the BaseCandidateSamplerOp function receives a value in true_classes larger than range_max.

How to fix Out-of-bounds Read?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Buffer Overflow

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Buffer Overflow via tf.raw_ops.FusedResizeAndPadConv2D when a large tensor shape is given.

How to fix Buffer Overflow?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Incorrect Calculation of Buffer Size

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Incorrect Calculation of Buffer Size when tf.raw_ops.ResizeNearestNeighborGrad is given a large size input.

How to fix Incorrect Calculation of Buffer Size?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Improper Input Validation

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Improper Input Validation due to a missing check of tf.image.generate_bounding_box_proposals that receives a scores input that must be of rank 4 when running on GPU.

How to fix Improper Input Validation?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • M
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) because the conversions from char to bool are undefined if the char is not 0 or 1. This can happen when printing a tensor: the data is got as a const char* array and then it is typecasted to the element type.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) when ThreadUnsafeUnigramCandidateSampler is given input filterbank_channel_count greater than the allowed max size.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Reachable Assertion

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Reachable Assertion when tf.raw_ops.TensorListResize is given a nonscalar value for input size. It will results in a CHECK fail which can be used to trigger a denial of service attack.

How to fix Reachable Assertion?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Out-of-bounds Read

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Out-of-bounds Read. This is If MirrorPadGrad is given outsize input paddings.

How to fix Out-of-bounds Read?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) when FractionMaxPoolGrad is given outsize inputs row_pooling_sequence and col_pooling_sequence.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) when tf.raw_ops.TensorListConcat is given element_shape=[].

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) when BCast::ToShape is given input larger than an int32, even if it is being supposed to handle up to an int64.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
NULL Pointer Dereference

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to NULL Pointer Dereference because the pywrap code fails to parse the tensor and returns a nullptr if a list of quantized tensors is assigned to an attribute.

How to fix NULL Pointer Dereference?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • M
Buffer Overflow

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Buffer Overflow. The reference kernel of the CONV_3D_TRANSPOSE TensorFlow Lite operator wrongly increments the data_ptr when adding the bias to the result. Instead of data_ptr += num_channels; it should be data_ptr += output_num_channels; as if the number of input channels is different than the number of output channels, the wrong result will be returned and a buffer overflow will occur if num_channels > output_num_channels. An attacker can craft a model with a specific number of input channels. It is then possible to write specific values through the bias of the layer outside the bounds of the buffer.

Note: This attack only works if the reference kernel resolver is used in the interpreter.

How to fix Buffer Overflow?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) when an input encoded is not a valid CompositeTensorVariant tensor. This will trigger a segfault in tf.raw_ops.CompositeTensorVariantToComponents.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS). This is vulnerable when an input token that is not a UTF-8 bytestring will trigger a CHECK fail in tf.raw_ops.PyFunc.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • H
Out-of-bounds Write

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Out-of-bounds Write in FractionalMax(AVG)Pool with illegal pooling_ratio. Attackers can access heap memory that is not in the user's control, leading to a crash or remote code execution.

How to fix Out-of-bounds Write?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) when SparseFillEmptyRowsGrad is given empty inputs.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS) when the input sparse_matrix is not a matrix with a shape with rank 0. As a result, a CHECK fail will be triggered in tf.raw_ops.SparseMatrixNNZ.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • L
Denial of Service (DoS)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Denial of Service (DoS). This is due to the inputs dense_features or example_state_data not being of rank 2 which will trigger a CHECK fail in SdcaOptimizer.

How to fix Denial of Service (DoS)?

Upgrade tensorflow to version 2.8.4, 2.9.3, 2.10.1, 2.11.0 or higher.

[,2.8.4) [2.9.0,2.9.3) [2.10.0,2.10.1) [2.11.0rc0,2.11.0)
  • C
Arbitrary File Write via Archive Extraction (Zip Slip)

tensorflow is a machine learning framework.

Affected versions of this package are vulnerable to Arbitrary File Write via Archive Extraction (Zip Slip) via a crafted archive when tf.keras.utils.get_file is used with extract=True.

NOTE: This CVE is disputed as the vendor's position is that tf.keras.utils.get_file is not intended for untrusted archives. However, we feel this advisory is relevant as at the time of publication, there is no known security notice or documentation warning users of this behavior.

UPDATE: With the addition of a clear warning to the API documentation on Feb 23, 2023, this issue is considered fixed.

How to fix Arbitrary File Write via Archive Extraction (Zip Slip)?

Upgrade tensorflow to version 2.12.0rc1 or higher.

[,2.12.0rc1)