Cloudanix VulnDB

CVE-2025-47906

None

CVSS

—

EPSS

0.5%

Published

Sep 18, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in how some software finds programs to run could allow an attacker to trick an application into executing malicious code instead of the correct one.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Privilege Gain
Component
Library
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

A flaw in the Go language's `os/exec.LookPath` function can cause it to return an executable file listed directly in the `PATH` environment variable, rather than searching for an executable within the directories listed in `PATH`. This occurs when `LookPath` is called with specific arguments ('', '.', or '..') and the `PATH` variable has been crafted to include a full path to an executable. This can lead to the execution of an arbitrary, attacker-controlled binary by the affected application.

Why it matters to the business

An attacker who can control the environment variables of a process running a vulnerable Go application can trick it into executing malicious code. This could lead to a full system compromise, data theft, or denial of service, especially if the application runs with elevated privileges. The risk is heightened in shared environments or web server contexts where user input can influence process environments.

How an attack unfolds

An attacker first gains the ability to set environment variables for a target application built with a vulnerable version of Go. They craft a malicious `PATH` variable that includes a direct path to their own executable (e.g., `PATH=/tmp/malicious-binary:/usr/bin:/bin`). The attacker then triggers a function in the target application that calls `LookPath` with a problematic argument like '.' or an empty string. The vulnerable function incorrectly interprets the `/tmp/malicious-binary` entry in the `PATH` as a valid result and returns it. The application, trusting this result, then executes the attacker's binary with its own permissions, leading to arbitrary code execution.

How to fix it

The primary remediation is to recompile affected Go applications using a patched version of the Go compiler. The fix was introduced in Go commit `dd8b7ad9268c2fbde675132a41b4e4da02eef94d`. Developers should identify all Go-based applications and rebuild them with a secure toolchain. For Debian systems, upgrade the `openssl` package to version `1.0.0g-1` or later, as it may be linked to this vulnerability in some way. As a defense-in-depth measure, sanitize environment variables, particularly `PATH`, for any processes that execute with elevated privileges or handle untrusted input.

How to confirm the fix worked

To confirm remediation, verify that all Go applications have been recompiled with a patched version of the Go toolchain. You can create a test Go program that uses `LookPath` and run it with a crafted `PATH` variable (e.g., `PATH=/bin/ls:/usr/bin`) and a trigger argument (e.g., `LookPath(".")`). On a vulnerable system, this will return `/bin/ls`; on a patched system, it will correctly search for an executable named `.` and fail to find it. For Debian systems, use `dpkg -l | grep openssl` to ensure the installed version is patched.

Typical attack path

  1. An attacker gains local access to a system and identifies a target application built with a vulnerable Go version.
  2. The attacker places a malicious executable in a location like `/tmp` or another world-writable directory.
  3. The attacker modifies the `PATH` environment variable for the target application's process to include the full path to their malicious executable.
  4. The attacker interacts with the application to cause it to invoke the `os/exec.LookPath` function with a trigger argument ('', '.', or '..').
  5. The application receives the path to the malicious executable from `LookPath`.
  6. The application executes the malicious binary, resulting in code execution with the application's privilege level.

How to detect it

Detecting exploitation requires monitoring process execution and their environment variables. Use security monitoring tools like auditd, Sysmon, or an EDR agent to log process creation events, including the full environment block. Look for anomalies where the `PATH` variable contains entries that are full paths to files rather than directories, especially files located in world-writable locations like `/tmp`, `/var/tmp`, or `/dev/shm`. Correlate such events with the execution of unexpected child processes by legitimate applications.

  • process.env.PATH contains '/tmp/'
  • process.env.PATH contains '/var/tmp/'
  • process.env.PATH contains '/dev/shm/'

What your security team should do

  • Immediately identify all internally developed Go applications and prioritize recompiling them with a patched Go toolchain.
  • Audit systems for services, daemons, and SUID/SGID executables where the `PATH` environment variable could be influenced by unprivileged users, and implement controls to sanitize it.
  • Scan source code for usages of `os/exec.LookPath` to assess potential exposure and ensure it is not called with user-controllable or hardcoded trigger values ('', '.', '..').

