CVE-2022-41896: TensorFlow Crashes Due to Invalid Mfcc Input

tensorflow Updated 18 Jul 2026

Summary

13/07/2026
Yes i
Moderate
4.8

CVE-2022-41896: tf.raw_ops.Mfcc crashes. Affects tensorflow 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

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.

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 Your last release was probably never penetration tested 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 library widely used for various applications, including deep learning and neural networks. It provides a flexible platform for building and deploying machine learning models. However, like any software, TensorFlow can have vulnerabilities that may affect its stability and security. This particular vulnerability arises from the tf.raw_ops.Mfcc function, which can lead to crashes when provided with invalid input parameters.

Vulnerability Detail

The vulnerability occurs when the ThreadUnsafeUnigramCandidateSampler is given an input filterbank_channel_count that exceeds the maximum allowed size. This can cause TensorFlow to crash, leading to potential disruptions in applications relying on this library. The issue is triggered specifically when the filterbank_channel_count is set to a value greater than 2^31 - 1, which is not handled correctly by the library, resulting in a crash during execution.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow==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.8.4 2.8.4
    pip install --upgrade "tensorflow==2.8.4"
  • >= 2.9.0, < 2.9.3 2.9.3
    pip install --upgrade "tensorflow==2.9.3"
  • >= 2.10.0, < 2.10.1 2.10.1
    pip install --upgrade "tensorflow==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 excessively high values. For example, ensure that the value is within the acceptable range, such as:

import tensorflow as tf
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
)

Conclusion

In summary, CVE-2022-41896 is a significant vulnerability in TensorFlow that can lead to crashes when improper input values are used. It is crucial to update to the latest patched versions to mitigate this risk. Additionally, users should be cautious with input parameters to avoid triggering the vulnerability.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-41896 is a vulnerability in TensorFlow that causes the library to crash when the filterbank_channel_count parameter is set to an excessively high value.

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 versions prior to 2.8.4, 2.9.3, and 2.10.1. It is recommended to update to version 2.11 or the patched versions.

If you cannot update TensorFlow immediately, ensure that you do not set the filterbank_channel_count parameter to values greater than 128 to avoid crashes.

Vulert is a tool that monitors and alerts for open-source vulnerabilities in software using just the Pipfile.lock, providing real-time insights without requiring access to the code.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow==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.8.4 2.8.4
    pip install --upgrade "tensorflow==2.8.4"
  • >= 2.9.0, < 2.9.3 2.9.3
    pip install --upgrade "tensorflow==2.9.3"
  • >= 2.10.0, < 2.10.1 2.10.1
    pip install --upgrade "tensorflow==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 →

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