-
CVSS Score
-| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| tensorflow | pip | < 2.7.2 | 2.7.2 |
| tensorflow | pip | >= 2.8.0, < 2.8.1 | 2.8.1 |
| tensorflow | pip | >= 2.9.0, < 2.9.1 | 2.9.1 |
| tensorflow-cpu | pip | < 2.7.2 | 2.7.2 |
| tensorflow-cpu | pip | >= 2.8.0, < 2.8.1 | 2.8.1 |
| tensorflow-cpu | pip | >= 2.9.0, < 2.9.1 | 2.9.1 |
| tensorflow-gpu | pip | < 2.7.2 | 2.7.2 |
| tensorflow-gpu | pip | >= 2.8.0, < 2.8.1 | 2.8.1 |
| tensorflow-gpu | pip | >= 2.9.0, < 2.9.1 | 2.9.1 |
The vulnerability stems from improper input validation in QuantizeDownAndShrinkRangeOp's Compute method. The commit diff shows the patched code added explicit rank checks (TensorShapeUtils::IsScalar) for input_min/input_max tensors, which were previously missing. The original code assumed scalar inputs by directly accessing tensor values at index 0, which would fail catastrophically with empty or multi-dimensional tensors. The provided PoC demonstrates this by passing rank-0 (empty) and rank-1 tensors for these parameters. The CWE-20 classification and patch focus on input validation confirm this function as the vulnerability source.