The record

If the PATH environment variable contains paths which are executables (rather than just directories), passing certain strings to LookPath ("", ".", and ".."), can result in the binaries listed in the PATH being unexpectedly returned.

Affected packages

Ecosystem Package Introduced Fixed
Go stdlib 0 1.23.12
AlmaLinux:8 delve 0 1.25.2-1.module_el8.10.0+4074+24330916
AlmaLinux:8 go-toolset 0 1.25.3-2.module_el8.10.0+4074+24330916
AlmaLinux:8 golang 0 1.25.3-2.module_el8.10.0+4074+24330916
AlmaLinux:8 golang-bin 0 1.25.3-2.module_el8.10.0+4074+24330916
AlmaLinux:8 golang-docs 0 1.25.3-2.module_el8.10.0+4074+24330916
AlmaLinux:8 golang-misc 0 1.25.3-2.module_el8.10.0+4074+24330916
AlmaLinux:8 golang-race 0 1.25.3-2.module_el8.10.0+4074+24330916
AlmaLinux:8 golang-src 0 1.25.3-2.module_el8.10.0+4074+24330916
AlmaLinux:8 golang-tests 0 1.25.3-2.module_el8.10.0+4074+24330916
AlmaLinux:9 go-filesystem 0 3.6.0-12.el9_7
AlmaLinux:9 go-rpm-macros 0 3.6.0-12.el9_7
AlmaLinux:9 go-rpm-templates 0 3.6.0-12.el9_7
AlmaLinux:9 go-srpm-macros 0 3.6.0-12.el9_7
Bitnami golang 0 1.23.12
Chainguard addon-resizer 0 1.8.23-r8
Chainguard addon-resizer-compat 0 1.8.23-r8
Chainguard apm-server-fips-7.17 0 7.17.29-r3
Chainguard apm-server-fips-7.17-compat 0 7.17.29-r3
Chainguard azuredisk-csi-fips-1.28 0 1.28.12-r5
Chainguard azurefile-csi-fips-1.31 0 1.31.7-r3
Chainguard azurefile-csi-fips-1.31-compat 0 1.31.7-r3
Chainguard bank-vaults 0 1.20.4-r33
Chainguard bank-vaults-template 0 1.20.4-r33
Chainguard blob-csi-fips-1.24 0 1.24.11-r4
Chainguard blob-csi-fips-1.24-compat 0 1.24.11-r4
Chainguard blobfuse2 0 2.4.2-r4
Chainguard blobfuse2-health-monitor 0 2.4.2-r4
Chainguard blobfuse2-syslog 0 2.4.2-r4
Chainguard checksec 0 3.0.2-r5
Chainguard cloud-provider-aws-1.30 0 1.30.8-r9
Chainguard cloud-provider-aws-1.30-cloud-controller-manager 0 1.30.8-r9
Chainguard cloud-provider-aws-1.30-cloud-controller-manager-compat 0 1.30.8-r9
Chainguard cloud-provider-aws-1.30-ecr-credential-provider 0 1.30.8-r9
Chainguard cloud-provider-aws-1.31 0 1.31.7-r1
Chainguard cloud-provider-aws-1.31-cloud-controller-manager 0 1.31.7-r1
Chainguard cloud-provider-aws-1.31-cloud-controller-manager-compat 0 1.31.7-r1
Chainguard cloud-provider-aws-1.31-ecr-credential-provider 0 1.31.7-r1
Chainguard cloud-provider-aws-fips-1.29 0 1.29.8-r10
Chainguard cloud-provider-aws-fips-1.29-cloud-controller-manager 0 1.29.8-r10
Chainguard cloud-provider-aws-fips-1.29-ecr-credential-provider 0 1.29.8-r10
Chainguard cloud-provider-aws-fips-1.31 0 1.31.7-r1
Chainguard cloud-provider-aws-fips-1.31-cloud-controller-manager 0 1.31.7-r1
Chainguard cloud-provider-aws-fips-1.31-ecr-credential-provider 0 1.31.7-r1
Chainguard cluster-api-1.7 0 1.7.9-r6
Chainguard cluster-api-1.7-capd-manager 0 1.7.9-r6
Chainguard cluster-api-1.7-capd-manager-compat 0 1.7.9-r6
Chainguard cluster-api-1.7-clusterctl 0 1.7.9-r6
Chainguard cluster-api-1.7-clusterctl-compat 0 1.7.9-r6
Chainguard cluster-api-1.7-controller 0 1.7.9-r6
Chainguard cluster-api-1.7-controller-compat 0 1.7.9-r6
Chainguard cluster-api-1.7-kubeadm-bootstrap-controller 0 1.7.9-r6
Chainguard cluster-api-1.7-kubeadm-bootstrap-controller-compat 0 1.7.9-r6
Chainguard cluster-api-1.7-kubeadm-control-plane-controller 0 1.7.9-r6
Chainguard cluster-api-1.7-kubeadm-control-plane-controller-compat 0 1.7.9-r6
Chainguard cluster-api-1.7-kubeadm-controlplane-controller 0 1.7.9-r6
Chainguard cluster-api-1.7-kubeadm-controlplane-controller-compat 0 1.7.9-r6
Chainguard cluster-autoscaler-fips-1.28 0 1.28.7-r14
Chainguard cluster-autoscaler-fips-1.28-compat 0 1.28.7-r14
Chainguard cluster-autoscaler-fips-1.29 0 1.29.5-r15
Chainguard cluster-autoscaler-fips-1.29-compat 0 1.29.5-r15
Chainguard configmap-reload-fips-0.11 0 0.11.1-r18
Chainguard configmap-reload-fips-0.12 0 0.12.0-r17
Chainguard confluent-common-docker 0 7.6.0-r19
Chainguard confluent-common-docker-base 0 7.6.0-r19
Chainguard confluent-common-docker-ub 0 7.6.0-r19
Chainguard consul-fips-1.19 0 1.19.2-r40
Chainguard consul-fips-1.19-oci-entrypoint 0 1.19.2-r40
Chainguard consul-fips-1.19-oci-entrypoint-compat 0 1.19.2-r40
Chainguard container-object-storage-interface 0 0.2.1-r1
Chainguard container-object-storage-interface-controller 0 0.2.1-r1
Chainguard container-object-storage-interface-controller-compat 0 0.2.1-r1
Chainguard container-object-storage-interface-sidecar 0 0.2.1-r1
Chainguard container-object-storage-interface-sidecar-compat 0 0.2.1-r1
Chainguard ctop 0 0.7.7-r27
Chainguard custom-pod-autoscaler-operator 0 1.4.2-r2
Chainguard custom-pod-autoscaler-operator-compat 0 1.4.2-r2
Chainguard dagdotdev 0 0.0.17-r2
Chainguard dex-k8s-authenticator 0 0
Chainguard docker-credential-ecr-login 0 0.10.1-r2
Chainguard eks-distro-coredns-fips-1.33 0 1.33.18-r1
Chainguard eks-distro-fips-1.33 0 1.33.18-r1
Chainguard eks-distro-kube-apiserver-fips-1.33 0 1.33.18-r1
Chainguard eks-distro-kube-controller-manager-fips-1.33 0 1.33.18-r1
Chainguard eks-distro-kube-proxy-fips-1.33 0 1.33.18-r1
Chainguard eks-distro-kube-scheduler-fips-1.33 0 1.33.18-r1
Chainguard etcd-fips-3.4 0 3.4.37-r6
Chainguard falco 0 0.42.0-r0
Chainguard falco-dev 0 0.42.0-r0
Chainguard falco-src 0 0.42.0-r0
Chainguard gcp-compute-persistent-disk-csi-driver-fips-1.13 0 1.13.9-r8
Chainguard gcp-compute-persistent-disk-csi-driver-fips-1.18 0 1.18.1-r1
Chainguard git-lfs 0 3.7.0-r2
Chainguard git-lfs-config 0 3.7.0-r2
Chainguard gitlab-docker-machine-18.1 0 18.1.3-r2
Chainguard gitlab-runner-18.1 0 18.1.3-r2
Chainguard gitlab-runner-helper-18.1 0 18.1.3-r2
Chainguard gitlab-runner-helper-compat-18.1 0 18.1.3-r2
Chainguard gitlab-runner-helper-oci-entrypoint-18.1 0 18.1.3-r2
Chainguard gitlab-runner-oci-entrypoint-18.1 0 18.1.3-r2
Chainguard gitsign 0 0.13.0-r4
Chainguard gitsign-config 0 0.13.0-r4
Chainguard gitsign-credential-cache 0 0.13.0-r4
Chainguard go-1.20-doc 0 1.20.14-r9
Chainguard go-1.22-doc 0 1.22.12-r8
Chainguard gostatsd 0 28.3.0-r18
Chainguard grafana-operator 0 5.19.4-r1
Chainguard grafana-operator-bitnami-compat 0 5.19.4-r1
Chainguard hivemind 0 1.1.0-r10
Chainguard k8sgpt-operator 0 0.2.22-r2
Chainguard k8sgpt-operator-compat 0 0.2.22-r2
Chainguard karma-fips 0 0.121-r5
Chainguard karpenter-0.33 0 0.33.12-r8
Chainguard karpenter-0.35 0 0.35.12-r8
Chainguard karpenter-1.2 0 1.2.4-r3
Chainguard karpenter-fips-0.33 0 0.33.12-r3
Chainguard karpenter-fips-0.34 0 0.34.13-r3
Chainguard karpenter-fips-0.35 0 0.35.12-r11
Chainguard karpenter-fips-1.0 0 1.0.10-r4
Chainguard karpenter-fips-1.1 0 1.1.6-r4
Chainguard knative-eventing-1.17 0 1.17.6-r2
Chainguard knative-eventing-1.17-channel-controller 0 1.17.6-r2
Chainguard knative-eventing-1.17-channel-controller-compat 0 1.17.6-r2
Chainguard knative-eventing-1.17-channel-dispatcher 0 1.17.6-r2
Chainguard knative-eventing-1.17-channel-dispatcher-compat 0 1.17.6-r2
Chainguard knative-eventing-1.17-controller 0 1.17.6-r2
Chainguard knative-eventing-1.17-controller-compat 0 1.17.6-r2
Chainguard knative-eventing-1.17-filter 0 1.17.6-r2
Chainguard knative-eventing-1.17-filter-compat 0 1.17.6-r2
Chainguard knative-eventing-1.17-ingress 0 1.17.6-r2
Chainguard knative-eventing-1.17-ingress-compat 0 1.17.6-r2
Chainguard knative-eventing-1.17-jobsink 0 1.17.6-r2
Chainguard knative-eventing-1.17-jobsink-compat 0 1.17.6-r2
Chainguard knative-eventing-1.17-mtchannel-broker 0 1.17.6-r2
Chainguard knative-eventing-1.17-mtchannel-broker-compat 0 1.17.6-r2
Chainguard knative-eventing-1.17-webhook 0 1.17.6-r2
Chainguard knative-eventing-1.17-webhook-compat 0 1.17.6-r2
Chainguard knative-eventing-fips-1.17 0 1.17.6-r3
Chainguard knative-eventing-fips-1.17-channel-controller 0 1.17.6-r3
Chainguard knative-eventing-fips-1.17-channel-dispatcher 0 1.17.6-r3
Chainguard knative-eventing-fips-1.17-controller 0 1.17.6-r3
Chainguard knative-eventing-fips-1.17-filter 0 1.17.6-r3
Chainguard knative-eventing-fips-1.17-ingress 0 1.17.6-r3
Chainguard knative-eventing-fips-1.17-jobsink 0 1.17.6-r3
Chainguard knative-eventing-fips-1.17-mtchannel-broker 0 1.17.6-r3
Chainguard knative-eventing-fips-1.17-webhook 0 1.17.6-r3
Chainguard knative-serving-1.17 0 1.17.2-r4
Chainguard knative-serving-1.17-activator 0 1.17.2-r4
Chainguard knative-serving-1.17-activator-compat 0 1.17.2-r4
Chainguard knative-serving-1.17-autoscaler 0 1.17.2-r4
Chainguard knative-serving-1.17-autoscaler-compat 0 1.17.2-r4
Chainguard knative-serving-1.17-controller 0 1.17.2-r4
Chainguard knative-serving-1.17-controller-compat 0 1.17.2-r4
Chainguard knative-serving-1.17-queue 0 1.17.2-r4
Chainguard knative-serving-1.17-queue-compat 0 1.17.2-r4
Chainguard knative-serving-1.17-webhook 0 1.17.2-r4
Chainguard knative-serving-1.17-webhook-compat 0 1.17.2-r4
Chainguard kserve-rest-proxy 0 0.12.0-r10
Chainguard kserve-rest-proxy-compat 0 0.12.0-r10
Chainguard kube-logging-operator-custom-runner-fips 0 0.13.0-r2
Chainguard kube-logging-operator-custom-runner-fips-compat 0 0.13.0-r2
Chainguard kube-vip 0 1.0.0-r1
Chainguard kube-vip-cloud-provider 0 0.0.12-r4
Chainguard kube-vip-cloud-provider-compat 0 0.0.12-r4
Chainguard kube-vip-compat 0 1.0.0-r1
Chainguard kuberay-operator 0 1.4.2-r2
Chainguard kuberay-operator-compat 0 1.4.2-r2
Chainguard kubernetes-csi-node-driver-registrar-2.13 0 2.13.0-r11
Chainguard kubernetes-csi-node-driver-registrar-2.13-compat 0 2.13.0-r11
Chainguard kubernetes-csi-node-driver-registrar-fips-2.14 0 2.14.0-r2
Chainguard kubernetes-csi-node-driver-registrar-fips-2.14-compat 0 2.14.0-r2
Chainguard kubernetes-dashboard-fips 0 7.13.0-r4
Chainguard linkerd2-proxy-init 0 2.4.3-r3
Chainguard linkerd2-proxy-init-compat 0 2.4.3-r3
Chainguard local-path-provisioner 0 0.0.32-r1
Chainguard lvm-driver 0 1.7.0-r2
Chainguard lvm-driver-compat 0 1.7.0-r2
Chainguard mattmoor-chainit 0 0.0.9-r25
Chainguard mattmoor-chainit-init 0 0.0.9-r25
Chainguard memcached-exporter-fips 0 0.15.3-r3
Chainguard memcached-exporter-fips-bitnami-compat 0 0.15.3-r3
Chainguard memcached-exporter-fips-iamguarded-compat 0 0.15.3-r3
Chainguard modelmesh-runtime-adapter 0 0.12.0-r19
Chainguard modelmesh-runtime-adapter-compat 0 0.12.0-r19
Chainguard mongodb-kubernetes-operator 0 0.13.0-r3
Chainguard mongodb-kubernetes-operator-compat 0 0.13.0-r3
Chainguard mongodb-kubernetes-operator-readinessprobe 0 0.13.0-r3
Chainguard mongodb-kubernetes-operator-readinessprobe-compat 0 0.13.0-r3
Chainguard mongodb-kubernetes-operator-version-upgrade-post-start-hook 0 0.13.0-r3
Chainguard mongodb-kubernetes-operator-version-upgrade-post-start-hook-compat 0 0.13.0-r3
Chainguard nats 0 0.2.4-r1
Chainguard nemo 0 2.4.0-r13
Chainguard newrelic-fluent-bit-output 0 2.4.0-r5
Chainguard newrelic-fluent-bit-output-compat 0 2.4.0-r5
Chainguard newrelic-nri-statsd 0 2.11.0-r8
Chainguard node-problem-detector-compat-fips-0.8 0 0.8.21-r3
Chainguard node-problem-detector-fips-0.8 0 0.8.21-r3
Chainguard node-problem-detector-fips-0.8-compat 0 0.8.21-r3
Chainguard node-problem-detector-fips-0.8-health-checker-fips 0 0.8.21-r3
Chainguard node-problem-detector-fips-0.8-log-counter-fips 0 0.8.21-r3

Related vulnerabilities