Skip to content
Info disclosure Disclosed report Intermediate

Backend: Leaking CI variables via fork MRs

A fork merge request can cause the backend to process a malicious CI configuration that fetches external includes, leaking unprotected CI variables. An attacker could obtain these variables by sending a crafted link to a project member.

GitLab

Originally disclosed on GitLab

  • Fixed in 3 months
  • Disclosed after 3 months
<!-- ## Implementation Issue To-Do list (_NOTE: This section can be removed when the issue is ready for creation_) - [ ] Ensure that issue title is concise yet descriptive - [ ] Add `Frontend :` or `Backend: ` per group [naming conventions](https://about.gitlab.com/handbook/engineering/development/ops/verify/pipeline-authoring/#splitting-issues) - [ ] Ensure the issue containing the feature or change proposal and related discussions is linked as related to this implementation issue. - [ ] Aside from default labeling, please make sure to include relevant labels for `type::`, `workflow::`, and `~frontend`/`~backend` labeling. - [ ] Issues with user-facing changes should include the `~UX` label. -->

Summary

This confidential ~security issue is an SSOT for all of the nearly identical work that needs to happen in:

The related issues list

All these issues have the same baseline; forked MR and running YamlProcessor;

Proposal

Two options were recently shared to fix this problem in https://gitlab.com/gitlab-org/gitlab/-/issues/394964#note_1437662805

Additional details

<!-- _NOTE: If the issue has addressed all of these questions, this separate section can be removed._ -->

Some relevant technical details, if applicable, such as:

  • Does this need a ~"feature flag"?
  • Does there need to be an associated ~"instrumentation" issue created related to this work?
  • Is there an example response showing the data structure that should be returned (new endpoints only)?
  • What permissions should be used?
  • Is this EE or CE?
    • EE
    • CE
  • Additional comments:
<!-- ## Documentation _NOTE: This section is optional, but can be used for easy access to any relevant documentation URLs._ -->

Links/References

~"Weakness::CWE-200"

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

Impact

Unprotected CI variables could be leaked to an attacker if a project member visits a crafted link.

What the attacker needed

Public project; attacker can fork project; victim clicks a link

How it was found

  1. Attacker forks a public project
  2. Attacker makes changes to gitlab-ci.yml to leak variables and create an MR to the public project
  3. Attacker sends one of these links to a project member

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 someone forks a project, they can change the CI configuration file. If a project member views that changed file through certain pages, the system processes it and may fetch external content, which can leak secret variables. This means an attacker could steal sensitive information by tricking a member into clicking a link.

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.