Skip to content

GHSA-5xqw-8hwv-wg92 BIT-helm-2025-32387 CVE-2025-32387 GO-2025-3602

Helm Allows A Specially Crafted JSON Schema To Cause A Stack Overflow

Medium Go
Severity
6.5 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.49%
Chance of exploitation in the next 30 days. Higher than 42.22% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-121 Stack-based Buffer Overflow
CWE-674 Uncontrolled Recursion
Fix
3.17.3
Upgrade helm.sh/helm/v3 to this version or later

Description

A Helm contributor discovered that a specially crafted JSON Schema within a chart can lead to a stack overflow.

Impact

A JSON Schema file within a chart can be crafted with a deeply nested chain of references, leading to parser recursion that can exceed the stack size limit and trigger a stack overflow.

Patches

This issue has been resolved in Helm v3.17.3.

Workarounds

Ensure that the JSON Schema within any charts loaded by Helm does not have a large number of nested references. These JSON Schema files are larger than 10 MiB.

For more information

Helm's security policy is spelled out in detail in our SECURITY document.

Credits

Disclosed by Jakub Ciolek at AlphaSense.

Affected versions

Go

PackageVulnerableFixed in
helm.sh/helm/v3
< 3.17.3
3.17.3

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

helm.sh/helm/v3 Go → 3.17.3

go
go get helm.sh/helm/v3@v3.17.3 && go mod tidy

Severity breakdown

CVSS 3.1 6.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-121: Stack-based Buffer Overflow

A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).

How to prevent it
  • Operation, Build and Compilation: Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.
  • Architecture and Design: Use an abstraction library to abstract away risky APIs. Not a complete solution.
  • Implementation: Implement and perform bounds checking on input.
  • Implementation: Do not use dangerous functions such as gets. Use safer, equivalent functions which check for boundary errors.
  • Operation, Build and Compilation: Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code. Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as "rebasing" (for Windows) and "prelinking" (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking. For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].

CWE-674: Uncontrolled Recursion

The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

How to prevent it
  • Implementation: Ensure that an end condition will be reached under all logic conditions. The end condition may include checking against the depth of recursion and exiting with an error if the recursion goes too deep. The complexity of the end condition contributes to the effectiveness of this action.
  • Implementation: Increase the stack size.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-hr2v-4r36-88hr
Helm Chart extraction output directory collapse via `Chart.yaml` name dot-segment
Medium Also affects helm.sh/helm/v3
GHSA-f9f8-9pmf-xv68
Helm May Panic Due To Incorrect YAML Content
Medium Also affects helm.sh/helm/v3
GHSA-9h84-qmv7-982p
Helm Charts with Specific JSON Schema Values Can Cause Memory Exhaustion
Medium Also affects helm.sh/helm/v3
GHSA-557j-xg8c-q2mm
Helm vulnerable to Code Injection through malicious chart.yaml content
High Also affects helm.sh/helm/v3
GHSA-4hfp-h4cw-hj8p
Helm Allows A Specially Crafted Chart Archive To Cause Out Of Memory Termination
Medium Also affects helm.sh/helm/v3
GHSA-r53h-jv2g-vpx6
Helm's Missing YAML Content Leads To Panic
High Also affects helm.sh/helm/v3
GHSA-v53g-5gjp-272r
Helm dependency management path traversal
Medium Also affects helm.sh/helm/v3
GHSA-pwcw-6f5g-gxf8
Helm vulnerable to information disclosure via getHostByName Function
Medium Also affects helm.sh/helm/v3
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor