Skip to content
RCE Write-up Intermediate

(CVE-20221-35404) Prolink PRC2402M applogin.cgi sys_login1 Authenticated Command Injection Vulnerability

The applogin.cgi script passes user input to a system call without validation, allowing an authenticated attacker to run arbitrary commands as root on the Prolink PRC2402M router.

starlabs.sg

Published on starlabs.sg

This vulnerability is present as there are no checks on user input taken by applogin.cgi, which is passed to system, allowing an attacker to execute arbitrary code in the context of the root user on affected installations of the Prolink PRC2402M router.

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

Root cause

Likely the CGI script fails to sanitise user-supplied input before passing it to a system shell command.

Impact

An authenticated attacker could execute arbitrary commands as root on the router.

What the attacker needed

Authenticated access to the router

How it was found

  1. Log in to the router's web interface.
  2. Visit the vulnerable CGI script at /cgi-bin/applogin.cgi.

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.

This router has a web page that runs commands on the device. The page takes input from the user and puts it directly into a command without checking it, so someone who is logged in can make the router run any command they want, with the highest privileges.

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.