Skip to content
Path traversal Write-up Intermediate

Old but GOLD Dot Dot Slash to Get the Flag — Uber Microservice

An internal microservice endpoint accepted a user-controlled statement identifier that was inserted into a backend request path without sanitisation, allowing path traversal. By escaping the path and using a fragment to discard the trailing query, an attacker could make the backend request another user's statement endpoint and receive that user's access token, leading to account takeover.

Ron Chan Follow

Published on ngailong.wordpress.com

ronchan Uncategorized April 7, 2019 3 Minutes

Ron Chan (@ngalongc), on ngailong.wordpress.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 statement identifier from the public URL was concatenated into the internal request path without normalising or validating it, so encoded dot-dot-slash sequences escaped the intended path.

Impact

An attacker could obtain any user's access token and thereby take over that user's account.

What the attacker needed

A partner account; knowledge of the victim's user identifier

How it was found

  1. Request the monthly statement view endpoint and observe the internal request details in the response.
  2. Send a statement identifier containing an encoded dot-dot-slash sequence and confirm the response is unchanged, showing traversal works.
  3. Craft a traversal that reaches the internal partner statements endpoint for a chosen user, using an encoded fragment to drop the trailing query.
  4. Read the victim's access token from the response and use it to take over the account.

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.

A web server often builds an internal request by gluing a value from the URL into a fixed address. If that value contains '..' sequences, the server can be tricked into walking up the folder structure and requesting a different internal address. Here the different address returned another user's login token, which is enough to act as that user.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More from Uber

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.