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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.6
- **CVSS:** 6.6 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None; Exploit maturity: Proof of concept
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 1.63% (percentile 77, 2026-11-26)
- **CWE:** CWE-77, CWE-78
- **Aliases:** GHSA-79qw-g77v-2vfh, GO-2026-5211
- **Published:** 2026-01-29T21:29:24.260Z
- **Modified:** 2026-06-25T19:56:34.789Z

## Who should check

- Projects that depend on Go package github.com/inspektor-gadget/inspektor-gadget (\< 0.51.1)
- Anyone running inspektor-gadget \< 0.51.1

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

## Affected and fixed versions

- Go `github.com/inspektor-gadget/inspektor-gadget`: affected \< 0.51.1; fixed 0.51.1 (osv)
- inspektor-gadget: \< 0.51.1 (cvelist)

## Mitigation

- Upgrade github.com/inspektor-gadget/inspektor-gadget to 0.51.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-24905. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-24905.md
Affected: github.com/inspektor-gadget/inspektor-gadget < 0.51.1
Fixed in: 0.51.1

Steps:
1. Search this machine and project for github.com/inspektor-gadget/inspektor-gadget (Go), inspektor-gadget: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-24905 being exploited?

There is no confirmed exploitation: CVE-2026-24905 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.63% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-24905?

Medium: CVSS 6.6 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-24905?

github.com/inspektor-gadget/inspektor-gadget \< 0.51.1.

### Is there a fix for CVE-2026-24905?

Yes. Fixed in 0.51.1. Upgrade github.com/inspektor-gadget/inspektor-gadget to 0.51.1 or later.

### How do I check if I'm affected by CVE-2026-24905?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/inspektor-gadget/inspektor-gadget/security/advisories/GHSA-79qw-g77v-2vfh>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-24905>
- patch: <https://github.com/inspektor-gadget/inspektor-gadget/commit/7c83ad84ff7a68565655253e2cf1c5d2da695c1a>
- patch: <https://github.com/inspektor-gadget/inspektor-gadget/commit/d9bf2fe4a180dad33ce57ca793ff4799ee7b8320>
- other: <https://github.com/inspektor-gadget/inspektor-gadget>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-24905>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-79qw-g77v-2vfh> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2026-5211> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-24905> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-24905>
