Untrusted Search Path Affecting github.com/nvidia/nvidia-container-toolkit/internal/edits package, versions <1.17.8


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.11% (31st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMNVIDIANVIDIACONTAINERTOOLKITINTERNALEDITS-11023360
  • published28 Jul 2025
  • disclosed17 Jul 2025
  • creditNir Ohfeld, Shir Tamari

Introduced: 17 Jul 2025

CVE-2025-23266  (opens in a new tab)
CWE-426  (opens in a new tab)

How to fix?

Upgrade github.com/NVIDIA/nvidia-container-toolkit/internal/edits to version 1.17.8 or higher.

Overview

Affected versions of this package are vulnerable to Untrusted Search Path though incorrect handling of the OCI hook createContainer during container initialization when enable-cuda-compat is used. An attacker with low privileges in a container can run arbitrary code with higher privileges, access sensitive data, alter information, or cause service disruptions. By setting LD_PRELOAD in the Dockerfile, the attacker could make the nvidia-ctk hook load a malicious library. Since the createContainer hook runs with its working directory at the container's root filesystem, the attacker can load the malicious library directly from the container image.

Workaround

When using the NVIDIA Container Runtime in legacy mode, disable the hook by editing the /etc/nvidia-container-toolkit/config.toml file and setting the features.disable-cuda-compat-lib-hook flag to true.

[features]
disable-cuda-compat-lib-hook = true

When using the NVIDIA GPU Operator, disable the hook by adding disable-cuda-compat-lib-hook to the NVIDIA_CONTAINER_TOOLKIT_OPT_IN_FEATURES environment variable. This can be done by including the following arguments when installing or upgrading the GPU Operator with Helm:

--set
"toolkit.env[0].name=NVIDIA_CONTAINER_TOOLKIT_OPT_IN_FEATURES" \
--set
"toolkit.env[0].value=disable-cuda-compat-lib-hook"

CVSS Base Scores

version 4.0
version 3.1