Skip to content
Access control Disclosed report Beginner

Able to access wiki with scopeless deploy token even if wikis are disabled

A deploy token with only read_repo scope could be used to clone a project's wiki, even when the wiki feature was disabled. An attacker with such a token could read wiki content that should have been inaccessible.

GitLab

Originally disclosed on GitLab

  • Fixed in 15 months
  • Disclosed after 15 months

HackerOne report #964057 by vaib25vicky on 2020-08-21, assigned to @dcouture:

Report | Attachments | How To Reproduce

Report

Summary

Deploy token scopes are

wiki_dep.png
wiki_dep.png From the original on GitLab

There is no scopes for read_wiki. But currently user can read project or group wikis using deploy token even if wikis are disabled

PoC

This is my private test project https://gitlab.com/thevicc/vicctest3 with wiki disabled, the deploy token <REDACTED> don't have read_wiki scope but you'll be able to read wiki anyway

git clone https://<REDACTED>@gitlab.com/thevicc/vicctest3.wiki.git

Steps to reproduce
  • Create test private project
  • Create deploy token with read_repo scope
  • Now you can clone the project wiki using deploy token
  • Disabled wiki and you still can access it using deploy token

Impact

Deploy token dont have wiki scope but one still abel to use it to access project or group wikis. Even if wikis are disabled one is able to access it using deploy tokens

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

See the steps above

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

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 wiki access check did not verify the deploy token's scope or the project's wiki-enabled setting.

What the attacker needed

A deploy token with read_repo scope; a private project with a wiki

How it was found

  1. Create a private test project.
  2. Create a deploy token with read_repo scope.
  3. Clone the project wiki using the deploy token.
  4. Disable the wiki and confirm the wiki is still accessible with the deploy token.

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 deploy token is a special password for automated tools to access a Git repository. The token was only supposed to allow reading the code, not the wiki (a separate documentation area). The bug meant the token could also read the wiki, even when the wiki was turned off, so someone with the token could see information they shouldn't.

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 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.