Skip to content
RCE Write-up Advanced

From Metadata to RCE: Chaining Five Vulnerabilities for Complete

A web application allowed directory traversal through a naive string-replacement filter, which exposed an admin template and source code showing an IP-restricted command endpoint. An unvalidated PDF-from-URL feature let the server request its own localhost admin panel, bypassing the IP check and enabling arbitrary command execution, with a library-hijacking CVE demonstrated only as a crash proof.

Cameron Bardin Follow

Published on medium.com

A technical deep-dive into building a critical exploit chain from “boring” reconnaissance findings

Cameron Bardin (MDVKG), 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 a combination of a single-pass string-replacement filter for traversal, an unvalidated URL fetcher, IP-address-based authorisation, and a shell-enabled command endpoint.

Impact

An unauthenticated attacker could read files, run arbitrary commands as the nobody user, and potentially hijack a library for persistence, though the library hijack was only shown to crash the tool rather than fully execute code.

What the attacker needed

No authentication needed; target runs the described app stack; attacker can reach the web app

The fix

The text does not say the issues were fixed; it recommends stripping metadata, resolving and confining paths, allowlisting URLs, using real authentication instead of IP checks, removing command interfaces, and updating dependencies.

How it was found

  1. Download a public image and inspect its metadata to note the PDF tool version
  2. Send a traversal request to the data endpoint using a doubled sequence to read application files
  3. Read the admin template and application source to learn the admin panel path and its command parameter
  4. Submit a URL pointing at the local admin panel to the PDF endpoint so the server fetches it itself
  5. Add a command parameter to that internal URL and read the command output in the returned PDF
  6. Check the installed PDF tool version and test library path precedence with a fake library file

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 file-reading feature that tried to block 'go up a folder' tricks by deleting the text '../', but deleting it once left a new '../' behind, so files outside the intended folder could be read. It also had a PDF maker that fetched any web address given to it, so the attacker asked it to fetch the site's own private admin page, which only trusts requests coming from the same machine. That admin page ran whatever command it was given, so the attacker could 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 Cameron Bardin

View all

1 more disclosed report, 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.