Advisories for Golang/Github.com/Inspektor-Gadget/Inspektor-Gadget package

2026

Inspektor Gadget: Unprivileged container can crash USDT note parser via crafted ELF (no shipped gadget affected)

A malicious container can crash or destabilize the privileged Inspektor Gadget process when a gadget using USDT probes is deployed. The vulnerability is in the USDT note parser (pkg/uprobetracer/usdt.go) which is invoked when a gadget with a SEC("usdt/…") section attaches to a target binary. An unprivileged process can place a crafted ELF binary at the expected library path, triggering one of two attack vectors: Panic (immediate crash): A stapsdt note …

Inspektor Gadget: Command Injection via malicious buildOptions manipulation

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 following is the code responsible to construct the build command: func buildCmd(options buildOptions) []string { cmd := []string{ "make", "-f", filepath.Join(options.outputDir, "Makefile.build"), "-j", fmt.Sprintf("%d", runtime.NumCPU()), "OUTPUTDIR=" + options.outputDir, "CFLAGS=" + options.cFlags, "FORCE_COLORS=" + options.forceColorsFlag, } if options.ebpfSourcePath != "" { cmd = …

Inspektor Gadget uses unsanitized ANSI Escape Sequences In `columns` Output Mode

String fields from eBPF events in columns output mode are rendered to the terminal without any sanitization of control characters or ANSI escape sequences. Therefore, a maliciously forged – partially or completely – event payload, coming from an observed container, might inject the escape sequences into the terminal of ig operators, with various effects. The columns output mode is the default when running ig run interactively.

2025