Inspektor Gadget has a Command Injection vulnerability in Makefile.build
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-77.
Summary
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.51.1 fixes the issue.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| backstage | inspektor-gadget | before 0.51.1 | 0.51.1 | Patch available | CNA |
| — | github.com/inspektor-gadget/inspektor-gadget (Go) | before 0.51.1 | 0.51.1 | Patch available | GHSA-79qw-g77v-2vfh |
- inspektor-gadget Vendorbackstage Affected before 0.51.1 Fixed in 0.51.1 Patch available CNA
- github.com/inspektor-gadget/inspektor-gadget (Go) Vendor— Affected before 0.51.1 Fixed in 0.51.1 Patch available GHSA-79qw-g77v-2vfh
Remediation
- Fix · CNA inspektor-gadget (inspektor-gadget) Fixed in 0.51.1
- Fix · GHSA-79qw-g77v-2vfh github.com/inspektor-gadget/inspektor-gadget (Go) Fixed in 0.51.1 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-24905
- 2026-10-03 Alias added: GHSA-79qw-g77v-2vfh
References
Exploit 1
Patch 1
More backstage Inspektor Gadget vulnerabilities
- TI-2026-21010 Inspektor Gadget uses unsanitized ANSI Escape Sequences In `columns` Output Mode CVSS 4.0MEDIUM 6.9
- TI-2026-24442 Inspektor Gadget: Tracing Denial of Service via Event Flooding CVSS 4.0MEDIUM 4.8
Sources
- CVE-2026-24905 · CVE Program
- CVE-2026-24905 · NVD
- FIRST EPSS
- GHSA-79qw-g77v-2vfh · GitHub Advisory Database · CC BY 4.0
- CVE-2026-24905 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences