Skip to content
Access control Disclosed report Beginner

Unauthorized user can manipulate status of issues in public projects

The ProcessCommitWorker automatically closes issues mentioned in commit messages, using the commit author to determine who is closing the issue. Since commit authors can be spoofed, an attacker can forge a commit with the victim's email to close issues in public projects without authorization.

GitLab

Originally disclosed on GitLab

  • Fixed in 29 days
  • Disclosed after 29 days

⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.

HackerOne report #2877710 by pwnie on 2024-12-04, assigned to @ottilia_westerlund:

Report | How To Reproduce

Report

Summary

The ProcessCommitWorker function automatically closes issues mentioned in commit messages. This behavior is vulnerable because it uses the commit author to determine the user closing the issue, and commit authors can be spoofed. By forging a commit with the victim's email, attackers can close issues in public projects without authorization.


Steps to Reproduce
  1. Create a Target Issue:

    • Log in as a victim user and create an issue in a public project.
  2. Prepare the Attack:

    • Log in as an attacker.
    • Clone a repository you own:
      Bash
      git clone YOUR_REPO_URL  
      cd YOUR_REPO  
      
  3. Forge a Commit:

    • Add any file to the repository:
      Bash
      touch foobar  
      git add foobar  
      
    • Commit with the victim’s email and a message referencing the target issue:
      Bash
      git commit --author="Victim <VICTIM_EMAIL_HERE>" -m "Close https://gitlab.com/VICTIM/PROJECT/-/issues/ID"  
      
    • Replace:
      • VICTIM_EMAIL_HERE with the victim's email address.
      • https://gitlab.com/VICTIM/PROJECT/-/issues/ID with the link to the target issue.
  4. Push the Malicious Commit:

    • Push the changes to your repository:
      Bash
      git push origin main  
      
  5. Observe that the issue in the victim's project is automatically closed.


Impact

This vulnerability allows an attacker to arbitrarily close issues in public projects without authorization. Since ProcessCommitWorker relies solely on the commit author field, which is easily spoofed, attackers can impersonate any user to exploit this behavior. This could lead to confusion, disruption of project workflows, and abuse of public repositories.

Impact

Close arbitrary issues.

How To Reproduce

Please add reproducibility information to this section:

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 system trusts the commit author email without verifying that the person pushing the commit actually controls that email address.

Impact

An attacker could close arbitrary issues in public projects without authorization, potentially causing confusion and disrupting project workflows.

What the attacker needed

A GitLab account; victim's email address; target issue in a public project

How it was found

  1. Log in as a victim user and create an issue in a public project.
  2. Log in as an attacker and clone a repository you own.
  3. Add a file and commit with the victim's email and a message referencing the target issue.
  4. Push the malicious commit to your repository.
  5. Observe that the issue in the victim's project is automatically closed.

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.

When you push code to a Git repository, each commit records an author name and email. GitLab has a feature that automatically closes issues if a commit message mentions them, and it trusts the commit author to decide who closed the issue. Because anyone can set any author email on a commit, an attacker can pretend to be someone else and close their issues.

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.