Skip to content
RCE Write-up Advanced

Charting your way in: Injection de templates Helm

A Helm chart template inserted user-supplied values into YAML without escaping, so a developer who could only edit values files could inject extra YAML fields or whole new Kubernetes resources. This let them run arbitrary commands in pods or create privileged workloads and namespaces, likely compromising the cluster.

Paul Barbé Follow

Published on synacktiv.com

Rédigé par Paul Barbé - 29/06/2026 - dans Pentest - Téléchargement

Paul Barbé, on synacktiv.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the chart template interpolates values directly into YAML without quoting, type conversion or schema validation, so multiline values break out of their intended context.

Impact

An attacker limited to editing values could add fields to existing workloads, such as a privileged security context or a command, or create new resources like namespaces and pods, which would very likely lead to cluster compromise; Helm 4's server-side apply rejects undeclared fields by default but the technique still works with an extra absorbing resource.

What the attacker needed

Ability to edit chart values; chart template uses unescaped values; ArgoCD or Helm deploys the chart

The fix

Charts should quote string values, convert numbers with int or float64, optionally check values with regexMatch, and validate values against a values.schema.json; ArgoCD AppProjects should also whitelist only the resources needed.

How it was found

  1. Create a Helm chart with a template that inserts a value such as the image tag inside quotes.
  2. Set that value to a multiline block that closes the quote and adds new fields or a document separator with new resources.
  3. Render the chart with helm template to confirm the injected YAML appears.
  4. Install the chart into the cluster and check that the injected fields or resources were created.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Helm is a tool that builds Kubernetes configuration files from templates plus a file of settings called values. If the template drops a setting into the file without quoting or checking it, someone who can only edit settings can sneak in extra lines that add new fields or even new objects. Here that meant they could add a command to run inside a container or create a privileged pod.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.