CVE-2022-41896: TensorFlow GPU Crashes Due to Excessive Filterbank Channel Count in Mfcc Operation
Summary
CVE-2022-41896: tf.raw_ops.Mfcc crashes. Affects tensorflow-gpu across 3 version ranges.
< 2.8.4
>= 2.9.0, < 2.9.3
>= 2.10.0, < 2.10.1
Fixed in 2.8.4, 2.9.3 or 2.10.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow · Bitnami
- tensorflow · PyPI
The same CVE-2022-41896 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
TensorFlow is an open-source machine learning framework that provides a comprehensive ecosystem for building and deploying machine learning models. It supports various operations, including audio processing through the Mfcc (Mel-frequency cepstral coefficients) function. This function is widely used in speech and audio processing tasks. However, a vulnerability exists in the TensorFlow GPU package that can lead to crashes when the filterbank channel count exceeds the maximum allowed size.
Vulnerability Detail
The vulnerability arises from the ThreadUnsafeUnigramCandidateSampler in TensorFlow when the filterbank_channel_count parameter is set to a value greater than the allowed maximum size. This can lead to a crash of the TensorFlow application, disrupting any ongoing processes. The issue is triggered when the Mfcc operation is called with an excessively high filterbank channel count, which can be exploited by users who are unaware of the limitations.
How To Fix
Latest published version: 2.12.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-gpu==2.12.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.8.42.8.4pip install --upgrade "tensorflow-gpu==2.8.4" -
>= 2.9.0, < 2.9.32.9.3pip install --upgrade "tensorflow-gpu==2.9.3" -
>= 2.10.0, < 2.10.12.10.1pip install --upgrade "tensorflow-gpu==2.10.1"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, avoid setting the filterbank_channel_count parameter to values greater than 2**31 - 1. Here is an example of how to safely call the Mfcc operation:
import tensorflow as tf
# Safe usage of Mfcc operation
try:
tf.raw_ops.Mfcc(
spectrogram=[[[1.38, 6.32, 5.75, 9.51]]],
sample_rate=2,
upper_frequency_limit=5.0,
lower_frequency_limit=1.0,
filterbank_channel_count=128, # Use a safe value
dct_coefficient_count=1
)
except Exception as e:
print(f'Error occurred: {e}')
Conclusion
The CVE-2022-41896 vulnerability in TensorFlow GPU can lead to application crashes when the filterbank channel count is set too high. Users are advised to update to the patched versions or implement workarounds to mitigate the risk. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.
See every vulnerability recorded for tensorflow-gpu →
FAQ
CVE-2022-41896 is a vulnerability in TensorFlow GPU that causes the application to crash when the filterbank channel count exceeds the maximum allowed size.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The affected versions include TensorFlow GPU versions prior to 2.8.4, 2.9.3, and 2.10.1.
As a temporary measure, ensure that the filterbank_channel_count parameter is set to a safe value (e.g., less than 2**31 - 1) to avoid crashes.
The CVSS score for this vulnerability is 4.8, indicating a moderate level of severity.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.