{"id":"CVE-2022-41911","published":"2022-11-18T00:00:00Z","modified":"2025-04-23T16:36:49Z","title":"Invalid char to bool conversion when printing a tensor in Tensorflow","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an open source platform for machine learning. When printing a tensor, we get it's data as a `const char*` array (since that's the underlying storage) and then we typecast it to the element type. However, conversions from `char` to `bool` are undefined if the `char` is not `0` or `1`, so sanitizers/fuzzers will crash. The issue has been patched in GitHub commit `1be74370327`. The fix will be included in TensorFlow 2.11.0. We will also cherrypick this commit on TensorFlow 2.10.1, TensorFlow 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00576,"percentile":0.48444,"provenance":"source"},"cwes":[{"id":"CWE-704","name":"Incorrect Type Conversion or Cast"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-pf36-r9c6-h97j","tags":[]},{"url":"https://github.com/tensorflow/tensorflow/commit/1be743703279782a357adbf9b77dcb994fe8b508","tags":[]},{"url":"https://github.com/tensorflow/tensorflow/blob/807cae8a807960fd7ac2313cde73a11fc15e7942/tensorflow/core/framework/tensor.cc#L1200-L1227","tags":[]}],"priority":{"score":13.0,"factors":[{"name":"EPSS percentile","points":9.69},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":[">= 2.10.0, < 2.10.1",">= 2.9.0, < 2.9.3","< 2.8.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T13:54:15.660139Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.8.4",">=2.9.0, <2.9.3",">=2.10.0, <2.10.1"],"patched":["2.8.4","2.9.3","2.10.1"],"from":["GHSA-pf36-r9c6-h97j","PYSEC-2026-3222"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":[">=2.9.0, <2.9.3","<2.8.4",">=2.10.0, <2.10.1"],"patched":["2.9.3","2.8.4","2.10.1"],"from":["GHSA-pf36-r9c6-h97j","PYSEC-2026-939"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":[">=2.10.0, <2.10.1","<2.8.4",">=2.9.0, <2.9.3"],"patched":["2.10.1","2.8.4","2.9.3"],"from":["GHSA-pf36-r9c6-h97j","PYSEC-2026-1954"],"provenance":"source"}],"summary":{"text":"The flaw is in TensorFlow's tensor printing code, where tensor data stored as a const char* array is cast to the element type, so a char value other than 0 or 1 converted to bool produces undefined behaviour. An attacker with network access who can get a user to interact with the affected component, and who holds low-privilege authentication, can trigger this to crash the process (a denial of service).","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:59:44Z"},"euvd":{"id":"EUVD-2022-7399","exploited":false,"provenance":"source"}}