Skip to content
RCE Advisory Advanced CVE-2022-3385

Advantech R-SeeNet show_code Endpoint Stack-based Buffer Overflow Remote Code Execution Vulnerability

The show_code.php endpoint in Advantech R-SeeNet fails to validate the length of the filename parameter before copying it into a fixed-size stack buffer. An unauthenticated remote attacker can exploit this to execute arbitrary code as the service account.

rgod Follow

Originally disclosed on Zero Day Initiative

Critical 9.8 View original

This vulnerability allows remote attackers to execute arbitrary code on affected installations of Advantech R-SeeNet. Authentication is not required to exploit this vulnerability.

rgod, on the Zero Day Initiative

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The application does not validate the length of the filename parameter before copying it into a fixed-length stack buffer, leading to a stack-based buffer overflow.

Impact

A remote, unauthenticated attacker could execute arbitrary code with the privileges of the service account.

What the attacker needed

Network access to the web interface; no authentication required

The fix

The vulnerability was fixed by the vendor in an update.

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 report has not been written yet. The Original tab links to the source.

A stack-based buffer overflow happens when a program copies more data into a small memory area than it can hold, overwriting nearby memory. Here, the filename field in a web request is copied without checking its length, so an attacker can send a very long value and take control of the program. This lets them run their own code on the server without needing to log in.

What is RCE?

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

More by rgod

View all

696 more disclosed reports, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

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.