CVE-2026-24905

Inspektor Gadget is a set of tools and framework for data collection and system inspection on Kubernetes clusters and Linux hosts using eBPF. The `ig` binary provides a subcommand for image building, used to generate custom gadget OCI images. A part of this functionality is implemented in the file `inspektor-gadget/cmd/common/image/build.go`. The `Makefile.build` file is the Makefile template employed during the building process. This file includes user-controlled data in an unsafe fashion, specifically some parameters are embedded without an adequate escaping in the commands inside the Makefile. Prior to version 0.48.1, this implementation is vulnerable to command injection: an attacker able to control values in the `buildOptions` structure would be able to execute arbitrary commands during the building process. An attacker able to exploit this vulnerability would be able to execute arbitrary command on the Linux host where the `ig` command is launched, if images are built with the `--local` flag or on the build container invoked by `ig`, if the `--local` flag is not provided. The `buildOptions` structure is extracted from the YAML gadget manifest passed to the `ig image build` command. Therefore, the attacker would need a way to control either the full `build.yml` file passed to the `ig image build` command, or one of its options. Typically, this could happen in a CI/CD scenario that builds untrusted gadgets to verify correctness. Version 0.48.1 fixes the issue.
Configurations

Configuration 1 (hide)

cpe:2.3:a:linuxfoundation:inspektor_gadget:*:*:*:*:*:*:*:*

History

16 Mar 2026, 18:02

Type Values Removed Values Added
Summary
  • (es) Inspektor Gadget es un conjunto de herramientas y un framework para la recopilación de datos e inspección de sistemas en clústeres de Kubernetes y hosts Linux usando eBPF. El binario `ig` proporciona un subcomando para la construcción de imágenes, utilizado para generar imágenes OCI de gadgets personalizadas. Una parte de esta funcionalidad está implementada en el archivo `inspektor-gadget/cmd/common/image/build.go`. El archivo `Makefile.build` es la plantilla de Makefile empleada durante el proceso de construcción. Este archivo incluye datos controlados por el usuario de manera insegura; específicamente, algunos parámetros se incrustan sin un escape adecuado en los comandos dentro del Makefile. Antes de la versión 0.48.1, esta implementación es vulnerable a inyección de comandos: un atacante capaz de controlar valores en la estructura `buildOptions` podría ejecutar comandos arbitrarios durante el proceso de construcción. Un atacante capaz de explotar esta vulnerabilidad podría ejecutar comandos arbitrarios en el host Linux donde se lanza el comando `ig`, si las imágenes se construyen con la bandera `--local` o en el contenedor de construcción invocado por `ig`, si la bandera `--local` no se proporciona. La estructura `buildOptions` se extrae del manifiesto YAML del gadget pasado al comando `ig image build`. Por lo tanto, el atacante necesitaría una forma de controlar el archivo `build.yml` completo pasado al comando `ig image build`, o una de sus opciones. Típicamente, esto podría ocurrir en un escenario de CI/CD que construye gadgets no confiables para verificar su corrección. La versión 0.48.1 corrige el problema.
CPE cpe:2.3:a:linuxfoundation:inspektor_gadget:*:*:*:*:*:kubernetes:*:* cpe:2.3:a:linuxfoundation:inspektor_gadget:*:*:*:*:*:*:*:*

03 Mar 2026, 15:22

Type Values Removed Values Added
First Time Linuxfoundation
Linuxfoundation inspektor Gadget
CPE cpe:2.3:a:linuxfoundation:inspektor_gadget:*:*:*:*:*:kubernetes:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8
References () https://github.com/inspektor-gadget/inspektor-gadget/commit/7c83ad84ff7a68565655253e2cf1c5d2da695c1a - () https://github.com/inspektor-gadget/inspektor-gadget/commit/7c83ad84ff7a68565655253e2cf1c5d2da695c1a - Patch
References () https://github.com/inspektor-gadget/inspektor-gadget/security/advisories/GHSA-79qw-g77v-2vfh - () https://github.com/inspektor-gadget/inspektor-gadget/security/advisories/GHSA-79qw-g77v-2vfh - Exploit, Vendor Advisory

29 Jan 2026, 22:15

Type Values Removed Values Added
New CVE

Information

Published : 2026-01-29 22:15

Updated : 2026-03-16 18:02


NVD link : CVE-2026-24905

Mitre link : CVE-2026-24905

CVE.ORG link : CVE-2026-24905


JSON object : View

Products Affected

linuxfoundation

  • inspektor_gadget
CWE
CWE-77

Improper Neutralization of Special Elements used in a Command ('Command Injection')

CWE-78

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')