TensorFlow is an open source platform for machine learning. The ScatterNd function takes an input argument that determines the indices of of the output tensor. An input index greater than the output tensor or less than zero will either write content at the wrong index or trigger a crash. We have patched the issue in GitHub commit b4d4b4cb019bd7240a52daa4ba61e3cc814f0384. 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.
{
"cwe_ids": [
"CWE-787"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35939.json",
"unresolved_ranges": [
{
"source": "AFFECTED_FIELD",
"extracted_events": [
{
"fixed": "2.7.2"
},
{
"introduced": "2.8.0"
},
{
"fixed": "2.8.1"
},
{
"introduced": "2.9.0"
},
{
"fixed": "2.9.1"
}
]
}
]
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-35939.json"
[
{
"source": "https://github.com/tensorflow/tensorflow/commit/b4d4b4cb019bd7240a52daa4ba61e3cc814f0384",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"function_hash": "88660301675476796987106789204566207692",
"length": 1111.0
},
"id": "CVE-2022-35939-0153728c",
"target": {
"function": "EvalScatterNd",
"file": "tensorflow/lite/kernels/scatter_nd.cc"
},
"deprecated": false
},
{
"source": "https://github.com/tensorflow/tensorflow/commit/b4d4b4cb019bd7240a52daa4ba61e3cc814f0384",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"function_hash": "32509588709423475834545933470134783761",
"length": 360.0
},
"id": "CVE-2022-35939-04762d60",
"target": {
"function": "ScatterNd",
"file": "tensorflow/lite/kernels/scatter_nd.cc"
},
"deprecated": false
},
{
"source": "https://github.com/tensorflow/tensorflow/commit/b4d4b4cb019bd7240a52daa4ba61e3cc814f0384",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"line_hashes": [
"10196311572858101780425223704561390610",
"45697305920059453530634393722303556034",
"236490789027345679493283741390057876193",
"116353466209209729662383319668547981316",
"200251332102716127826012960462443570343",
"275636612688260052826882022987141613522",
"11029614242285074530640626585401838389",
"82620988280291628029476066076046124610",
"276738631086406156360494321765525189727",
"19107259462648352921105062884498519331",
"176658947424168961074802982904132393810",
"267170417384166334364145318594245866351",
"202726233261045615230415275968255480784",
"324819243310478030798019493943461092798",
"227018572287402934403161262872459362348",
"95530594372275132608474369312982810230",
"99950477556478742351407092705421175287",
"233969252416853689137423489511209408143",
"317852061953778372402785701150268431405",
"119633777497000573685443587951206376549",
"305754392444422199397154104763848096124",
"155031258370045576134347739408892796081",
"308106827666253246504241270368847144490"
],
"threshold": 0.9
},
"id": "CVE-2022-35939-191ff65c",
"target": {
"file": "tensorflow/lite/kernels/internal/reference/reference_ops.h"
},
"deprecated": false
},
{
"source": "https://github.com/tensorflow/tensorflow/commit/b4d4b4cb019bd7240a52daa4ba61e3cc814f0384",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"line_hashes": [
"51568937280560153342134762461145558414",
"188775624416912301116912723096519677099"
],
"threshold": 0.9
},
"id": "CVE-2022-35939-a8d42015",
"target": {
"file": "tensorflow/lite/kernels/scatter_nd_test.cc"
},
"deprecated": false
},
{
"source": "https://github.com/tensorflow/tensorflow/commit/b4d4b4cb019bd7240a52daa4ba61e3cc814f0384",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"line_hashes": [
"224969615451382106808207559055152142598",
"318300074076033700489901260723564015632",
"91212143163786873414254318443748426244",
"111635074559468297971941614567635041031",
"281561786052698297746473258601574691442",
"197161479606035535991192516007617578856",
"134069285108961910101943912031472885829",
"196702361935610974018083101901823475258",
"63220347239335160562084448647137206999",
"313840063478534468599531197525695597275",
"98377798761930441413281494252269947886",
"204929776440175475607624903482587015656",
"3161742314842891310153388891027804217",
"244705346665294102297837329520404425739",
"177490565427480251282156747473036269472",
"313413136272521670660814125413972958636",
"80135961914300675743579199277311021396",
"332835132938461562112750991141379468902",
"336997009910258421872965734553783686441",
"73296640617457467559758845766962742496",
"174791989325548425629586687226716017229",
"105450201647304767284336170343690508294",
"278689795811493671589368890752316851722",
"174881256008609007835669730583506852590",
"221625177443754996529281756772639267561",
"135696461055770317401655174654200494082",
"259102109367751664907623770371108055665",
"161950358800164199403971349962480623146",
"21760561344547475538506474086811147310",
"149670965336767361446680407152563024758"
],
"threshold": 0.9
},
"id": "CVE-2022-35939-d697a4aa",
"target": {
"file": "tensorflow/lite/kernels/scatter_nd.cc"
},
"deprecated": false
},
{
"source": "https://github.com/tensorflow/tensorflow/commit/b4d4b4cb019bd7240a52daa4ba61e3cc814f0384",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"function_hash": "238979639184525859867466769723278544910",
"length": 1121.0
},
"id": "CVE-2022-35939-e67c485a",
"target": {
"function": "ScatterNd",
"file": "tensorflow/lite/kernels/internal/reference/reference_ops.h"
},
"deprecated": false
}
]
"2026-08-05T09:01:45Z"