# CVE-2026-24905: Inspektor Gadget has a Command Injection vulnerability in Makefile.build

- Severity: Medium 6.6 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.39%, higher than 73% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-01-29T21:29:24.260Z
- Modified: 2026-06-25T19:56:34.789Z
- Also known as: GHSA-79qw-g77v-2vfh, GO-2026-5211
- Weaknesses: CWE-77, CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- inspektor-gadget inspektor-gadget: < 0.51.1
- github.com/inspektor-gadget/inspektor-gadget (Go): before 0.51.1
- linuxfoundation inspektor_gadget: before 0.48.1

## Every score

- GitHub_M: CVSS:4.0 6.6 Medium `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/inspektor-gadget/inspektor-gadget/security/advisories/GHSA-79qw-g77v-2vfh> (exploit, advisory, vendor-advisory, web)
- <https://github.com/inspektor-gadget/inspektor-gadget/commit/7c83ad84ff7a68565655253e2cf1c5d2da695c1a> (fix, patch, web)
- <https://github.com/inspektor-gadget/inspektor-gadget/commit/d9bf2fe4a180dad33ce57ca793ff4799ee7b8320> (fix, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-24905> (advisory)
- <https://github.com/inspektor-gadget/inspektor-gadget> (package)

## Sources

- CVE List: [CVE-2026-24905](https://www.cve.org/CVERecord?id=CVE-2026-24905), CVE Terms of Use, modified 2026-04-30
- GitHub Advisory Database: [GHSA-79qw-g77v-2vfh](https://github.com/advisories/GHSA-79qw-g77v-2vfh), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5211](https://pkg.go.dev/vuln/GO-2026-5211), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-24905](https://nvd.nist.gov/vuln/detail/CVE-2026-24905), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-24905 · Whole record: https://cve.day/CVE-2026-24905.json · Rebuilt by cve.day 2026-11-25T22:59:13.306Z
