CVE-2026-2492
TensorFlow vulnerability analysis and mitigation

Overview

CVE-2026-2492 is a local privilege escalation vulnerability in TensorFlow caused by an uncontrolled search path element (CWE-427) in the HDF5 library plugin loading mechanism. Discovered by an anonymous researcher and reported to the vendor on 2025-03-11, it was publicly disclosed on 2026-02-19 via the Zero Day Initiative. The vulnerability affects TensorFlow installations, including the Microsoft Azure Linux 3 package azl3_tensorflow_2.16.1-10. It carries a CVSS v3.0 base score of 7.0 (High) (ZDI Advisory, Red Hat Bugzilla).

Technical details

The root cause is an uncontrolled search path element (CWE-427) in TensorFlow's handling of HDF5 plugins via the h5py library. When TensorFlow imports h5py (used for Keras model saving/loading), the HDF5 library searches for plugins in a default, unsecured path controlled by the HDF5_PLUGIN_PATH environment variable. A local attacker with low-privileged code execution can place a malicious plugin in this unsecured location, which TensorFlow will load automatically, enabling arbitrary code execution in the context of the target user. The fix sets os.environ['HDF5_PLUGIN_PATH'] = 'disable' before importing h5py in multiple TensorFlow Keras modules (training.py, hdf5_format.py, save.py, keras_parameterized.py) to prevent external plugin loading (TensorFlow Commit, ZDI Advisory).

Impact

Successful exploitation allows a local attacker with low-privileged access to escalate privileges and execute arbitrary code in the context of the target user running TensorFlow. This can result in complete compromise of the affected system, including unauthorized access to sensitive data (confidentiality impact: High), unauthorized modification of system files or model data (integrity impact: High), and potential disruption of services (availability impact: High). The attack scope is limited to the local system, but could facilitate lateral movement within environments where TensorFlow is used in shared or multi-tenant infrastructure (ZDI Advisory, Red Hat Bugzilla).

Exploitation steps

  1. Gain low-privileged local access: Obtain the ability to execute code on the target system as a low-privileged user (e.g., via phishing, a web shell, or another vulnerability).
  2. Identify the HDF5 plugin path: Determine the default or configured HDF5_PLUGIN_PATH on the target system. On Linux, this is typically a directory such as /usr/lib/hdf5/plugin or a user-writable path if not explicitly set.
  3. Craft a malicious HDF5 plugin: Compile a shared library (.so on Linux or .dll on Windows) that executes attacker-controlled code when loaded as an HDF5 plugin.
  4. Place the malicious plugin: Copy the crafted plugin into the unsecured plugin search path accessible to the attacker and readable by the target user's TensorFlow process.
  5. Trigger TensorFlow plugin loading: Wait for or induce the target user to run a TensorFlow/Keras operation that imports h5py (e.g., saving or loading a Keras model), which causes HDF5 to load plugins from the unsecured path.
  6. Achieve privilege escalation: The malicious plugin executes in the context of the target user, enabling arbitrary code execution with that user's elevated privileges (ZDI Advisory, TensorFlow Commit).

Indicators of compromise

  • File System: Unexpected or newly created shared library files (.so, .dll) in HDF5 plugin directories (e.g., /usr/lib/hdf5/plugin, paths referenced by HDF5_PLUGIN_PATH); modification timestamps on plugin directories inconsistent with normal system activity.
  • Process: Unusual child processes spawned by a TensorFlow or Python process (e.g., reverse shells, bash, curl, wget); unexpected network connections originating from Python/TensorFlow processes.
  • Logs: System logs (/var/log/auth.log, /var/log/syslog) showing privilege changes or unexpected process execution following TensorFlow model save/load operations; audit logs recording writes to HDF5 plugin directories by low-privileged users.
  • Environment: The HDF5_PLUGIN_PATH environment variable set to a user-writable or unexpected directory in the process environment of TensorFlow workloads.

Mitigation and workarounds

TensorFlow has issued a patch that disables HDF5 plugin loading by setting os.environ['HDF5_PLUGIN_PATH'] = 'disable' before importing h5py in affected Keras modules; users should update to a patched version of TensorFlow incorporating commit 46e7f7fb144fd11cf6d17c23dd47620328d77082. For Microsoft Azure Linux 3, the affected package is azl3_tensorflow_2.16.1-10 and the Microsoft Security Response Center has published patch guidance. As a workaround prior to patching, administrators can explicitly set the HDF5_PLUGIN_PATH environment variable to disable or a controlled, non-writable path in TensorFlow deployment environments. Additionally, enforce the principle of least privilege to limit local user access and restrict write permissions to HDF5 plugin directories (TensorFlow Commit, Red Hat Bugzilla, Microsoft MSRC).

Community reactions

The vulnerability was reported to TensorFlow by an anonymous researcher through the Zero Day Initiative's coordinated disclosure program, with a roughly 11-month embargo before public release. Red Hat has tracked the issue via Bugzilla with high severity/priority, and Microsoft has published a security update guide entry for the affected Azure Linux 3 package. No significant broader community or social media discussion has been identified beyond standard vulnerability database aggregation (ZDI Advisory, Red Hat Bugzilla).

Additional resources


SourceThis report was generated using AI

Related TensorFlow vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-21441HIGH8.9
  • Python logoPython
  • rhel9/bootc-image-builder
NoYesJan 07, 2026
CVE-2025-0649HIGH8.9
  • TensorFlow logoTensorFlow
  • cpe:2.3:a:google:tensorflow
NoNoMay 06, 2025
CVE-2025-55559HIGH7.5
  • TensorFlow logoTensorFlow
  • cpe:2.3:a:google:tensorflow
NoNoSep 25, 2025
CVE-2026-2492HIGH7
  • TensorFlow logoTensorFlow
  • tensorflow
NoYesFeb 20, 2026
CVE-2025-55556MEDIUM6.5
  • TensorFlow logoTensorFlow
  • tensorflow
NoNoSep 25, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management