Skip to content

Bug class · Advanced

Remote code execution

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

median public bounty
$2,000

Covers CWE 94, 77, 78, 95, 96, 502, 1336.

How it works

Full lesson

The pattern behind every report in this class.

Remote code execution is the class of bug where an attacker can make the target system run code of their choosing. In the reports behind this lesson it appears in many forms: command injection in web interfaces, expression language evaluation in Java consoles, unsafe deserialisation in Java and .NET services, memory corruption in file parsers, and workflow injection in CI pipelines. Programs care because a single such bug can hand over the host, its data and its credentials, and because these flaws often sit in internet-facing management interfaces where they are reachable without much effort.

What it usually leads to is full control of the affected service or host: reading files, running commands, moving to other systems, or in the case of CI workflows, stealing tokens and secrets. The evidence shows this repeatedly in security appliances, routers, backup software, industrial software and hosting panels, where a configuration field or a request parameter ends up in a shell command or an evaluator.

It is most often found where user input meets an interpreter: web management interfaces that build shell commands, page-rendering endpoints that evaluate bean or class names as expressions, endpoints that deserialise request data, file parsers handling untrusted documents, and CI workflows that interpolate pull request or issue text into scripts. The reports also show it in ActiveX controls, PDF and media parsers, and machine-learning checkpoint loaders.

The common pattern is that a value the attacker controls reaches a place where it is treated as code rather than data. In command injection, a request parameter such as a hostname, gateway or filename is concatenated into a shell command string without escaping, so shell metacharacters in the value are interpreted by the shell. The evidence shows this across network configuration forms, hosting panel scripts and router CGI endpoints.

Things to try

All 7,400

Each line worked in a disclosed report. Test only what a program's scope allows.

Other 2856

  • Upload an archive containing a server-side script to any feature that extracts archives into a web-accessible or temporary directory, then request the extracted file to see if it executes.
  • Post multipart uploads to endpoints without authentication and check whether files land in a predictable directory.
  • Upload files through every upload action (images, fonts, wallpapers, apps) and check whether extension and content checks are enforced.
  • Upload a crafted file to a file server endpoint and test for code execution.

Management console endpoints 597

  • Enumerate every action handler in a management console and test each named parameter (device id, group id, user name, command id) for SQL injection.
  • Invoke exposed console and scheduler methods without authentication and test for code execution.
  • Access administrative endpoints or methods without authentication, or bypass authentication mechanisms to reach dangerous functions.
  • Send crafted SOAP and servlet requests to Oracle middleware endpoints (voice servlet, Veridata, audit action, emagent URI parameters).

Firmware update and device commands 377

  • Impersonate the update server over plain HTTP and serve a crafted archive or script to the device's scheduled updater.
  • Send crafted parameters to sslvpn_liveuser_delete, webclient_portal_settings, checkcert_key and ccc_flush_sql_file and check for command injection.
  • Send crafted parameters to userRequest, tsmRequest, fileRequestorServlet and fileRequestServlet commands and look for command injection.
  • Send crafted pin numbers, modem strings and alert messages to the intel alert handler and originator services.

Network configuration forms 358

  • Inject shell metacharacters into every field of a network configuration form (DNS, gateway, hostname, DHCP flags, IPv6 fields) and check for command execution.
  • Send malformed values in individual CGI parameters of a network management web interface (hostname, count, age, selector, report name, width) and watch for crashes or command execution.
  • Send requests to formWpsStart, formWlanSetupWPS, formWlanMP, formBSSetSitesurvey, formHwSet, formConnectionSetting, formAccept, formiNICWpsStart and formUSBStorage with crafted parameters and test for command execution.
  • Inject shell metacharacters into DNS, gateway and IP fields of a camera's setIpInfo command and check for command execution.

Connection and protocol parsers 350

  • Send crafted esp_parse input to each Connection and ConnectionType method and look for code execution.
  • Stand up a malicious LDAP server and send crafted replies to a client that connects to it, checking for memory corruption.
  • Test the Netware SSH daemon, FTP delete command, RPC string decoding and GroupWise gateway.
  • As an authenticated user, send crafted requests to Windows LDAP on a domain controller.

Bypasses and variations

All 338
  • The expression language injection was reachable after bypassing the console's existing authentication mechanism, so check for auth bypass paths before assuming a login wall protects the endpoint.
  • The existing authentication on these endpoints could be bypassed, so an unauthenticated attacker could still reach the injection.
  • Where authentication is required on a deserialisation endpoint, try to bypass it before sending the serialised object.
  • Authentication on these service endpoints could be bypassed, so treat an authenticated-only deserialisation bug as reachable without credentials.
  • Look for authentication checks that can be bypassed to reach expression language injection endpoints.
  • Bypass authentication to reach command injection endpoints that normally require credentials.

Typical fixes

All 450
  • Treat configuration values as inert data and never pass them into a code-execution function.
  • Pass untrusted values as safely quoted arguments or environment variables rather than interpolating them into the command text.
  • Do not check out or run code from the pull request's fork in a pull_request_target workflow; use the unprivileged pull_request event for untrusted code, or require approval before running fork code.
  • Avoid building shell commands from user input and pass arguments as separate values instead.
  • Pass arguments as separate values instead of building shell command strings.
  • Pass user-supplied values as separate escaped arguments instead of concatenating them into shell command strings.

Tips for beginners

All 13
  • Start with the surfaces the evidence shows are most productive: web management interfaces of appliances and routers, page-rendering endpoints that take bean or class names, endpoints that accept serialised data, and CI workflows in open source repositories. Pick one product or repository and map its input handling before testing.
  • For command injection, look for fields that end up in shell commands: hostnames, gateways, DNS settings, interface names, filenames, usernames and backup paths. Test each field with shell metacharacters and watch for command output, timing changes or errors that show the value was interpreted.
  • For expression language injection, enumerate every page that takes a bean, action or class name parameter and test whether the value is evaluated during rendering rather than treated as plain data. The same flaw often repeats across many pages, so a single finding can lead to dozens of endpoints.
  • For deserialisation, find endpoints that accept binary blobs or serialised parameters and check whether they reconstruct arbitrary classes. A single product often leaves many endpoints deserialising untrusted input, so enumerate all of them rather than stopping at the first.
  • For CI workflows, look for workflows triggered by pull_request_target that check out the pull request head from a fork, and for workflows that interpolate branch names, titles, commit messages, issue titles, bodies or comments into shell commands. Test with a pull request or issue from a fork and observe whether your text is executed.
  • Check whether authentication can be bypassed before assuming a login wall protects an endpoint. The evidence shows expression language injection and deserialisation reachable after bypassing existing authentication, so an authenticated-only bug may still be reachable without credentials.

Start here: a reading path

Open the path

Clear reports in order, easiest first.

Guides and techniques

View all

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

Newest reports

All 10,318

Most recently disclosed.

New RCE reports by email

Follow RCE and get each week's new disclosures in one short email.

Free. New reports for what you follow, weekly by default. One-click unsubscribe. Privacy