Skip to content
Path traversal Disclosed report Intermediate CVE-2019-15624

Group admins can remove arbitrary data from "data" directory (including admin data)

A group admin could create a user whose identifier collided with an existing folder name under the data directory, then delete that user, which caused the server to remove the colliding folder. This let a group admin delete arbitrary data folders, including admin data, that they should not have been able to touch.

leonklingele Follow

Originally disclosed on HackerOne

High 8.4 View original
  • Triaged in 17 hours
  • Fixed in 3 months
  • Paid in 8 months
  • Disclosed after 5 months

Steps to reproduce:

  1. Create a new user and make him an admin of an arbitrary group
  2. Log in as this new user
  3. Create a new user "files_external", "appdata_{random-data}", ..
  4. Delete this user

Result: The data/files_external / data/appdata{..} folder is removed.

Solution: Prevent creation of users if data/{new-user-uid} is either a file or a folder. In addition, prevent deletion of users where the user data directory (data/{user}) contains other files and folders than "files" (where the user data is stored).

Impact

Group admin can remove arbitrary data from "data" directory

The original report as published on HackerOne, by leonklingele. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the user creation and deletion logic trusted the user-supplied identifier as a folder name without checking for collisions with existing data directories.

What the attacker needed

An account that can create users; group admin rights

How it was found

  1. Create a new user and make them an admin of an arbitrary group.
  2. Log in as that new admin user.
  3. Create a new user with a name matching an existing data folder such as files_external or appdata.
  4. Delete the newly created user.

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 report has not been written yet. The Original tab links to the source.

The application stores each user's files in a folder named after the user. When a user is deleted, the server deletes that folder. The problem is that the server did not check whether the folder name was already used by something else, so an admin could pick a name that matched an important folder and have it wiped on deletion.

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 leonklingele

View all

2 more disclosed reports, best first.

More from Nextcloud

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.