Skip to content
Business logic Disclosed report Beginner

Able to Create -> Tag names cannot start with `-`, `refs/heads`, `refs/tags`, or `refs/remotes`

GitLab's validation intended to block tag names starting with certain prefixes was not enforced on gitlab.com, so a user could create such tags. The report does not demonstrate a concrete security consequence beyond the missing check.

GitLab

Originally disclosed on GitLab

  • Fixed in 25 days
  • Disclosed after 25 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 #2710713 by nexusghostt on 2024-09-10, assigned to @cmaxim:

Report | Attachments | How To Reproduce

Report

Hi team ,

Gitlab Recently Fixed security issue where user not allowed to create tag name with SHA1 or SHA256 -

see here - https://gitlab.com/gitlab-org/gitlab/-/issues/437103

hackerone - https://hackerone.com/reports/2299337

now see this commit -GitLab implemented a check for security purposes that prevents -> Tag names cannot start with -, refs/heads, refs/tags, or refs/remotes

IMG-20240910-WA0001.jpg
IMG-20240910-WA0001.jpg From the original on GitLab

here link - https://gitlab.com/gitlab-org/gitlab/-/commit/5146cc013520a950b16bdf71e7849970dc0e3e07

Steps to reproduce

1.User Created a group and project at https//gitlab.com

2.navigate projects > create tag name >start with -, refs/heads, refs/tags, or refs/remotes

  1. tags created succesfully there

see here

IMG-20240910-WA0002.jpg
IMG-20240910-WA0002.jpg From the original on GitLab

What is the current bug behavior?

tag with start with -, refs/heads, refs/tags, or `refs/remotes created successfully

What is the expected correct behavior?
tags should not be created.

Output of checks
This bug happens on GitLab.com

.

Impact

Impact -

Gitlab prevented it for some securty concerns but It was missing to implemented working properly at https://gitlab.com, Attacker user can create tags start with -, refs/heads, refs/tags, or `refs/remotes created successfully.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

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 server-side validation for tag names was not applied or was bypassed on gitlab.com.

Impact

The report claims an attacker could create tags with these prefixes, but it does not show a concrete security impact.

What the attacker needed

A GitLab account; ability to create a project

How it was found

  1. Create a group and project on gitlab.com.
  2. Navigate to create a tag and use a name starting with one of the blocked prefixes.
  3. Observe that the tag is created successfully.

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.

Git tags are labels for commits. GitLab added a rule to stop tags being named in ways that look like internal Git references, but the reporter found the rule was not actually applied on the live site.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.