CVE-2026-63308 Overview
CVE-2026-63308 is a denial of service vulnerability in Helm through version 4.2.3, the Kubernetes package manager. The flaw resides in the Files.Lines template helper located in pkg/engine/files.go. Attackers can trigger an index out of range panic by including zero-length byte slices in chart files. Embedding empty files within a Helm chart causes deterministic render failures across template, install, upgrade, lint, and SDK Engine.Render operations. The issue is classified under [CWE-129] (Improper Validation of Array Index) and was fixed in commit ba6c9a2.
Critical Impact
Malicious or malformed Helm charts containing empty files cause the Helm engine to panic, halting chart rendering and disrupting Kubernetes deployment pipelines.
Affected Products
- Helm versions up to and including 4.2.3
- Helm SDK Engine.Render consumers
- CI/CD pipelines and GitOps tooling that render untrusted charts
Discovery Timeline
- 2026-07-17 - CVE-2026-63308 published to NVD
- 2026-07-17 - Last updated in NVD database
- Fix commit - ba6c9a29efa7bf9198dad6a5ec12b4fb30c96017 merged via pull request #32290
Technical Details for CVE-2026-63308
Vulnerability Analysis
The vulnerability exists in the Lines method of the files type inside pkg/engine/files.go. The original implementation checked whether the file entry was nil, but did not account for entries that existed as zero-length byte slices. When a template invokes {{ range .Files.Lines "path" }} against an empty file, the underlying string conversion and slice indexing operations trigger an index out of range panic in the Go runtime. Because Helm's rendering engine does not recover from this panic, the failure propagates through every command that renders templates. Any workflow that consumes charts from an untrusted or shared source can be interrupted by adding an empty file to the chart archive.
Root Cause
The root cause is improper validation of the length of a byte slice before performing indexed operations, tracked as [CWE-129]. The guard clause distinguished between nil and non-nil slices but not between empty and non-empty slices. A zero-length slice bypassed the guard and reached code paths that assumed at least one byte was present.
Attack Vector
An attacker supplies a Helm chart that contains one or more empty files referenced by Files.Lines in any template. When a victim runs helm template, helm install, helm upgrade, helm lint, or calls Engine.Render through the SDK, the process panics. User interaction is required, as the victim must render the attacker-supplied chart.
// {{ range .Files.Lines "foo/bar.html" }}
// {{ . }}{{ end }}
func (f files) Lines(path string) []string {
- if f == nil || f[path] == nil {
+ if f == nil || len(f[path]) == 0 {
return []string{}
}
s := string(f[path])
Source: Helm commit ba6c9a2. The patch replaces the nil check with len(f[path]) == 0, ensuring that zero-length byte slices short-circuit to an empty result rather than progressing to unsafe indexing.
Detection Methods for CVE-2026-63308
Indicators of Compromise
- Helm CLI or SDK processes terminating with a Go runtime index out of range panic and stack traces referencing pkg/engine/files.go.
- CI/CD job failures during helm template, helm install, helm upgrade, or helm lint stages against previously working pipelines.
- Chart archives containing zero-byte files referenced by Files.Lines template calls.
Detection Strategies
- Statically scan chart repositories for empty files inside charts/ directories and correlate with template usage of .Files.Lines.
- Enforce chart provenance validation with helm verify and require signed charts from trusted publishers.
- Monitor CI runner logs for Go panic signatures such as runtime error: index out of range originating from Helm binaries.
Monitoring Recommendations
- Alert on repeated Helm process crashes across build agents and Kubernetes operators that embed the Helm SDK.
- Track Helm binary versions across build infrastructure and flag hosts running versions at or below 4.2.3.
- Log the source and digest of every chart pulled into deployment pipelines to enable rapid attribution of malformed charts.
How to Mitigate CVE-2026-63308
Immediate Actions Required
- Upgrade Helm to a version containing commit ba6c9a2 or later across all workstations, CI/CD runners, and controllers embedding the Helm SDK.
- Audit chart sources and remove any charts of unknown provenance from shared repositories.
- Rebuild container images and operator binaries that statically link the Helm engine so they pick up the patched library.
Patch Information
The fix is available in the Helm repository as commit ba6c9a29efa7bf9198dad6a5ec12b4fb30c96017, merged through pull request #32290. Background discussion is available in issue #32279. Downstream consumers of the helm.sh/helm/v3/pkg/engine or v4 module should update their go.mod to a released version that includes the commit and rebuild.
Workarounds
- Restrict chart ingestion to trusted, signed sources until patched binaries are deployed.
- Pre-scan charts to reject archives that contain zero-byte files referenced by Files.Lines templates.
- Wrap SDK Engine.Render calls in a recover() boundary to prevent panics from crashing long-running controllers.
# Update Helm SDK dependency to a patched revision
go get helm.sh/helm/v3@latest
go mod tidy
# Verify installed CLI version
helm version --short
# Reject charts containing empty files before rendering
find ./mychart -type f -empty -print -exec false {} +
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

