Skip to content

GHSA-67fx-wx78-jx33 BIT-helm-2022-23526 CVE-2022-23526 GO-2022-1166

Helm vulnerable to denial of service through schema file

High Go
Severity
5.3 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.89%
Chance of exploitation in the next 30 days. Higher than 59.34% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-476 NULL Pointer Dereference
Fix
3.10.3
Upgrade helm.sh/helm/v3 to this version or later

Description

Fuzz testing, by Ada Logics and sponsored by the CNCF, identified input to functions in the _chartutil_ package that can cause a segmentation violation. Applications that use functions from the _chartutil_ package in the Helm SDK can have a Denial of Service attack when they use this package and it panics.

Impact

The _chartutil_ package contains a parser that loads a JSON Schema validation file. For example, the Helm client when rendering a chart will validate its values with the schema file. The _chartutil_ package parses the schema file and loads it into structures Go can work with. Some schema files can cause array data structures to be created causing a memory violation.

Applications that use the _chartutil_ package in the Helm SDK to parse a schema file can suffer a Denial of Service when that input causes a panic that cannot be recovered from.

The Helm Client will panic with a schema file that causes a memory violation panic. Helm is not a long running service so the panic will not affect future uses of the Helm client.

Patches

This issue has been resolved in 3.10.3.

Workarounds

SDK users can validate schema files that are correctly formatted before passing them to the _chartutil_ functions.

For more information

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

Credits

Disclosed by Ada Logics in a fuzzing audit sponsored by CNCF.

Affected versions

Go

PackageVulnerableFixed in
helm.sh/helm/v3
< 3.10.3
3.10.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.10.3

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

Severity breakdown

CVSS 3.1 5.3

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

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

Weakness

CWE-476: NULL Pointer Dereference

The product dereferences a pointer that it expects to be valid but is NULL.

How to prevent it
  • Implementation: For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
  • Requirements: Select a programming language that is not susceptible to these issues.
  • Implementation: Check the results of all functions that return a value and verify that the value is non-null before acting upon it.
  • Architecture and Design: Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.
  • Implementation: Explicitly initialize all variables and other data stores, either during declaration or just before the first usage.

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-5xqw-8hwv-wg92
Helm Allows A Specially Crafted JSON Schema To Cause A Stack Overflow
Medium 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

Credits: Ada Logics, in a fuzzing audit sponsored by CNCF

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