Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 55.2k
    • Issues 55.2k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1.6k
    • Merge requests 1.6k
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #351823
Closed
Open
Issue created Feb 02, 2022 by GitLab SecurityBot@gitlab-securitybotReporter

Last commit message, description & sha1 hash of a private repo in a private group is leaked to guest users through merge request

HackerOne report #1465994 by albatraoz on 2022-01-31, assigned to GitLab Team:

Report | Attachments | How To Reproduce

Report

Summary

Commit related details like commit message, description, sha1, etc are leaked to demoted guest users who should not have access to the repository of a private project according to the permission model. This information is leaked through a fork of the project created by the user(reporter/developer) before being demoted to guest. Once being demoted to guest, the user is able to sneak all the latest commits to the parent branch.

Steps to reproduce
  1. Create a private project in a group as user A.
  2. Add User B as a reporter to this project.
  3. As User B create a fork of the project on you personal namespace.
  4. As User A demote User B to guest from the group settings.
  5. As User B visit the forked repo & go to the create new merge request. In the target branch you will see the parent branch is selected & the commit message is being leaked.
  6. As User A add a new commit message to the parent branch.
  7. As User B refresh the page opened in step 5 & you will see the latest commit added by User A in step 6.
POC

Attaching a video as POC for easier reproduction of the issue
commit_leak.mp4

Impact

An attacker would be able to snoop into commit messages on the default branch even after being demoted to guest user. These commit messages or descriptions may include confidential information to the repo like unreleased features/ vulnerability information, etc

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

  • commit_leak.mp4

How To Reproduce

Please add reproducibility information to this section:

Assignee
Assign to
Time tracking