Miggo Logo

CVE-2022-35993: TensorFlow vulnerable to `CHECK` fail in `SetSize`

5.9

CVSS Score
3.1

Basic Information

EPSS Score
0.41264%
Published
9/16/2022
Updated
1/28/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
tensorflowpip< 2.7.22.7.2
tensorflowpip>= 2.8.0, < 2.8.12.8.1
tensorflowpip>= 2.9.0, < 2.9.12.9.1
tensorflow-cpupip< 2.7.22.7.2
tensorflow-cpupip>= 2.8.0, < 2.8.12.8.1
tensorflow-cpupip>= 2.9.0, < 2.9.12.9.1
tensorflow-gpupip< 2.7.22.7.2
tensorflow-gpupip>= 2.8.0, < 2.8.12.8.1
tensorflow-gpupip>= 2.9.0, < 2.9.12.9.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper input validation in SparseTensorFromContext when handling the 'set_shape' parameter. The commit diff shows added validation for tensor dimensionality (checking dims() != 1), and the test case demonstrates triggering via invalid shape input to SetSize. The CWE-617 (Reachable Assertion) classification confirms this is an assertion failure scenario. The function is directly responsible for processing the vulnerable 'set_shape' parameter in SetSize operations.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t W**n `S*tSiz*` r***iv*s *n input `s*t_s**p*` t**t is not * ** t*nsor, it *iv*s * `****K` **ils t**t **n ** us** to tri***r * **ni*l o* s*rvi** *tt**k. ```pyt*on import t*nsor*low *s t* *r*_*=* *r*_*=[*,*] *r*_*=* *r*_*=Tru* *r*_*='' t*.r*w

Reasoning

T** vuln*r**ility st*ms *rom improp*r input v*li**tion in Sp*rs*T*nsor*rom*ont*xt w**n **n*lin* t** 's*t_s**p*' p*r*m*t*r. T** *ommit *i** s*ows ***** v*li**tion *or t*nsor *im*nsion*lity (****kin* *ims() != *), *n* t** t*st **s* **monstr*t*s tri***r
CVE-2022-35993: TensorFlow raw_ops SetSize DoS | Miggo