Skip to content
Access control Disclosed report Beginner

Manual job variables can be leaked on any instance without auth

The GitLab GraphQL endpoint exposes manual CI/CD variables associated with manual deployments to unauthorised users, including unauthenticated users in public projects. An attacker could retrieve sensitive deployment secrets that should be restricted to maintainers or owners.

GitLab

Originally disclosed on GitLab

  • Fixed in 6 months
  • Disclosed after 6 months

⚠️ 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 #3026559 by pwnie on 2025-03-08, assigned to @ngeorge1:

Report | How To Reproduce

Report

Summary:
The GitLab GraphQL endpoint exposes manual CI/CD variables associated with manual deployments to unauthorized users—even unauthenticated users in public projects. This lack of independent authorization allows an attacker to retrieve sensitive deployment secrets that should be restricted to maintainers or owners.

Steps to Reproduce:

  1. Set Up a Public Project and Manual Deployment Job:
    • Create a new public project on gitlab.com.
    • Add a deployment job with a manual trigger in your .gitlab-ci.yml:
      YAML
      stages:  
        - deploy  
      deploy-manual:  
        stage: deploy  
        when: manual  
        script:  
          - echo "Deploying with manual variables"  
        environment:  
          name: staging  
      
  2. Configure Manual Variables:
    • In the GitLab UI, configure one or more manual CI/CD variables for the job. These variables may contain sensitive information intended for secure, on-demand use.
  3. Access the Vulnerable Endpoint:
    • Open the GitLab GraphQL Explorer (or any GraphQL client) without logging in (or with a guest-level account).
  4. Execute the GraphQL Query:
    • Run the following query, replacing "your/full/project/path" with your actual project path:
      GraphQL
      query getJobManualVariables() {  
        project(fullPath: "your/full/project/path") {  
          pipelines {  
            nodes {  
              jobs {  
                nodes {  
                  manualVariables {  
                    nodes {  
                      key  
                      value  
                      environmentScope  
                    }  
                  }  
                }  
              }  
            }  
          }  
        }  
      }  
      
  5. Observe the Issue:
    • The query response reveals the manual variables, including keys, values, and their environment scopes, even though this data should be restricted.

Impact:
An attacker (or any unauthenticated/guest user) can retrieve sensitive manual variables from public projects via the GraphQL API. This could lead to exposure of deployment secrets and other sensitive information, compromising the security of CI/CD processes.

Recommendation:
Implement independent, field-level authorization checks for the manualVariables field within the GraphQL API. Ensure that sensitive manual variables are only accessible to users with the necessary privileges (e.g., project maintainers or owners). Additionally, consider masking or restricting the display of sensitive values to prevent accidental disclosure.


By tightening access control on this GraphQL field, GitLab can better protect confidential deployment data and reduce the risk of unauthorized secret disclosure.

Impact

An attacker (or any unauthenticated/guest user) can retrieve sensitive manual variables from public projects via the GraphQL API. This could lead to exposure of deployment secrets and other sensitive information, compromising the security of CI/CD processes.

Impact

An attacker (or any unauthenticated/guest user) can retrieve sensitive manual variables from public projects via the GraphQL API. This could lead to exposure of deployment secrets and other sensitive information, compromising the security of CI/CD processes.

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 missing field-level authorisation checks on the manualVariables field in the GraphQL API, allowing any user to query it without verifying permissions.

Impact

An attacker (or any unauthenticated/guest user) can retrieve sensitive manual variables from public projects via the GraphQL API, potentially exposing deployment secrets and compromising CI/CD security.

What the attacker needed

Public project; manual deployment job; manual CI/CD variables configured; no authentication needed

How it was found

  1. Create a new public project on gitlab.com.
  2. Add a deployment job with a manual trigger in the .gitlab-ci.yml file.
  3. Configure one or more manual CI/CD variables for the job in the GitLab UI.
  4. Open the GitLab GraphQL Explorer or any GraphQL client without logging in (or with a guest-level account).
  5. Execute a GraphQL query that requests manualVariables for jobs in the project's pipelines.
  6. Observe that the query response reveals the manual variables, including keys, values, and environment scopes.

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.

In GitLab, CI/CD variables are like secret settings used when deploying software. The GraphQL API, which lets programs ask for data, was giving out these secrets to anyone, even people not logged in, if the project was public. This means someone could see passwords or keys meant only for trusted maintainers.

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.