Skip to content
Access control Disclosed report Beginner

Attachments on confidential issues accessible to guest members

Attachments on confidential issues could be opened by users holding only the guest role, even though those users cannot view the issue itself. Anyone who obtained the attachment's identifier, for example from a shared link or browser history, could read potentially sensitive files.

GitLab

Originally disclosed on GitLab

  • Fixed in 1 hour
  • Disclosed after 1 hour

HackerOne report #874681 by foobar7 on 2020-05-15, assigned to @cmaxim:

CVSS

Medium 5.3 CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

Summary

Issues can be set to "confidential", disallowing anyone below the "reporter" role to access them.

However, a user with the "guest" role can still access attachments on these confidential issues, allowing them to access potentially sensitive information.

To access a file, an ID is required (an md5 hash which may or may not be truly random; I haven't found the location where it is generated yet). The ID may eg leak in browser histories or when users insecurely share links - eg in (forwarded) emails - under the assumption that access will only be granted to authorized users.

Steps to reproduce

Setup:

  • create a private group: groups -> new group -> select private
  • add a guest: select the group -> members -> add a user with the role "guest"
  • add a project: select the private group -> new project
  • add a confidential issue with a file attachment: select the project -> issues -> new issue -> attach a file & check "this issue is confidential".
  • copy the link to the file

Attack (with the guest user):

  • verify that the user indeed has no access to the issue
  • visit the link to the file to access it.

Impact

Leak of potentially sensitive information in confidential issues to guests.

What is the current bug behavior?

Access to confidential attachments as guest

What is the expected correct behavior?

404 not found page

Results of GitLab environment info

Installed via https://about.gitlab.com/install/#ubuntu. /help shows version as:

GitLab Enterprise Edition 12.10.5-ee

Impact

see 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 attachment download endpoint checked only that the requester was a project member, not that they were allowed to see the confidential issue the file belonged to.

Impact

Potentially sensitive information in confidential issues could leak to guest members, but only if they know the attachment's identifier, which the reporter notes may appear in browser histories or shared links.

What the attacker needed

A guest account in a private group; knowledge of the attachment identifier

How it was found

  1. Create a private group and add a user with the guest role.
  2. Create a project in that group and add a confidential issue with a file attached.
  3. Copy the link to the attached file.
  4. As the guest user, confirm the issue itself is not accessible.
  5. Open the copied file link and the attachment is served.

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 confidential issue is meant to be visible only to certain people. Each attached file has its own web address, and a low-privileged guest member who got hold of that address could download the file.

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.