PT-2026-59956 · Pypi · Tensorflow-Cpu

Published

2026-07-09

·

Updated

2026-07-09

CVSS v3.1

5.5

Medium

VectorAV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Impact

The implementation of [tf.raw ops.UnsortedSegmentJoin](https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/unsorted segment join op.cc#L83-L148) does not fully validate the input arguments. This results in a CHECK-failure which can be used to trigger a denial of service attack:
python
import tensorflow as tf

tf.strings.unsorted segment join(
 inputs=['123'],
 segment ids=[0],
 num segments=-1)
The code assumes num segments is a positive scalar but there is no validation:
cc
const Tensor& num segments tensor = context->input(2);
auto num segments = num segments tensor.scalar<NUM SEGMENTS TYPE>()();
// ...
Tensor* output tensor = nullptr;
TensorShape output shape =
  GetOutputShape(input shape, segment id shape, num segments);
Since this value is used to allocate the output tensor, a negative value would result in a CHECK-failure (assertion failure), as per TFSA-2021-198.

Patches

We have patched the issue in GitHub commit 84563f265f28b3c36a15335c8b005d405260e943 and GitHub commit 20cb18724b0bf6c09071a3f53434c4eec53cc147.
The fix will be included in TensorFlow 2.9.0. We will also cherrypick this commit on TensorFlow 2.8.1, TensorFlow 2.7.2, and TensorFlow 2.6.4, as these are also affected and still in supported range.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

This vulnerability has been reported externally via a GitHub issue.

Fix

Found an issue in the description? Have something to add? Feel free to write us 👾

Related Identifiers

PYSEC-2026-3342

Affected Products

Tensorflow-Cpu