Skip to content

In-depth lesson · technique

Command injection

What every disclosed Command injection report in the index teaches, put together: how it works, how it changed year by year, where it turns up, and things to try. Every point shows the reports it is seen in.

reports cited in this lesson
370

Learning Server-side injection, step 6

Overview

What it is and why programs pay for it.

Command injection is a remote code execution technique where untrusted input reaches a shell or command interpreter and is run as part of a command. It matters because a single vulnerable parameter can turn a normal feature into full control of the host, often with the privileges of the web server or service. The evidence shows it appearing in logging libraries, proxy settings, router interfaces, CI pipelines, database connection fields and many other places where a value is passed to an external program.

Programs care because command injection usually leads to arbitrary command execution, data theft, lateral movement and persistence. In the reports behind this lesson it ranges from argument injection that overwrites files to unauthenticated remote code execution on appliances and management consoles. It is most often found where user-controlled values are concatenated into command strings, inserted into generated configuration files, or passed as command-line options without a separator.

Common locations include web management interfaces for network devices, CI and build systems, git and version control wrappers, file upload and image processing features, mail and SMTP handling, and desktop clients that open external links or protocol handlers. The lesson covers 393 reports, with 41 having summaries and 42 paid, so the evidence is broad but not every report gives full detail.

How it works

The mechanics, as the reports show them.

The core mistake is that a value the user can influence is treated as part of a command rather than as data. This happens when input is inserted into a shell command string without escaping, concatenated into a command line without a separator so it is read as options, or written into a generated configuration file where newlines add new directives. The evidence shows each of these patterns across logging, proxy, ingress and CI features.

A second pattern is indirect: a configuration value is embedded in a script that users are told to run, or interpolated into a query string that is later evaluated as code. The same effect appears when environment variable names are not escaped, when a package name is concatenated into a shell command, or when a library compiles filter input into a function. In each case the boundary between data and code is lost.

The path from input to execution often runs through an external tool: git, a proxy command, an image converter, a mail library, a package manager or a CLI agent. If the tool receives the value as an argument, a leading double dash can turn it into an option; if it receives it inside a shell string, metacharacters can start a new command. The evidence shows both argument injection and shell injection variants.

What makes it possible is usually a missing or incomplete defence: no validation, no escaping, no separator before user values, or a blacklist that misses a flag or directive. The reports show fixes that were bypassed with trailing whitespace, null bytes, grouped short flags, Unicode characters and unquoted variables. This means a hunter should test not only the obvious payload but also the edges of any filter.

Impact is confirmed by showing that the injected command actually runs. Where output is not returned, out-of-band interaction is used to confirm blind execution. The evidence includes cases where a logged field reached a vulnerable logging library, where a hostname reached a proxy command, and where a router handled WAN-side requests without authentication. These show that the technique is not limited to obvious shell parameters.

Year by year

13 years

What each year's disclosed reports show, newest first. A year with few reports says less.

Reports per yearPeak 2026: 318
Reports per year
20019
20093
20106
20112
20124
20132
201413
201516
201623
2017128
201883
201988
2020140
2021115
2022118
2023175
2024145
2025220
2026318
  1. 2026

    318 reports · median $7,250

    New this year2

    • Cloud provider SDKs and developer tooling executing commands from configuration first appear in the disclosed reports this year.
    • NASA web services and scientific tools with command injection first appear in the disclosed reports this year.

    Kept working5

    • Passing a filename containing shell syntax to a scientific data processing tool and checking for command injection was reported in the disclosed reports.
    • Submitting a GeoJSON shape to a trajectory subsetting service and checking whether fields reach a shell command appeared in the disclosed reports.
    and 3 more
  2. 2025

    220 reports · median $2,067

    New this year1

    • Many reports concerning the curl project's own scripts and command line handling first appear in the disclosed reports this year.

    Kept working3

    • Testing a command line tool's argument handling for injection through crafted inputs appeared in the disclosed reports.
    • Testing path traversal and command injection together on an enterprise security manager was effective in the disclosed reports.
    and 1 more
  3. 2024

    145 reports · median $523

    New this year2

    • Command injection in GitHub Enterprise Server management console components reaching root first appears in the disclosed reports this year.
    • Command injection in partner portal endpoints at a single vendor first appears in the disclosed reports this year.

    Kept working5

    • Testing management console editors and their underlying services for command injection leading to root was a major theme in the disclosed reports.
    • Testing template fields in management tooling for server-side template injection that reaches a shell was reported in the disclosed reports.
    and 3 more
Every point, year by year

Where it is found

48

