Skip to content
CSRF Write-up Intermediate

Critical Csrf To Rce In Filebrowser

The user creation endpoint accepted JSON data sent with a text/plain content type and did not validate the Origin header or use anti-CSRF tokens, so an attacker could make a logged-in admin's browser create a new admin user. That backdoor user could access the whole filesystem and, because admins can run commands, lead to remote command execution.

Febin Follow

Published on systemweakness.com

I used to pick random opensource software for my research, recently I took some web-based file management software as my research targets. There I found some popular web-based file managers, one of them was a software named “FileBrowser”.

Febin, on systemweakness.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 server accepted JSON request bodies with a text/plain content type and did not validate the Origin header or require an anti-CSRF token, allowing cross-site form submissions to create users.

Impact

An attacker could create an admin user with access to the whole filesystem and, because admins can run commands, achieve remote command execution.

What the attacker needed

Victim is a logged-in admin; victim clicks a link or button; attacker can host a webpage

The fix

The vulnerability was fixed in version v2.18.0.

How it was found

  1. Start a FileBrowser instance.
  2. Host a malicious HTML page on a simple HTTP server.
  3. Send the page URL to a logged-in admin and get them to click the button.
  4. The page submits a POST request to the user creation endpoint, creating a backdoor admin user.
  5. Log in as the new user to access the filesystem.

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 are logged in to a website, your browser automatically sends your session cookie with requests to that site. A cross-site request forgery (CSRF) attack tricks your browser into sending a request the site trusts, without you meaning to. Here the site did not check that the request really came from its own pages, so a malicious page could create a new admin account.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by Febin

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.