Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-32387

CVE-2025-32387: Helm Buffer Overflow Vulnerability

CVE-2025-32387 is a buffer overflow vulnerability in Helm, a package manager for Kubernetes Charts. Deeply nested JSON Schema references can trigger stack overflow, causing denial of service. This article covers technical details, affected versions, impact, and mitigation.

Updated:

CVE-2025-32387 Overview

CVE-2025-32387 is a stack overflow vulnerability in Helm, the package manager for Kubernetes Charts. The vulnerability exists in the JSON Schema parsing functionality, where a maliciously crafted chart containing a deeply nested chain of references can cause parser recursion to exceed the stack size limit, triggering a stack overflow and resulting in a denial of service condition.

Critical Impact

Attackers can craft malicious Helm charts with deeply nested JSON Schema references to crash Helm operations, causing denial of service for Kubernetes deployment pipelines.

Affected Products

  • Helm versions prior to v3.17.3
  • Kubernetes environments using vulnerable Helm installations
  • CI/CD pipelines utilizing Helm for chart deployment

Discovery Timeline

  • 2025-04-09 - CVE CVE-2025-32387 published to NVD
  • 2025-09-03 - Last updated in NVD database

Technical Details for CVE-2025-32387

Vulnerability Analysis

This vulnerability affects Helm's JSON Schema file parsing mechanism within Kubernetes charts. When Helm processes a chart containing a values.schema.json file, it recursively follows JSON Schema $ref references to validate the schema structure. An attacker can craft a malicious chart with an excessively deep chain of nested references, causing the parser to recurse beyond the available stack memory.

The attack requires user interaction—specifically, a victim must download and process a malicious chart. Once the crafted chart is loaded, the recursive parsing exhausts the call stack, triggering a stack overflow that terminates the Helm process. This denial of service can disrupt critical Kubernetes deployment workflows and CI/CD pipelines.

Root Cause

The root cause is CWE-121: Stack-based Buffer Overflow, specifically due to unbounded recursion in the JSON Schema reference resolution logic. The parser did not enforce limits on the depth of $ref chains or the size of decompressed chart files, allowing attackers to craft inputs that exceed stack boundaries.

Attack Vector

The attack vector is network-based and requires user interaction. An attacker must convince a victim to download and process a malicious Helm chart. This could occur through:

  1. Publishing a malicious chart to a public or private chart repository
  2. Social engineering developers to use a compromised chart source
  3. Supply chain attacks targeting chart dependencies

The security patch introduces size limits to prevent resource exhaustion:

go
// MaxDecompressedChartSize is the maximum size of a chart archive that will be
// decompressed. This is the decompressed size of all the files.
// The default value is 100 MiB.
var MaxDecompressedChartSize int64 = 100 * 1024 * 1024 // Default 100 MiB

// MaxDecompressedFileSize is the size of the largest file that Helm will attempt to load.
// The size of the file is the decompressed version of it when it is stored in an archive.
var MaxDecompressedFileSize int64 = 5 * 1024 * 1024 // Default 5 MiB

Source: GitHub Commit Details

The patch also adds file size validation during directory loading:

go
		if fi.Size() > MaxDecompressedFileSize {
			return fmt.Errorf("chart file %q is larger than the maximum file size %d", fi.Name(), MaxDecompressedFileSize)
		}

Source: GitHub Commit Details

Detection Methods for CVE-2025-32387

Indicators of Compromise

  • Unexpected Helm process crashes or terminations during chart operations
  • Stack overflow errors in Helm logs or system event logs
  • Charts containing unusually large or deeply nested values.schema.json files
  • Abnormal memory consumption patterns during chart loading operations

Detection Strategies

  • Monitor for Helm process crashes with stack overflow signatures in application logs
  • Implement pre-deployment scanning of Helm charts for suspicious schema patterns
  • Configure alerting for abnormal Helm process termination events
  • Review chart sources and validate chart integrity before installation

Monitoring Recommendations

  • Enable verbose logging for Helm operations to capture error details
  • Implement centralized log aggregation for Helm deployments across clusters
  • Set up process monitoring to detect unexpected Helm terminations
  • Establish baseline metrics for chart processing times to identify anomalies

How to Mitigate CVE-2025-32387

Immediate Actions Required

  • Upgrade Helm to version 3.17.3 or later immediately
  • Audit all chart sources and repositories for untrusted content
  • Review recently deployed charts for suspicious schema structures
  • Implement chart signing and verification to ensure chart integrity

Patch Information

The vulnerability has been resolved in Helm v3.17.3. The fix introduces maximum size limits for decompressed chart archives (100 MiB) and individual files (5 MiB), preventing resource exhaustion attacks. Organizations should update their Helm installations to the patched version as soon as possible.

Patch details are available in the GitHub commit d8ca55fc669645c10c0681d49723f4bb8c0b1ce7 and the GitHub Security Advisory GHSA-5xqw-8hwv-wg92.

Workarounds

  • Restrict chart installations to trusted, verified chart repositories only
  • Implement pre-deployment chart scanning in CI/CD pipelines
  • Use Helm chart provenance verification with GPG signatures
  • Consider network segmentation to limit exposure of Helm operations
bash
# Verify Helm version is patched
helm version --short

# Update Helm to latest secure version
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

# Verify chart provenance before installation
helm verify <chart-package>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.