Skip to content
Access control Disclosed report Intermediate

Users can download old project exports due to unclaimed namespace

When a user renames a namespace, the old namespace becomes available for another user to claim. An attacker can then download export files that the victim generated before the rename, exposing confidential project data.

jobert Follow

Originally disclosed on HackerOne

Medium 4.8 View original
  • Triaged in 3 hours
  • Fixed in 22 days
  • Disclosed after 22 days

TL;DR: Happy new year and happy birthday, @douwem!

Vulnerability details

When a user renames its namespace, another user can claim the namespace and download old export files from the victim. The attack scenario here is that someone would scrape existing GitLab namespaces (users and groups, which are public) and see if they're renamed (freeing up the old namespace). The attacker can then claim the namespace the victim's old export files.

Impact

This may expose confidential project information, including the repository code, merge requests, issues, and snippets.

Proof of concept

Follow the steps below to reproduce the vulnerability.

As the victim

  1. Create a group called test
  2. Create a new private project in the test group called test
  3. Click the Generate export button in the project's settings page
  4. Now rename the group to new-test

As the attacker

  1. Create a group called test (this is possible because the old group was renamed to new-test)
  2. Create a new private project in the test group called test
  3. Go to http://gitlab-instance/test/test/download_export
  4. Profit! The attacker will download the export file generated by the victim

Remediation

Expire download links when the namespace OR project URL changes. This vulnerability also applies when changing the project URL, although that is less severe. This might grant users access to private repositories, although far less likely than the PoC outlined in this report.

The original report as published on HackerOne, by jobert. 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 export download link is tied to the namespace path rather than a unique project identifier, so renaming the namespace leaves the old link valid for whoever claims the old name.

Impact

This may expose confidential project information, including repository code, merge requests, issues, and snippets.

What the attacker needed

Victim renames a namespace; victim generated an export before rename; attacker claims the old namespace

How it was found

  1. As the victim, create a group called test.
  2. Create a private project called test inside that group.
  3. Generate an export of the project.
  4. Rename the group to new-test.
  5. As the attacker, create a group called test.
  6. Create a private project called test inside the new group and visit the download_export URL to get the victim's export.

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.

A namespace is like a folder that holds projects. When someone renames their folder, the old name becomes free for anyone to take. If the victim had already made an export file (a backup of their project), the attacker who takes the old name can download that backup.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by jobert

View all

67 more disclosed reports, best first.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.