GHSA-53c4-hhmh-vw5q BIT-helm-2022-23525 CVE-2022-23525 GO-2022-1165
Helm vulnerable to denial of service through through repository index file
- 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 _repo_ package that can cause a segmentation violation. Applications that use functions from the _repo_ package in the Helm SDK can have a Denial of Service attack when they use this package and it panics.
Impact
The _repo_ package contains a handler that processes the index file of a repository. For example, the Helm client adds references to chart repositories where charts are managed. The _repo_ package parses the index file of the repository and loads it into structures Go can work with. Some index files can cause array data structures to be created causing a memory violation.
Applications that use the _repo_ package in the Helm SDK to parse an index file can suffer a Denial of Service when that input causes a panic that cannot be recovered from.
The Helm Client will panic with an index 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 index files that are correctly formatted before passing them to the _repo_ 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
| Package | Vulnerable | Fixed 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
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why 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
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