Skip to content
SSRF Write-up Advanced

Hard Server-Side Request Forgery (SSRF) A bypass method to RCE an

A file-rendering endpoint was vulnerable to server-side request forgery, allowing an attacker to make the server send requests to arbitrary hosts and ports. By injecting a crafted request with a null byte and padding, the attacker performed a port scan and found an internal service running Log4j, which led to remote code execution.

sarvour Follow

Published on medium.com

In SSRF attacks, the attacker exploits a server’s ability to make requests by altering URLs or requests that the server is expected to process. This can grant the attacker access to resources that are otherwise inaccessible to a standard user, such as internal resources like databases, internal services, or even…

sarvour, 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 file-rendering endpoint accepted a user-supplied URL without properly validating or restricting the destination host and port, and a null-byte trick bypassed the file-extension check.

Impact

The attacker could scan internal ports and then exploit a Log4j vulnerability on an internal service to achieve remote code execution, though the report notes the open port was later closed.

What the attacker needed

Access to the file-rendering endpoint; ability to supply a URL; knowledge of a valid file extension

How it was found

  1. Review JavaScript files to find a path used for rendering files.
  2. Try common file extensions and observe Bad Request responses.
  3. Find a file with an .obj extension that returns a different response header.
  4. Use Burp Collaborator and a personal server to confirm the server sends TCP packets.
  5. Inject a payload with a null byte and padding to perform a port scan using response timing.
  6. Scan the main IP, find port 1091 open, access a login page, and discover Log4j leading to RCE.

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.

Server-side request forgery (SSRF) happens when a website lets you give it a web address, and it fetches that address for you. If the site does not check the address carefully, you can make it talk to computers inside its own network that you cannot reach directly. Here, the attacker used a file-rendering feature to probe internal ports and then found a vulnerable login page that allowed remote code execution.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.