LiveActive security incident?Get immediate response
CVE Record

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

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.

MediumCVSS 6.6Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

Inspektor Gadget, a Kubernetes inspection tool, contains a flaw in its image-building feature that lets a malicious build manifest run arbitrary commands on the host or container performing the build. The risk centers on automated pipelines that build untrusted gadget images. Upgrading to version 0.51.1 resolves the issue.

Executive priority

Patch on the next standard maintenance window for teams using Inspektor Gadget in CI/CD that processes external gadget manifests; lower urgency for operator-only use. No evidence of active exploitation, but the path from manifest to code execution is direct enough to warrant prompt action where build automation is exposed.

Technical view

The `ig image build` subcommand renders a `Makefile.build` template using values from the `buildOptions` field of a YAML gadget manifest without sufficient escaping. An attacker controlling the manifest can inject shell metacharacters that execute during make invocation. With `--local`, commands run on the host; otherwise they run inside the build container. CWE-77/CWE-78 command injection. Fixed in 0.51.1.

Likely exposure

Limited to environments that build Inspektor Gadget OCI gadget images from manifests sourced from untrusted contributors, such as CI/CD systems validating community or pull-request gadgets. Interactive operators building only first-party manifests face minimal exposure.

Exploitation context

CVSS 4.0 score 6.6 with exploit maturity Proof-of-Concept per the published vector. Not listed in CISA KEV and no public reports of in-the-wild exploitation are cited in the source bundle. Attack requires control over the build YAML or its `buildOptions` values.

Researcher notes

Root cause is unsanitized interpolation of `buildOptions` values into the `Makefile.build` template used by `cmd/common/image/build.go`. Entry point is the YAML manifest; impact pivots on whether `--local` is set (host vs build container). Fix lands in 0.51.1; review the two referenced commits for the escaping change. Consider detection via CI artifact diffing of generated Makefiles and alerting on unusual shell metacharacters in `buildOptions` strings.

Mitigation direction

  • Upgrade Inspektor Gadget `ig` to version 0.51.1 or later across all build hosts and CI runners.
  • Restrict who can submit or modify `build.yml` manifests fed to `ig image build` in pipelines.
  • Run gadget builds inside isolated, ephemeral containers without host credentials or persistent secrets.
  • Avoid the `--local` flag when building manifests from untrusted or external sources.
  • Review CI/CD workflows that auto-build community gadgets and add manifest review gates.

Validation and detection

  • Inventory hosts and pipelines running `ig` and capture the installed version via `ig version`.
  • Confirm package or container image references resolve to Inspektor Gadget 0.51.1 or newer after upgrade.
  • Audit CI logs for `ig image build` invocations and identify the source of supplied `build.yml` files.
  • Verify pull-request workflows do not build untrusted manifests with `--local` against shared runners.
  • Cross-check vendor advisory GHSA-79qw-g77v-2vfh and the linked fix commits for any backport guidance.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-77: Command execution behavior lookup

Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · medium confidence lookup

CWE-78: Command execution behavior lookup

Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
description · low confidence lookup

Container behavior lookup

The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-24905 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.6 (4.0)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.6CVSS 4.0MediumCVSS: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:PPrimary CVE score

Vulnerability scoring details

Base CVSS 4.0 score

6.6Medium
CVSS 4.0 vector shape for CVE-2026-24905Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
inspektor-gadgetinspektor-gadget< 0.51.1Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-77 · source CWE mapping

Improper Neutralization of Special Elements used in a Command ('Command Injection')

Improper Neutralization of Special Elements used in a Command ('Command Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-78 · source CWE mapping

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.