Skip to content
Access control Disclosed report Beginner

Unauthorized time entry added via API

The GitLab API let a non-project member add or edit time entries on issues in a public project, bypassing the web restriction.

GitLab

Originally disclosed on GitLab

  • Fixed in 3 months
  • Disclosed after 3 months

HackerOne report #717861 by lucky_sen on 2019-10-19, assigned to @cmaxim:

Summary

Gitlab restrict non-project member for add or edit any time entry in project issues, but via API request this restriction got easily bypassed.

Steps to reproduce

  1. Create two account victim and attacker
  2. Victims account have one public project with list of issues
  3. Make an API request with attacker access token to add or edit victims project issue time.
curl --request POST --header "PRIVATE-TOKEN: ********" https://gitlab.com/api/v4/projects/****/issues/**/time_estimate?duration=3h30m  
  1. Time tracker successfully updated on victims project
  • Adding time entries (time spent or estimates) is limited to project members

    gitlab.png
    gitlab.png From the original on GitLab

Impact

By using API request any unauthorized user are able to make changes on public project time trackers

Thanks!

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

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 API endpoint for adding time entries lacked the same authorisation check as the web interface, allowing any authenticated user to modify time tracking on public projects.

Impact

Any authenticated user could modify time tracking data on public projects without being a member.

What the attacker needed

Attacker has a GitLab account; victim has a public project with issues

How it was found

  1. Create two accounts: victim and attacker.
  2. Ensure the victim has a public project with issues.
  3. Using the attacker's access token, send an API request to add or edit time on the victim's project issue.
  4. Observe that the time tracker is updated on the victim's project.

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.

GitLab lets project members log time spent on issues. The website blocked outsiders from doing this, but the API (a way for programs to talk to GitLab) did not check properly. So anyone with an account could change time records on public projects.

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.