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

tensorflow-cpu Updated 18 Jul 2026

Summary

13/07/2026
Yes i
Medium
4.8

CVE-2022-41896: tf.raw_ops.Mfcc crashes. Affects tensorflow-cpu 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 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 library widely used for various applications, including deep learning and neural networks. The 'tensorflow-cpu' package provides CPU support for TensorFlow, allowing users to perform computations without the need for a GPU. This package is essential for developers who want to leverage TensorFlow's capabilities in environments where GPU resources are limited. However, it is crucial to ensure that the package is kept up to date to avoid vulnerabilities that could lead to crashes or other security issues.

Vulnerability Detail

The vulnerability identified as CVE-2022-41896 arises from the 'tf.raw_ops.Mfcc' function within the TensorFlow library. If the 'filterbank_channel_count' parameter is set to a value greater than the maximum allowed size, TensorFlow will crash. This issue can occur when users inadvertently provide invalid input, leading to a denial of service. The crash is triggered by the 'ThreadUnsafeUnigramCandidateSampler' when it processes the invalid input, making it critical for users to validate their parameters before invoking this function.

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.8.4 2.8.4
    pip install --upgrade "tensorflow-cpu==2.8.4"
  • >= 2.9.0, < 2.9.3 2.9.3
    pip install --upgrade "tensorflow-cpu==2.9.3"
  • >= 2.10.0, < 2.10.1 2.10.1
    pip install --upgrade "tensorflow-cpu==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, users should ensure that the 'filterbank_channel_count' parameter is set within the valid range. For example, using a value less than or equal to the maximum allowed size:

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 valid value
    dct_coefficient_count = 1
)

Conclusion

In summary, CVE-2022-41896 is a critical vulnerability in the TensorFlow CPU package that can lead to application crashes due to invalid input parameters. Users are advised to update their packages to the latest patched versions and validate their inputs to prevent such issues.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

CVE-2022-41896 is a vulnerability in the TensorFlow CPU package that causes the application to crash when invalid input is provided to the Mfcc function.

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 primary consequence is a denial of service, as the application will crash when the invalid input is processed, potentially disrupting user operations.

You can update the TensorFlow package using pip commands to install the patched versions, such as 'pip install --upgrade tensorflow-cpu==2.10.1'.

Yes, ensure that the 'filterbank_channel_count' parameter is set to a valid value within the allowed range to prevent the crash.

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