CVE-2024-25620: Dependency management path traversal in helm
A Helm contributor discovered a path traversal vulnerability when Helm saves a chart including at download time.
Impact
When either the Helm client or SDK is used to save a chart whose name within the Chart.yaml file includes a relative path change, the chart would be saved outside its expected directory based on the changes in the relative path. The validation and linting did not detect the path changes in the name.
Patches
This issue has been resolved in Helm v3.14.1.
Workarounds
Check all charts used by Helm for path changes in their name as found in the Chart.yaml file. This includes dependencies.
Credits
Disclosed by Dominykas Blyžė at Nearform Ltd.
Other sources
Helm is a tool for managing Charts. Charts are packages of pre-configured Kubernetes resources. When either the Helm client or SDK is used to save a chart whose name within the Chart.yaml file includes a relative path change, the chart would be saved outside its expected directory based on the changes in the relative path. The validation and linting did not detect the path changes in the name. This issue has been resolved in Helm v3.14.1. Users unable to upgrade should check all charts used by Helm for path changes in their name as found in the Chart.yaml file. This includes dependencies.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/helm.sh/helm/v3to a version that resolves this vulnerability.Fixed in 3.14.1 - Upgrade
Upgrade
redhat/helmto a version that resolves this vulnerability.Fixed in 3.14.1 - Upgrade
Upgrade
helm/helmto a version that resolves this vulnerability.Fixed in v3.14.1 - Configuration
Check all charts used by Helm (including dependencies) and update each chart's `Chart.yaml` `name` field to remove any relative path changes; the issue occurs when the chart name includes a relative path change and Helm saves the chart outside the expected directory.
Helm charts (Chart.yaml) name field = no relative path changes (e.g., do not include ../ or other relative path segments)
Event History
Frequently Asked Questions
What is the severity of CVE-2024-25620?
CVE-2024-25620 is classified as a medium severity vulnerability.
How do I fix CVE-2024-25620?
To fix CVE-2024-25620, update Helm to version 3.14.1 or later.
What is the impact of CVE-2024-25620?
The impact of CVE-2024-25620 is that it allows path traversal when saving a chart with a relative path in the Chart.yaml file.
Which versions of Helm are affected by CVE-2024-25620?
Versions of Helm prior to 3.14.1 are affected by CVE-2024-25620.
Is CVE-2024-25620 related to the Helm client or SDK?
Yes, CVE-2024-25620 affects the Helm client and SDK when saving charts.