September 5, 2026
OS Command Injection in ip link show via Unsanitized param Argument
1. Executive Summary

By Yassin Hamada
7 min read
1. Executive Summary
The ip link show handler in the affected application constructs a shell command by directly concatenating a user-supplied argument (param) into a string that is subsequently executed via subprocess.getstatusoutput(). Because this function invokes the underlying command through a system shell, any shell metacharacters present in param are interpreted by that shell rather than treated as a literal, opaque argument value.
This allows an attacker who controls the param value to append additional, arbitrary operating system commands to the one the application intended to run. A confirmed proof-of-concept demonstrates that supplying eth0; id as the argument results in execution of the injected id command on the host.
This is a classic OS Command Injection vulnerability (CWE-78). It matters because it collapses the distinction between "data supplied by a user" and "commands executed by the system" โ a distinction that structured process-execution APIs exist specifically to preserve. What an attacker can achieve is execution of arbitrary commands in the security context of the vulnerable process; the practical severity of that capability in a given deployment depends on factors addressed in Section 11.
2. Vulnerability Overview
- Vulnerability class: OS Command Injection (CWE-78: Improper Neutralization of Special Elements used in an OS Command)
- Affected functionality: The
ip link showhandler, specifically the code path that shells out to an interface-configuration utility referenced asIFCONFIG - Attacker-controlled input: The
paramvalue, sourced fromargv(command-line arguments supplied to the program) - Vulnerable operation: Construction and execution of a shell command string via
subprocess.getstatusoutput() - Security consequence: Arbitrary command execution in the security context of the vulnerable process (Observed / Confirmed via PoC)
3. Technical Root Cause
The vulnerable line is:
status, res = subprocess.getstatusoutput(IFCONFIG + " -v " + param + " 2>/dev/null")status, res = subprocess.getstatusoutput(IFCONFIG + " -v " + param + " 2>/dev/null")Walking through the mechanics step by step:
- Where
paramoriginates.paramis derived fromargvโ that is, from command-line arguments passed into the program at invocation. It is external, caller-supplied input.
2. Why it is attacker-controlled. Because param comes directly from argv with no indication in the provided code that it passes through any validation, allow-listing, or sanitization step before use, any value the invoking party chooses to supply is carried forward unmodified into the command string.
3. How it is incorporated into the command. The code builds the final command using plain string concatenation: the path to IFCONFIG, a literal " -v " flag, the raw param value, and a literal " 2>/dev/null" redirection. There is no argument separation โ everything is flattened into a single string.
4. Why shell interpretation occurs. subprocess.getstatusoutput() executes its argument through /bin/sh (or the platform-equivalent shell). This is a defining characteristic of the function: it does not execute a program with an explicit argument list โ it hands a single string to a shell for interpretation, exactly as if that string had been typed at a shell prompt.
5. How shell metacharacters alter command execution. Because the shell parses the entire string, any shell metacharacter embedded within param โ such as ;, |, &&, `, or $() โ is not treated as literal data. It is interpreted according to shell grammar. A semicolon (;), for instance, terminates one command and begins a new one within the same shell invocation.
6. Why this constitutes OS Command Injection. The application's intent was to pass param as a single, inert argument value to IFCONFIG. Because the value is concatenated into a shell string rather than passed as an isolated argument, the boundary between "argument" and "command" collapses. The attacker is not just supplying data โ they are supplying additional shell syntax that the shell will execute with the same privileges as the original command. This is the precise mechanism that defines OS Command Injection.
4. Exploitation Walkthrough
Confirmed Proof of Concept:
ip link show "eth0; id"ip link show "eth0; id"Here, param is set to the string eth0; id.
Conceptual transformation:
The application intends to build and execute:
<IFCONFIG_PATH> -v eth0; id 2>/dev/null<IFCONFIG_PATH> -v eth0; id 2>/dev/nullNote that this is not one command โ it is the shell string <IFCONFIG_PATH> -v eth0 followed by ; id 2>/dev/null. Because the shell parses ; as a command separator, it does not see one command with a strangely-formatted argument. It sees two sequential, independent commands:
<IFCONFIG_PATH> -v eth0โ the command the application intended to run.idโ a second, fully independent command, injected by the attacker, with its stderr redirected to/dev/nulldue to the trailing redirection originally intended for the first command.
The shell executes both in sequence. The second command โ id โ was never intended by the application's author to run at all. Its execution, under the identity and privileges of the process invoking the vulnerable code, is the confirmed impact of this vulnerability.
id is used here specifically because it is a safe, non-destructive, universally available command whose output (user and group identity) is sufficient to conclusively demonstrate arbitrary command execution without needing to inspect, modify, or exfiltrate any data. No destructive payloads, persistence mechanisms, credential access, or post-exploitation techniques are described or required to confirm this vulnerability class.
5. Impact
Observed / Confirmed: Arbitrary command execution in the security context of the vulnerable process, demonstrated via execution of an injected id command.
Potential / Deployment-dependent: The broader consequences of this capability scale with the privileges and environment of the vulnerable process, none of which are established by the evidence provided:
- Confidentiality impact: If the vulnerable process has read access to sensitive files, network resources, or credentials, an attacker could potentially use command injection to read them. Whether such access exists is Not determined.
- Integrity impact: If the vulnerable process has write access to configuration, application data, or system files, injected commands could potentially modify them. Whether such access exists is Not determined.
- Availability impact: Depending on process privileges, an attacker could potentially disrupt the host or service. Whether this is feasible in a given deployment is Not determined.
It is important to distinguish clearly: what has been directly demonstrated is execution of a single, benign, informational command (id). What is theoretically possible โ reading files, modifying state, disrupting availability โ depends entirely on the privilege level of the vulnerable process and its runtime environment, neither of which is established by the confirmed evidence. This report does not claim these broader impacts as demonstrated; it identifies them as the general category of risk associated with arbitrary command execution.
6. Why This Happens
The underlying secure-coding failure is the construction of a shell command through string concatenation of trusted and untrusted data, followed by execution through a shell that interprets that combined string as syntax rather than as inert data.
The core mistakes, layered together:
- Shell command construction via concatenation: Building the eventual command as a single string (
IFCONFIG + " -v " + param + " 2>/dev/null") merges the fixed, trusted portions of the command with the variable, untrusted portion (param) into one undifferentiated blob. - Attacker-controlled input:
paramoriginates fromargv, external input with no described validation step. - Shell interpretation:
subprocess.getstatusoutput()routes the resulting string through a shell, which actively parses it for metacharacters, operators, and syntax โ rather than treating it as a single opaque token. - Missing argument isolation: Because the command is never expressed as a structured list of discrete arguments, there is no boundary the shell is obligated to respect between "the flag," "the value," and "the redirection." Everything is just characters in a string, and the shell's grammar governs how those characters are grouped and executed.
The safe alternative โ passing arguments as a structured array with shell=False โ avoids all of this by never invoking a shell at all. Each element of the array is passed directly to the operating system's process-creation mechanism as a discrete, literal argument. There is no parsing step in which metacharacters can be reinterpreted as command syntax, because there is no shell present to perform that interpretation.
7. Remediation
Recommended fix (preferred):
subprocess.run([IFCONFIG, "-v", param], shell=False)subprocess.run([IFCONFIG, "-v", param], shell=False)This is preferable because it eliminates the shell from the execution path entirely. param is passed as a single, discrete element of an argument array. Regardless of what characters param contains โ semicolons, pipes, backticks, or otherwise โ it is delivered to the target program as one literal argument value. There is no intermediate shell to parse it, so shell metacharacters lose their special meaning entirely; they become ordinary characters within a single argument string.
Alternative mitigation:
shlex.quote(param)shlex.quote(param)shlex.quote() can be used to escape a string so that it is treated as a single, literal token if it must be passed through a shell. This reduces risk when used correctly, but it is a mitigation applied to a fundamentally shell-based design, not a removal of the underlying risk. Escaping logic can be subject to subtle mistakes, edge cases, or inconsistent application across a codebase. The argument-array plus shell=False approach is preferred because it removes the shell โ and therefore the entire class of shell-metacharacter risk โ rather than attempting to neutralize it defensively at each call site.
Caveats: Whether param is expected to contain any characters requiring special handling even in a non-shell context (for example, if IFCONFIG itself performs additional parsing of its argument) is Not determined from the evidence provided and should be verified against the target utility's own argument-handling behavior.
8. Secure Coding Lesson
Never concatenate untrusted input into a string that will be interpreted by a shell. Whenever an operating system command must be executed with a variable, externally-influenced argument, prefer structured process-execution APIs that accept arguments as a discrete list and execute the target program directly โ with shell interpretation disabled. This preserves a strict boundary between "data" and "syntax" that string concatenation into a shell command inherently destroys.
9. Disclosure Timeline
Disclosure dates: Not publicly specified.
10. CVE Status
CVE Candidate: CAN-2026-2035735
Final CVE ID: Not yet confirmedCVE Candidate: CAN-2026-2035735
Final CVE ID: Not yet confirmedThis vulnerability has been submitted to and published by MITRE under the candidate identifier above. As of this writing, MITRE has not yet issued a final, formatted CVE-2026-XXXXX identifier. This write-up will be updated with the final CVE ID and a link to the official record once it is confirmed and published.
11. Severity / CVSS
Reported score: CVSS 10.0 (Critical), as assigned as part of the MITRE submission.
A CVSS 10.0 rating represents the maximum possible severity under the CVSS standard, typically corresponding to a combination of: no privileges required, no user interaction required, network-based attack vector, and complete impact to confidentiality, integrity, and availability.
The technical evidence confirmed directly in this report โ a handler triggered via a command-line argument (argv) โ does not by itself specify whether the vulnerable code path is reachable locally only or exposed to remote/untrusted parties, nor does it specify the privilege level of the invoking process. These are exactly the factors that typically drive a score toward the 10.0 ceiling. This report presents 10.0/Critical as the official score assigned by MITRE as part of the submission; the deployment-specific factors that support that rating (attack vector, privilege level, authentication requirements) are Not independently detailed in this write-up beyond what is stated here. A link to the finalized public CVE record will be added once available, so readers can review MITRE's full scoring rationale directly.
12. Conclusion
This vulnerability results from executing attacker-controlled input (param) through a system shell after concatenating it directly into a command string, rather than passing it as an isolated, structured argument. The confirmed proof-of-concept (eth0; id) demonstrates that shell metacharacters within param are interpreted as command syntax, allowing arbitrary command execution in the security context of the vulnerable process. MITRE has assigned this issue a CVSS score of 10.0 (Critical) under candidate identifier CAN-2026-2035735, pending final CVE ID confirmation. The recommended remediation is to eliminate the shell from the execution path entirely by using subprocess.run([IFCONFIG, "-v", param], shell=False), which passes param as a discrete argument and removes the conditions under which shell-metacharacter injection is possible.
This is the author's first published CVE submission. This write-up will be updated with the final CVE identifier and a link to the official MITRE record once confirmation is received.