{"cve":"CVE-2026-24905","nvd":{"published":"2026-01-29T22:15:55.200","modified":"2026-06-17T10:23:47.117","status":"Modified","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.","cvss_v4":{"vector":"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","score":6.6},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8},"cwes":["CWE-77","CWE-78"],"references":["https://github.com/inspektor-gadget/inspektor-gadget/commit/7c83ad84ff7a68565655253e2cf1c5d2da695c1a","https://github.com/inspektor-gadget/inspektor-gadget/commit/d9bf2fe4a180dad33ce57ca793ff4799ee7b8320","https://github.com/inspektor-gadget/inspektor-gadget/security/advisories/GHSA-79qw-g77v-2vfh"],"products":["linuxfoundation:inspektor_gadget"],"source":"nvd","synced_at":"2026-10-19T22:22:27.261130201+00:00"},"epss":{"cve":"CVE-2026-24905","score":0.01403,"percentile":0.72561,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-79qw-g77v-2vfh","url":"https://osv.dev/vulnerability/GHSA-79qw-g77v-2vfh","summary":"Inspektor Gadget: Command Injection via malicious buildOptions manipulation","modified":"2026-06-25T19:56:34.789618286Z","packages":[{"ecosystem":"Go","name":"github.com/inspektor-gadget/inspektor-gadget","purl":"pkg:golang/github.com/inspektor-gadget/inspektor-gadget","ranges":["<0.51.1"],"fixed":["0.51.1"]}]},{"id":"GO-2026-5211","url":"https://osv.dev/vulnerability/GO-2026-5211","summary":"Inspektor Gadget: Command Injection via malicious buildOptions manipulation in github.com/inspektor-gadget/inspektor-gadget","modified":"2026-06-25T19:45:15.257198267Z","packages":[{"ecosystem":"Go","name":"github.com/inspektor-gadget/inspektor-gadget","purl":"pkg:golang/github.com/inspektor-gadget/inspektor-gadget","ranges":["<0.51.1"],"fixed":["0.51.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}