Charting your way in Helm template injection#317
Open
carlospolop wants to merge 1 commit into
Open
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://synacktiv.com/en/publications/charting-your-way-in-helm-template-injection.html Content Categories: Based on the analysis, this content was categorized under "Pentesting Cloud -> Kubernetes Pentesting -> Kubernetes Enumeration/Attacks or a new page under Kubernetes Pentesting titled 'Helm Template Injection / YAML Injection'; also cross-reference from Pentesting CI/CD/GitOps if an ArgoCD section exists or is added". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
The blog post describes a Helm template injection / YAML injection vulnerability discovered during a Kubernetes audit where Helm charts were applied through ArgoCD. There is no CVE assigned. The core issue is that attacker-controlled values from
values.yamlare inserted into Kubernetes YAML manifests through.Valueswithout proper escaping, type coercion, or validation. In GitOps setups this is especially dangerous because administrators may allow devel...🔧 Technical Details
Helm
.ValuesYAML injection: If a Helm chart inserts user-controlled values directly into YAML, for examplereplicas: {{ .Values.replicaCount }}, Helm does not automatically escape the value as a YAML scalar. An attacker who controlsvalues.yamlcan use a YAML block scalar such as|to create multiline input and inject additional keys at the correct indentation level. A value intended to be3can become3followed by an injected YAML attribute, causing Helm to render extra fields into the Kubernetes manifest.Quoted context breakout: If the vulnerable value is inside a quoted string, the attacker can close the quote, inject YAML fields, and restore a valid YAML context. Exploitation depends on indentation and YAML parsing behavior. With
|, a trailing newline is appended and may be normalized by Kubernetes into a space. With|-, the attacker can remove the ...🤖 Agent Actions
Continued the run and re-opened the exact modified content plus the references tail.
Confirmed again:
## Referencessection includes the Synacktiv blog and relevant official docsM src/pentesting-cloud/kubernetes-security/kubernetes-basics.md1 file changed, 76 insertions(+)Still not giving the final answer yet, per your instruction.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
📚 Repository Maintenance
All .md files have been checked for proper formatting (headers, includes, etc.).