The features and places the reports found it in, most-reported first.

  1. The hostname substituted into a proxy command or proxy jump setting.

    Seen in 2 reports
  2. WAN-side request handling on a router.

    Seen in 1 report
  3. The run_id value in a DAG trigger configuration.

    Seen in 1 report
  4. The Extra configuration of a database connection.

    Seen in 1 report
  5. The libjars setting of a Sqoop connection.

    Seen in 1 report
View all 48

Root causes

17

The mistakes in the code or configuration behind the reports.

  1. User input was passed to git without a separator, so a leading double dash was treated as a command-line option.

    Seen in 3 reports
  2. User input was inserted into a shell command string without escaping.

    Seen in 3 reports
  3. Values were inserted into generated configuration files without validation, allowing new directives.

    Seen in 3 reports
  4. User input was concatenated into a command line without a separator, so it was read as options.

    Seen in 2 reports
View all 17

Things to try

The most-reported tests in the largest contexts. Tick what you have tried; ticks stay in this browser and carry over to the full checklist. Test only what a program's scope allows.

ticked in this lesson

Other

of 3 ticked
More in Other

Protocol handlers and desktop clients

of 3 ticked
More in Protocol handlers and desktop clients

CI and build pipelines

of 3 ticked
More in CI and build pipelines

Router web interfaces

of 3 ticked
  • Seen in 6 reports
  • Seen in 3 reports
  • Seen in 3 reports
More in Router web interfaces
View more things to try

Bypasses and variations

9

How reports got past filters, encoders and other defences.

  1. The fix for a protocol handler flaw used a blacklist of flags, so try a flag that was left off the list to redirect traffic.

    Seen in 1 report
  2. The signature check compared strings and passed an unescaped filename to PowerShell, so a crafted filename bypasses it.

    Seen in 1 report
  3. Injected xauth commands bypassed forced commands and login-shell restrictions.

    Seen in 1 report
  4. Blacklisting one nginx directive did not stop other directives from being injected through the same annotation.

    Seen in 1 report
  5. An earlier escaping fix was incomplete and could be bypassed with trailing whitespace or periods.

    Seen in 1 report
View all 9

Payouts

59 paid

Public bounties in US dollars, from the data. 59 of 1,836 reports show an amount.

a quarter paid up to
$1,000
median
$3,000
three quarters paid up to
$6,000
highest
$60k

One in ten paid reports was paid $20k or more.

SeverityReportsPaidMedianHighest
Critical 394 9 $6,000 $34k
High 490 9 $2,500 $20k
Medium 157 3 $1,000 $2,400
Low 14 9 $500 $1,000
Informational 5 1 $4,000 $4,000
Unrated 776 28 $4,500 $60k

Typical fixes

8

How programs fixed it, as the reports describe.

  1. Validate and escape values before inserting them into generated configuration.

    Seen in 3 reports
  2. Escape or avoid shell interpretation of user input before building commands.

    Seen in 2 reports
  3. Insert a separator before user values so they cannot be read as options.

    Seen in 1 report
  4. Restrict which configuration-altering environment variables users can set.

    Seen in 1 report
View all 8

Tips for beginners

13

Advice for a first hunt, drawn from the reports.

  1. Start with features that call external programs: image processing, file conversion, git operations, mail sending, package installation and CI build steps. The evidence lists these as common sinks, so they are good first places to look.

    Seen in 5 reports
  2. When you find a filter, test its edges: trailing whitespace, null bytes, grouped short flags, Unicode characters and unquoted variables. The evidence shows several fixes that were bypassed this way, so a blocked payload does not mean the bug is fixed.

    Seen in 4 reports
  3. Look for values that are concatenated into commands without a separator. A leading double dash can turn a value into an option, so test inputs that begin with a dash and see whether the tool treats them as flags rather than data.

    Seen in 3 reports
  4. Check generated configuration files and scripts. If a field accepts newlines, it may add new directives or commands. The evidence shows this in ingress annotations, SMTP settings and scripts users are told to run.

    Seen in 3 reports
  5. For CI and build systems, look at branch names, CI variables and pipeline checkout steps. These are user-influenced values that often reach git or shell commands.

    Seen in 3 reports
View all 13

Guides and techniques

The best explainers, cheat sheets and technique posts on Command injection, from around the web.

Keep learning

Where this lesson fits, and what to read next.

How this is made: our model read every listed Command injection report in the index (our own summary where we have one, otherwise the title and the platform's label), listed the patterns, and merged them. Each point was kept only if the reports it cites exist, are listed and belong here; payouts are computed from the data, not written by the model. Read the originals before relying on a point. Generated 26 Nov 2026 from 393 reports. All Command injection reports.