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

- Priority: **Routine**
- Reason: Not severe (CVSS 4.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-11-18 · Modified: 2025-04-23
- Aliases: GHSA-pf36-r9c6-h97j, BIT-tensorflow-2022-41911, PYSEC-2026-1954, PYSEC-2026-3222, PYSEC-2026-939
- Record: https://cvemate.com/vulnerability/CVE-2022-41911 · JSON: https://cvemate.com/vulnerability/CVE-2022-41911/json

## 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.
```

## Signals

- CVSS: 7.5 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.576%, percentile 48.975%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- google tensorflow: \< 2.8.4 \| ≥ 2.9.0, \< 2.9.3 \| 2.10.0
- PyPI tensorflow (PyPI): \< 2.8.4 \| ≥ 2.9.0, \< 2.9.3 \| ≥ 2.10.0, \< 2.10.1
- PyPI tensorflow-cpu (PyPI): ≥ 2.9.0, \< 2.9.3 \| \< 2.8.4 \| ≥ 2.10.0, \< 2.10.1
- PyPI tensorflow-gpu (PyPI): \< 2.8.4 \| ≥ 2.9.0, \< 2.9.3 \| ≥ 2.10.0, \< 2.10.1
- tensorflow tensorflow: ≥ 2.10.0, \< 2.10.1 \| ≥ 2.9.0, \< 2.9.3 \| \< 2.8.4

## References

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

---

Data as of 2026-12-05T02:45:18.539Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
