{"id":"CVE-2022-29211","published":"2022-05-20T23:20:15Z","modified":"2025-04-22T17:57:17Z","title":"Segfault in TensorFlow if `tf.histogram_fixed_width` is called with NaN values","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.histogram_fixed_width` is vulnerable to a crash when the values array contain `Not a Number` (`NaN`) elements. The implementation assumes that all floating point operations are defined and then converts a floating point result to an integer index. If `values` contains `NaN` then the result of the division is still `NaN` and the cast to `int32` would result in a crash. This only occurs on the CPU implementation. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00321,"percentile":0.25778,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-xrp2-fhq4-4q3w","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/issues/45770","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/commit/e57fd691c7b0fd00ea3bfe43444f30c1969748b5","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cc","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cc#L35-L74","tags":["x_refsource_MISC"]}],"priority":{"score":9.0,"factors":[{"name":"EPSS percentile","points":5.16},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":["< 2.6.4",">= 2.7.0rc0, < 2.7.2",">= 2.8.0rc0, < 2.8.1",">= 2.9.0rc0, < 2.9.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-22T15:46:24.583209Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.6.4",">=2.7.0, <2.7.2",">=2.8.0, <2.8.1"],"patched":["2.6.4","2.7.2","2.8.1"],"from":["GHSA-xrp2-fhq4-4q3w","PYSEC-2026-3260"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.6.4",">=2.7.0, <2.7.2",">=2.8.0, <2.8.1"],"patched":["2.6.4","2.7.2","2.8.1"],"from":["GHSA-xrp2-fhq4-4q3w","PYSEC-2026-3382"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.6.4",">=2.7.0, <2.7.2",">=2.8.0, <2.8.1"],"patched":["2.6.4","2.7.2","2.8.1"],"from":["GHSA-xrp2-fhq4-4q3w","PYSEC-2026-1048"],"provenance":"source"}],"summary":{"text":"The flaw is in TensorFlow's tf.histogram_fixed_width function, where the CPU implementation mishandles input arrays containing NaN values by converting a NaN floating-point result to an integer index, causing a crash. An attacker with local access and low privileges can crash the process by supplying NaN values to this function, and the attack requires no user interaction; the issue affects only the CPU implementation and is not present in versions 2.9.0, 2.8.1, 2.7.2, or 2.6.4.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:09:31Z"},"euvd":{"id":"EUVD-2022-5854","exploited":false,"provenance":"source"}}