Skip to content
Path traversal Write-up Advanced

Client-Side Path Traversal (CSPT): I Found It, Chained It, and Wiped an Entire Organization

A client-side path traversal flaw in an image upload feature allowed a low-privileged user to redirect an automatic DELETE request to arbitrary endpoints. By storing a crafted avatar path, the attacker could cause the victim's own session to delete their account or the entire organisation.

mugh33ra Follow

Published on mugh33ra.medium.com

I have been hunting on this subdomain for about a month consistently. It is a feature-rich platform organizations, clubs, roles, permissions, image uploads, forms, invitations the kind of app that makes you excited as a bug hunter because more features means more attack surface.

Ahmad Mugh33ra, on mugh33ra.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

The application concatenated a user-controlled path value into an API request without validating or sanitising it, allowing path traversal.

Impact

An attacker with the lowest permission (club image upload) could cause any user who uploads an image to delete their own account, and if all members are affected, the entire organisation could be deleted.

What the attacker needed

Attacker has club image upload permission; victim uploads an image

The fix

The application should validate and sanitise the avatar.path value to prevent path traversal, for example by using an allowlist or resolving the path and ensuring it stays within the intended directory.

How it was found

  1. Upload a profile image and intercept the POST request that sets avatar.path.
  2. Change avatar.path to a traversal payload like /../../user and forward the request.
  3. Upload another image to trigger the automatic DELETE request to the stored path.
  4. Observe that the DELETE request goes to the traversed endpoint (e.g., /user) and deletes 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.

When you upload a picture, the app remembers where it saved it. Later, when you upload a new picture, the app automatically deletes the old one using that saved location. The bug was that the app trusted the saved location completely, so an attacker could change it to point at a different part of the website, like the 'delete account' button. Then, when the victim uploaded a new picture, the app would delete their account instead of the old picture.

What is Path traversal?

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

More by mugh33ra

View all

2 more disclosed reports, best first.

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.