TensorFlow is an open source platform for machine learning. The GatherNd function takes arguments that determine the sizes of inputs and outputs. If the inputs given are greater than or equal to the sizes of the outputs, an out-of-bounds memory read is triggered. This issue has been patched in GitHub commit 595a65a3e224a0362d7e68c2213acfc2b499a196. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35937.json",
"cwe_ids": [
"CWE-125"
],
"cna_assigner": "GitHub_M"
}{
"cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
"source": [
"CPE_RANGE",
"REFERENCES"
],
"extracted_events": [
{
"introduced": "2.7.0"
},
{
"fixed": "2.7.2"
},
{
"introduced": "2.8.0"
},
{
"fixed": "2.8.1"
},
{
"introduced": "2.9.0"
},
{
"fixed": "2.9.1"
}
]
}
[
{
"id": "CVE-2022-35937-0058dfdf",
"target": {
"function": "GatherNd",
"file": "tensorflow/lite/kernels/gather_nd.cc"
},
"deprecated": false,
"digest": {
"function_hash": "5582336635074474065535125421207522662",
"length": 357.0
},
"signature_version": "v1",
"source": "https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196",
"signature_type": "Function"
},
{
"id": "CVE-2022-35937-ca979f6a",
"target": {
"file": "tensorflow/lite/kernels/gather_nd_test.cc"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"311277416330119409064812886202797178195",
"272462161769494939553661480694458739556",
"132261558903948867380706469045776990954"
]
},
"signature_version": "v1",
"source": "https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196",
"signature_type": "Line"
},
{
"id": "CVE-2022-35937-ceadf6fe",
"target": {
"function": "EvalGatherNd",
"file": "tensorflow/lite/kernels/gather_nd.cc"
},
"deprecated": false,
"digest": {
"function_hash": "71754428811623220191000347481505916258",
"length": 1153.0
},
"signature_version": "v1",
"source": "https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196",
"signature_type": "Function"
},
{
"id": "CVE-2022-35937-e8acf95c",
"target": {
"function": "GatherNd",
"file": "tensorflow/lite/kernels/internal/reference/reference_ops.h"
},
"deprecated": false,
"digest": {
"function_hash": "51582351497515176334426324685092336318",
"length": 542.0
},
"signature_version": "v1",
"source": "https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196",
"signature_type": "Function"
},
{
"id": "CVE-2022-35937-eeb7d0a7",
"target": {
"file": "tensorflow/lite/kernels/gather_nd.cc"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"319489268034674269356564257310549289787",
"219575398413569432053623071624515980461",
"127013588394099529531765132617156600775",
"135395165283213369109169822552621455040",
"197687435579514443585088415622134928900",
"102929531377009217062980782909235764268",
"50148554513652654730444195399303328270",
"164414835850063536095408034659263664464",
"169100135643610329785849770225557881565",
"203746292561634411658269683911256070916",
"161349445749750300252647058651559340567",
"94719079772156010514922312306306955686",
"70727024204315612874109581712748703413",
"36064993754584108832433138970428628469",
"90681313436896570395144722765733154914",
"322684153374133439717187413979545217435",
"17066868521677568542746907492077073361",
"219947779056418606506964417942162971949",
"248162041520545714717964159361234671120",
"320094175678886037793593697163905300367",
"176826647537295345700877113278851201053",
"74719904999699133307061425034337253923",
"225367846026740493118138789709446139881",
"48294551008088095914701345993406968690",
"217391970139581146413218741779333925663"
]
},
"signature_version": "v1",
"source": "https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196",
"signature_type": "Line"
},
{
"id": "CVE-2022-35937-eeedb997",
"target": {
"file": "tensorflow/lite/kernels/internal/reference/reference_ops.h"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"51809852713179318702305226245307455760",
"223730219420654410978254653104816281084",
"37067845323110335944204139052067103591",
"218681550635134858936789421687906771820",
"291536804117229386310766360080925881563",
"336054178290228206048418637263024959424",
"78152396127377523943638034737014960424",
"63627696470611501211667813394485113372",
"59554358171572665967545283699681337111",
"231799369253609867677324270969534526940",
"127241147953596091335367808333332160816",
"158893449951207146339296536720642819661",
"333863504251852572652840183782349536134",
"245625567984582803776770779217495581692",
"239450746905223060766542183065913064061",
"331532678763735707221714169701402818083",
"109779172391974618066664358283577304788",
"76437584024434387779041898893812652847",
"264297926956797081944763944509773013007",
"218172287489586004492561577067266563407",
"94085290793902343705000446275745790665",
"159910750031684497594705773803750563310",
"168442689803827126133712241536568124415"
]
},
"signature_version": "v1",
"source": "https://github.com/tensorflow/tensorflow/commit/595a65a3e224a0362d7e68c2213acfc2b499a196",
"signature_type": "Line"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-35937.json"
"2026-08-12T13:01:24Z"