
Cloud Vulnerability DB
A community-led vulnerabilities database
TensorFlow, an end-to-end open source platform for machine learning, was found to contain a vulnerability (CVE-2021-29531) that allows attackers to trigger a CHECK fail in PNG encoding. The vulnerability was discovered in May 2021 and affects versions prior to 2.5.0. The issue impacts multiple versions of TensorFlow including versions before 2.1.4, 2.2.3, 2.3.3, and 2.4.2 (GitHub Advisory).
The vulnerability exists because the implementation only validates that the total number of pixels in the image does not overflow, allowing an attacker to send an empty matrix for encoding. When the tensor is empty, the associated buffer becomes nullptr. When calling png::WriteImageToBuffer, the first argument (image.flat().data()) is NULL, which triggers the CHECK_NOTNULL in the first line of png::WriteImageToBuffer. This results in abort being called after printing the stacktrace (NVD).
The vulnerability allows an attacker to mount a denial of service attack by causing the application to abort execution. The CVSS v3.1 base score is 5.5 MEDIUM, indicating moderate severity with local access required (NVD).
The issue has been patched in TensorFlow 2.5.0. The fix was also backported to TensorFlow 2.4.2, 2.3.3, 2.2.3, and 2.1.4. Users are advised to upgrade to these patched versions. The fix involves adding additional validation to check for empty tensors before processing (GitHub Commit).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."