CVE-2022-23584: TensorFlow - Use After Free Vulnerability in PNG Image Decoding

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2022-23584: Use after free in DecodePng in Tensorflow. Affects tensorflow across 3 version ranges.

< 2.5.3 >= 2.6.0, < 2.6.3 >= 2.7.0, < 2.7.1

Fixed in 2.5.3, 2.6.3 or 2.7.1, 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 developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. This vulnerability affects versions of TensorFlow prior to 2.7.0 and can be exploited by a malicious user when decoding PNG images.

Vulnerability Detail

The vulnerability arises due to a use after free behavior in the decoding of PNG images in TensorFlow. When the function png::CommonFreeDecode(&decode) is called, the values of decode.width and decode.height are left in an unspecified state. This can lead to unexpected behavior and potential security risks. The issue has been assigned the CVE identifier CVE-2022-23584 and has a CVSSv3 score of 6.5 (Medium severity). Exploitation of this vulnerability could result in unauthorized access, data leakage, or denial of service.

How To Fix

Fixed versions by release line

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

  • < 2.5.3 2.5.3
  • >= 2.6.0, < 2.6.3 2.6.3
  • >= 2.7.0, < 2.7.1 2.7.1

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 recommended to apply the official fix provided by TensorFlow by upgrading to the patched version.

Conclusion

The use after free vulnerability in TensorFlow's PNG image decoding can be mitigated by upgrading to the patched versions of TensorFlow. It is crucial to promptly apply the necessary updates to ensure the security and stability of machine learning models built using TensorFlow. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework developed by Google. It provides tools and resources for building and deploying machine learning models.

This vulnerability can be exploited by a malicious user to cause a use after free behavior when decoding PNG images in TensorFlow. It could potentially lead to unauthorized access, data leakage, or denial of service.

Versions of TensorFlow prior to 2.7.0 are affected by this vulnerability.

Yes, the fix for this vulnerability is included in TensorFlow 2.8.0. Backported fixes are also available for TensorFlow versions 2.7.1, 2.6.3, and 2.5.3.

No, there are no known workarounds for this vulnerability. It is recommended to upgrade to the patched version of TensorFlow.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Fixed versions by release line

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

  • < 2.5.3 2.5.3
  • >= 2.6.0, < 2.6.3 2.6.3
  • >= 2.7.0, < 2.7.1 2.7.1

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