/

CVE-2026-35204

Severity:

HIGH RISK

(8.6)

Path Traversal in Helm Plugin Installation Leading to

CVE-2026-35204

Modified

Vulnerability type

Category:

Path Traversal / Directory Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write / Potential System Compromise

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in Helm versions 4.0.0 to 4.1.3 allows a specially crafted plugin to cause Helm to write plugin contents to an arbitrary filesystem location during installation or update.

If an attacker can trick a user or system into installing or updating a malicious Helm plugin, they may be able to overwrite sensitive files and potentially gain further control over the environment.

Affected context

This vulnerability occurs in environments using Helm 4.0.0–4.1.3 where plugins are installed or updated from untrusted or partially trusted sources.

The issue is specifically tied to how Helm processes fields in plugin.yaml during plugin installation and update, allowing directory traversal sequences in paths to influence where plugin files are written.

It becomes most risky in CI/CD pipelines, shared Kubernetes administration environments, or any context where plugin installation is automated or delegated to less-privileged users without strict source validation.

Exploit preconditions

  • Attack surface: Helm plugin installation or update mechanism.
  • Required access: Ability to supply or influence a Helm plugin package or its plugin.yaml (e.g., via a malicious plugin repository, tampered artifact, or social engineering of an operator).
  • Trigger point: Running helm plugin install or helm plugin update (or equivalent automation) on the malicious plugin.
  • Why exploitation is possible: Helm versions 4.0.0–4.1.3 insufficiently validate path components derived from plugin.yaml (notably the version field) and allow ../ style dot-dot sequences, enabling plugin contents to be written outside the intended plugin directory.

Why this happens

The underlying bug is a classic directory traversal issue where user-controlled data from plugin metadata is incorporated into filesystem paths without adequate normalization or validation.

Specifically, Helm's plugin installation logic trusts fields from plugin.yaml and permits POSIX dot-dot (../) sequences that traverse parent directories, mapping directly to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

Instead of constraining file writes to a fixed, canonical plugin directory and rejecting or sanitizing unsafe path fragments, the code allows crafted path components to redirect writes to attacker-chosen locations.

Potential impact

  • Overwrite of arbitrary files accessible to the Helm process, such as configuration files or scripts.
  • Injection or modification of shell scripts or binaries that may be executed later, enabling code execution.
  • Corruption of Kubernetes deployment or Helm configuration, leading to denial of service or misconfigurations.
  • Escalation of privileges in environments where overwritten files influence higher-privileged processes or automation.

General mitigation guidance

Mitigation focuses on treating all plugin metadata as untrusted input and constraining where plugin files can be written.

Recommended defensive patterns include:

  • Enforce strict path validation on all metadata fields used to construct filesystem paths, rejecting any value containing ../, absolute paths, or unexpected separators.
  • Resolve paths against a known, fixed plugin root directory and verify that the resulting canonical path remains under that directory before writing any files.
  • Apply allowlists for plugin metadata formats (e.g., version strings) that restrict them to simple, validated patterns rather than arbitrary text.
  • Run Helm and its plugin management under least-privilege accounts with limited write access, reducing the blast radius of any arbitrary file write.
  • Establish organizational policies to install plugins only from vetted, trusted repositories or internal mirrors, reducing the chance of malicious plugin metadata entering the environment.

How teams detect issues like this

Detection typically combines static review of the code paths handling plugin metadata with runtime monitoring of file operations.

Potential strategies:

  • Use static analysis or manual code review to identify any use of user-controlled values from plugin.yaml being concatenated into paths without normalization and boundary checks.
  • Implement security linters or CI checks that flag filesystem writes based on untrusted metadata, especially when dot-dot (../) or absolute path handling is present.
  • Monitor Helm execution with audit logging or EDR tools to detect unexpected writes outside the standard plugin directories during plugin installation or update.
  • Periodically scan plugin directories and surrounding filesystem regions for anomalous or newly modified files associated with plugin operations.

Sources

SourceLink
github.comgithub.com/helm/helm/commit/36c8539e99bc42d7aef9b87d136254662d04f027
github.comgithub.com/helm/helm/releases/tag/v4.1.4
github.comgithub.com/helm/helm/security/advisories/GHSA-vmx8-mqv2-9gmg
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26441
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-35204
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2456933
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-35204.json

Frequently asked

questions

It is not directly exploitable over the network by default; an attacker must get a victim to install or update a malicious Helm plugin or otherwise control the plugin metadata consumed by Helm.

The attacker needs the ability to influence the plugin artifact or repository from which Helm installs or updates a plugin, or to convince an operator to install a crafted plugin package. They do not necessarily need shell access to the target system.

The safest fix is to strictly bind all plugin-related writes to a dedicated plugin directory, validate and normalize all path components from plugin metadata, and reject any values that would cause traversal outside that directory. Canonicalizing paths and enforcing directory boundaries is key.

Future designs should treat plugin descriptors as fully untrusted, use allowlisted formats for fields like versions and names, avoid using metadata directly as path fragments, and enforce strong sandboxing and least privilege around plugin installation and execution. Continuous security review and automated checks for path traversal patterns can help catch regressions early.

Find out what's already
exploitable in your codebase.