CVE-2026-24905: Inspektor Gadget - Command Injection
- Cve: CVE-2026-24905
- Name: Inspektor Gadget - Command Injection
- Description: 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.
- Impact: Attackers can execute arbitrary commands on the Linux host or build container during image building, potentially leading to full system compromise.
- Remediation: Update to version 0.48.1 or later.
- Vulnerability type: command_injection
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.8
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.01392
- Epss percentile: 0.73065
- Assignee: [email protected]
- Published at: 2026-01-29T22:15:55Z
- Age in days: 299
- Modified at: 2026-06-17T10:23:47Z
- Patch available: yes
- Public exploits total: 1
- References total: 3
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-24905
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-77 | Improper Neutralization of Special Elements used in a Command |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/inspektor-gadget/inspektor-gadget/security/advisories/GHSA-79qw-g77v-2vfh | nvd | 2026-01-29 |
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| linuxfoundation:inspektor_gadget | < 0.48.1 | no | nvd | /v1/products/linuxfoundation/inspektor_gadget |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| inspektor-gadget/inspektor-gadget | commit, fix, package, security_advisory | yes | /v1/repositories/inspektor-gadget/inspektor-gadget |
Index
- Repositories: 2
- Repositories high signal: 2
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2026-01-29
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts