Skip to content
RCE Write-up Intermediate

CVE-2024–50603: Aviatrix Network Controller Command Injection V

The Aviatrix Network Controller's PHP API fails to sanitise the cloud_type parameter before passing it to a shell command, allowing an unauthenticated attacker to inject OS commands. An attacker can execute arbitrary code remotely, as demonstrated by exfiltrating /etc/passwd.

Jakub Korepta Follow

Published on medium.com

An issue was discovered in Aviatrix Controller 7.x through 7.2.4820. Due to the improper neutralization of special elements used in an OS command, an unauthenticated attacker is able to remotely execute arbitrary code.

Jakub Korepta, on medium.com

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

Root cause

The cloud_type parameter is concatenated directly into a shell command without using escapeshellarg, unlike other parameters.

Impact

An unauthenticated attacker could remotely execute arbitrary code on the Aviatrix Controller.

What the attacker needed

Network access to the controller; no authentication required

The fix

The vulnerability was fixed by properly sanitising the cloud_type parameter, as indicated by the patch release.

How it was found

  1. Send a POST request to /v1/api with action=list_flightpath_destination_instances and a CID value (any value works).
  2. Include account_name, region, and vpc_id_name parameters with any non-empty values.
  3. Set cloud_type to a value that includes a pipe and a command substitution to execute a malicious command.

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 controller takes input from web requests and builds a system command without properly cleaning one of the values. Because of that, an attacker can add extra commands that the server will run, letting them take control of the machine.

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.