Skip to content
RCE Write-up Intermediate

(CVE-2021-1485) Cisco IOS XR CLI Arbitrary Command Injection

The Cisco IOS XR CLI passes some command arguments to the underlying Linux shell without proper quoting, so a crafted argument can break out of the intended command. An attacker with access to the restricted CLI could potentially run arbitrary shell commands.

starlabs.sg

Published on starlabs.sg

The router CLI implements some commands as passthrough to the underlying Linux shell. From some tests conducted, it is evident that there are some quoting issues when passing arguments to the shell.

The author, on starlabs.sg

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker with CLI access could potentially inject arbitrary commands into the underlying Linux shell, though the text only demonstrates a quoting error and does not show full command execution.

What the attacker needed

Access to the Cisco IOS XR CLI

How it was found

  1. Log in to the Cisco IOS XR CLI.
  2. Run a command such as 'dir' with a single quote as the argument.
  3. Observe the shell error messages showing the quote was passed through unescaped.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The router's command line normally hides the Linux system underneath. Some commands are handed to that Linux shell, and if the input is not quoted safely, special characters can make the shell run extra commands. This means someone who can already log in to the router CLI might be able to run commands they should not.

What is RCE?

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

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

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