Skip to content
RCE Write-up Intermediate

Technical Analysis: Vulnerability Chain Leading to RCE in a Web P

A hidden login page allowed guest access, and an IDOR in a URL parameter exposed the admin's user ID. Replacing the guest ID with the admin ID bypassed access control to an upload page, where an unrestricted PHP upload led to remote code execution.

Fenro Follow

Published on medium.com

Today, I want to detail a relatively simple but highly effective vulnerability chain that ultimately led to Remote Code Execution (RCE) during a penetration test. This scenario underscores that discovering critical vulnerabilities sometimes requires only patience, precision, and deep analysis rather than complex…

Fenro, 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

Likely the application trusted a user-controlled URL parameter for both data access and authorisation checks, and it failed to restrict uploaded file types.

Impact

An attacker could view other users' account information, bypass access controls to reach administrative upload functionality, and execute arbitrary code on the server.

What the attacker needed

No account needed (guest login available); knowledge of the hidden login path

The fix

The application should enforce authorisation based on the authenticated session rather than URL parameters, and restrict uploads with whitelist filtering, magic byte checks, and non-executable directories.

How it was found

  1. Review the page source code to find an unlinked, non-visible path.
  2. Navigate to the hidden path to reach a login page and use the guest login option.
  3. On the user information page, change the id parameter to view other users' account information and obtain the admin's UID.
  4. Attempt to access the file upload page, which returns an error for non-admins.
  5. Replace the guest UID in the upload page URL with the admin's UID to gain access.
  6. Upload a PHP web shell and navigate to its path to execute code.

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 site had a secret login page that let anyone in as a guest. By changing a number in the web address, the tester could see other users' details, including the admin's. Using the admin's number let them reach a file upload page, and because the site did not check file types, they uploaded a program that let them run commands on the server.

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 Fenro

View all

2 more disclosed reports, best first.

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.