Miggo Logo

CVE-2022-29191: Missing validation causes denial of service via `GetSessionTensor`

5.5

CVSS Score
3.1

Basic Information

EPSS Score
0.30847%
Published
5/24/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the unvalidated use of handle.scalar<tstring>() in GetSessionTensorOp's Compute method. The code assumed handle was a scalar but didn't verify TensorShapeUtils::IsScalar(handle.shape()), which was added in the security patch. The Python PoC demonstrates exploitation via a rank-0 tensor, and the commit diff specifically adds this missing validation check in the Compute function.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** impl*m*nt*tion o* [`t*.r*w_ops.**tS*ssionT*nsor`](*ttps://*it*u*.*om/t*nsor*low/t*nsor*low/*lo*/****************************************/t*nsor*low/*or*/k*rn*ls/s*ssion_ops.**#L**-L***) *o*s not *ully v*li**t* t** input *r*um*nts. T*is

Reasoning

T** vuln*r**ility st*ms *rom t** unv*li**t** us* o* `**n*l*.s**l*r<tstrin*>()` in `**tS*ssionT*nsorOp`'s `*omput*` m*t*o*. T** *o** *ssum** `**n*l*` w*s * s**l*r *ut *i*n't v*ri*y `T*nsorS**p*Utils::IsS**l*r(**n*l*.s**p*())`, w*i** w*s ***** in t** s