# CVE-2022-41911: Invalid char to bool conversion when printing a tensor in Tensorflow

- Severity: Medium 4.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.58%, higher than 48% of CVEs (2026-12-01)
- Published: 2022-11-18T00:00:00.000Z
- Modified: 2026-09-08T08:48:20.442Z
- Also known as: GHSA-pf36-r9c6-h97j, BIT-TENSORFLOW-2022-41911, PYSEC-2026-1954, PYSEC-2026-3222, PYSEC-2026-939
- Weaknesses: CWE-704
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- tensorflow tensorflow: >= 2.10.0, < 2.10.1; >= 2.9.0, < 2.9.3; < 2.8.4
- tensorflow (PyPI): before 2.8.4; from 2.9.0 before 2.9.3; from 2.10.0 before 2.10.1
- tensorflow-cpu (PyPI): from 2.9.0 before 2.9.3; before 2.8.4; from 2.10.0 before 2.10.1
- tensorflow-gpu (PyPI): from 2.10.0 before 2.10.1; before 2.8.4; from 2.9.0 before 2.9.3
- google tensorflow: before 2.8.4; from 2.9.0 before 2.9.3; 2.10.0
- tensorflow (Bitnami): before 2.8.4; from 2.9.0 before 2.9.3; from 2.10.0 before 2.10.1

## Every score

- GitHub_M: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/tensorflow/tensorflow/security/advisories/GHSA-pf36-r9c6-h97j> (advisory, patch, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/commit/1be743703279782a357adbf9b77dcb994fe8b508> (advisory, fix, patch, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/blob/807cae8a807960fd7ac2313cde73a11fc15e7942/tensorflow/core/framework/tensor.cc#L1200-L1227> (advisory, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-41911> (advisory, web)
- <https://github.com/tensorflow/tensorflow> (package)
- <https://pypi.org/project/tensorflow-cpu> (package)
- <https://github.com/advisories/GHSA-pf36-r9c6-h97j> (advisory)
- <https://pypi.org/project/tensorflow> (package)

## Sources

- CVE List: [CVE-2022-41911](https://www.cve.org/CVERecord?id=CVE-2022-41911), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-pf36-r9c6-h97j](https://github.com/advisories/GHSA-pf36-r9c6-h97j), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2022-41911](https://nvd.nist.gov/vuln/detail/CVE-2022-41911), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1954](https://osv.dev/vulnerability/PYSEC-2026-1954), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-3222](https://osv.dev/vulnerability/PYSEC-2026-3222), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-939](https://osv.dev/vulnerability/PYSEC-2026-939), CC-BY-4.0, modified 2026-07-13
- Bitnami Vulnerability Database: [BIT-TENSORFLOW-2022-41911](https://osv.dev/vulnerability/BIT-TENSORFLOW-2022-41911), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-41911 · Whole record: https://cve.day/CVE-2022-41911.json · Rebuilt by cve.day 2026-11-25T22:58:16.655Z
