Skip to content
Info disclosure Disclosed report Intermediate

Arbitrary access to the titles of an private Gitlab-specific references

GitLab

Originally disclosed on GitLab

  • Fixed in 16 days
  • Disclosed after 16 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 #2209702 by yvvdwf on 2023-10-15, assigned to @ottilia_westerlund:

Report | Attachments | How To Reproduce

Report

Hello,

Gitlab recently introduced the ability to include issue's description in thank_you.md in the service desk:

Ruby
  def substitute_template_replacements(template_body)  
      template_body  
...  
        .gsub(/%\{\s*ISSUE_DESCRIPTION\s*\}/, issue_description)  
...  
    end  
...  
    def issue_description  
      [@]issue.description_html.to_s  
    end  

As we can see in the code above, [@]issue.description_html is accessed directly without any redaction. Consequently, it allows to render arbitrary Gitlab Flavored Markdown references of arbitrary project.

Reproduce

  1. As victim, create a new private project, victim/private-project. Then create a private issue. We will show the ability to access to this private issue.

  2. As attacker:

  • create a new project, attacker/project-a then add this file, .gitlab/service_desk_templates/thank_you.md to the project within the following content (note: it's important the back-tick characters):
  `%{ISSUE_DESCRIPTION}`  
thank_you.png
thank_you.png From the original on GitLab
  • goto Settings/General/Service Desk, then copy the email in Email address to use for Service Desk textbox which should be something like this: contact-project+attacker-project-a-1234567-issue-[@]incoming.gitlab.com

  • use any email client, send the following email to the email address above

    • subject: any subject as you want
    • body: victim/private-project#1
  • wait for few seconds, you should receive a reply from gitlab which contains the title of the private issue.

Impact

The vulnerability allows attacker to access the titles of any private Gitlab-specific references, such as, private issues, merge requests, snippets, epics, vulnerabilities, labels, etc.

Output of checks

This bug happens on GitLab.com

Impact

The vulnerability allows attacker to access the titles of any private Gitlab-specific references, such as, private issues, merge requests, snippets, epics, vulnerabilities, labels, etc.

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.

What is known

A medium-severity info disclosure bug in gitlab.com. GitLab made it public on 1 November 2023.

About Info disclosure

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.