Helm Local Code Execution Vulnerability via Malicious Chart.yaml and Symlinked Chart.lock

Vulnerability

A local code execution vulnerability exists in Helm versions prior to 3.18.4. This issue arises when a specially crafted Chart.yaml file is used in conjunction with a symlinked Chart.lock file. The vulnerability allows for the execution of arbitrary code when dependencies are updated. The exploitation involves crafting a Chart.yaml file that, when processed, executes code if the same content is placed in an executable file, such as a bash startup file or shell script. When the Chart.lock file is updated, it can overwrite the symlinked file with the malicious content, leading to unintended code execution.

Impact

Exploitation of this vulnerability allows for local code execution on the system where Helm is run.

Reproduction

To reproduce this vulnerability, create a malicious Chart.yaml file that includes arbitrary code. Then, replace the Chart.lock file with a symlink pointing to a sensitive file, such as .bashrc or another startup script. When the 'helm dependency update' command is executed, Helm will process the Chart.yaml file and write the payload to the file the symlink points to. This can be verified by checking the target file after the update command is run.

Remediation

Users should ensure that the Chart.lock file is not a symlink before updating dependencies. This vulnerability has been patched in Helm versions 3.18.4 and 3.17.4.

Added: Sep 1, 2025, 7:22 PM
Updated: Sep 1, 2025, 7:22 PM

Vulnerability Rating

Custom Algorithm
spread
6.6
impact
2.5
exploitability
5.8
remediation
7.9
relevance
0.2
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.