CVE-2022-23584: Use After Free Vulnerability in TensorFlow

tensorflow-cpu Updated 02 Oct 2025

Summary

04/02/2022
Yes i
Unrated
Not published

CVE-2022-23584: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-cpu across 3 version ranges.

< 2.5.3 >= 2.6.0, < 2.6.3 < e746adbfcfee15e9cfdb391ff746c765b99bdf9b

Fixed in 2.5.3 or 2.6.3, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-23584 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an open-source machine learning framework widely used for building and training machine learning models. It provides a comprehensive set of tools and libraries for developing and deploying machine learning applications. TensorFlow supports various image formats, including PNG, for processing and analysis. However, a vulnerability has been discovered in TensorFlow's PNG image decoding functionality.

Vulnerability Detail

The vulnerability (CVE-2022-23584) in TensorFlow's PNG image decoding functionality allows a malicious user to trigger a use after free behavior. When decoding PNG images, the function png::CommonFreeDecode(&decode) is called, which results in the values of decode.width and decode.height being left in an unspecified state. This can lead to unexpected behavior and potential exploitation by an attacker. The issue has been identified and fixed in TensorFlow 2.8.0, and the fix has also been backported to TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, which are still within the supported range.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.5.3 2.5.3
    pip install --upgrade "tensorflow-cpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-cpu==2.6.3"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update TensorFlow to the fixed versions mentioned above.

Conclusion

The use after free vulnerability in TensorFlow's PNG image decoding functionality (CVE-2022-23584) can be mitigated by updating to TensorFlow 2.8.0 or applying the respective patches for TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3. It is crucial to keep the TensorFlow version up to date to ensure the proper handling of PNG image decoding and prevent potential exploitation. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework used for building and training machine learning models.

The vulnerability allows a malicious user to trigger a use after free behavior, potentially leading to unexpected behavior and exploitation.

The vulnerability affects TensorFlow versions up to 2.5.3. TensorFlow 2.8.0 and the patched versions (2.7.1, 2.6.3, and 2.5.3) are not affected.

No, there is no known workaround for this vulnerability. Updating to the fixed versions is the recommended solution.

You can find more information about this vulnerability in the TensorFlow advisory database: [link to the advisory database]

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.5.3 2.5.3
    pip install --upgrade "tensorflow-cpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-cpu==2.6.3"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback