{"answers":{"affected":"3 open source packages ship an affected version, including github.com/inspektor-gadget/inspektor-gadget. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-24905 in the wild and no public exploit code.","fix":"Upgrade github.com/inspektor-gadget/inspektor-gadget to 0.51.1 or later.","what":"CVE-2026-24905 is a medium-severity command injection vulnerability in inspektor-gadget, published on 29 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-24905 and fix it if it is affected.\n\nWhat it is: CVE-2026-24905 is a medium-severity command injection vulnerability in inspektor-gadget, published on 29 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-24905 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/inspektor-gadget/inspektor-gadget (Go): affected all versions; fixed in 0.51.1\n- github.com/inspektor-gadget/inspektor-gadget (Go): affected all versions; fixed in 0.51.1\n- github.com/inspektor-gadget/inspektor-gadget (Go): affected all versions; fixed in 0.51.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-24905/ (Markdown: https://insights.sbomify.com/CVE-2026-24905/index.md)","id":"CVE-2026-24905","markdown":"https://insights.sbomify.com/CVE-2026-24905/index.md","name":"CVE-2026-24905","record":{"aliases":["GHSA-79qw-g77v-2vfh","GO-2026-5211"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Kubernetes eBPF tool","requires_auth":"none","summary":"An attacker controlling gadget manifest options can execute arbitrary commands on the host or build container during image building.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"inspektor_gadget","vendor":"linuxfoundation"}],"cvss":{"score":6.6,"severity":"medium","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Inspektor Gadget has a Command Injection vulnerability in Makefile.build","id":"CVE-2026-24905","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"October CMS has Stored XSS in its Backend Editor Markup Classes","id":"CVE-2026-24906"},"packages":[{"ecosystem":"Go","fixed":["0.51.1"],"introduced":["0"],"last_affected":[],"package":"github.com/inspektor-gadget/inspektor-gadget","purl":null,"source":"GHSA-79qw-g77v-2vfh"},{"ecosystem":"Go","fixed":["0.51.1"],"introduced":["0"],"last_affected":[],"package":"github.com/inspektor-gadget/inspektor-gadget","purl":"pkg:golang/github.com/inspektor-gadget/inspektor-gadget","source":"GHSA-79qw-g77v-2vfh"},{"ecosystem":"Go","fixed":["0.51.1"],"introduced":["0"],"last_affected":[],"package":"github.com/inspektor-gadget/inspektor-gadget","purl":"pkg:golang/github.com/inspektor-gadget/inspektor-gadget","source":"GO-2026-5211"}],"prev":{"headline":"TrustTunnel has `client_random_prefix` rule bypass via fragmented or partial TLS ClientHello","id":"CVE-2026-24904"},"products":["inspektor-gadget"],"published":"2026-01-29","related":[{"cvss_score":6.9,"headline":"Inspektor Gadget uses unsanitized ANSI Escape Sequences In `columns` Output Mode","id":"CVE-2026-25996","kev_date_added":null,"published":"2026-02-12"},{"cvss_score":4.8,"headline":"Inspektor Gadget: Tracing Denial of Service via Event Flooding","id":"CVE-2026-31890","kev_date_added":null,"published":"2026-03-12"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-04-30","vendors":["inspektor-gadget"]},"summary":"An attacker controlling gadget manifest options can execute arbitrary commands on the host or build container during image building.","url":"https://insights.sbomify.com/CVE-2026-24905/"}