Skip to content
Access control Disclosed report Beginner CVE-2020-13351

Unauthorized user is able to access schedule pipeline variables and values

The pipeline schedules API endpoint returned custom variables and their values to any authenticated user, even those not belonging to the project. An attacker could read sensitive schedule variables and potentially hijack schedules.

vaib25vicky Follow

Originally disclosed on HackerOne

  • Triaged in 2 days
  • Fixed in 2 months
  • Paid in 2 days
  • Disclosed after 3 months

Summary

The feature allows to add or overwrite variables that are passed to jobs in order to modify the behavior just for that specific instance.

As per this https://gitlab.com/gitlab-org/gitlab-foss/-/issues/32568#note_32531510 , the current security model is

If you are owner of schedule (as developer) or master => you can read, modify and delete, If you are developer => you can just list, not read,

This allows only owners and masters to read variables assigned to the schedule. It prevents other developers from hijacking schedules, but allows master to fully control them. Master already has access to Secret Variables.

But api endpoints are cleary showing this values to everyone even if the user is not part of the project. https://docs.gitlab.com/ee/api/pipeline_schedules.html#get-a-single-pipeline-schedule

PoC

This is my test project https://gitlab.com/thevicc/trigg with schedule pipeline which custom variables you can't read.

Now, run this to read the variable and its value

curl --header "Private-Token: <your_access_token>" https://gitlab.com/api/v4/projects/20618145/pipeline_schedules/69918

Response

poc_var.png
poc_var.png From the original on HackerOne

Steps to reproduce

  • Create a project and add a schedule pipeline with custom variables
  • Only you or owner can read variables
  • As second account, use the api https://docs.gitlab.com/ee/api/pipeline_schedules.html#get-a-single-pipeline-schedule

Impact

This bug allows unauthorized users to read scheduled pipeline custom variables and values. As per security model, this allows other devs to hijack schedules.

The original report as published on HackerOne, by vaib25vicky. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

This bug allows unauthorized users to read scheduled pipeline custom variables and values, which could allow other developers to hijack schedules.

What the attacker needed

A GitLab account; knowledge of a project ID and schedule ID

How it was found

  1. Create a project and add a schedule pipeline with custom variables
  2. As a second account, use the API to get a single pipeline schedule
  3. Observe that the variables and values are returned

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.

A pipeline schedule is a way to run jobs automatically at set times, and it can have secret variables like passwords. The API that returns details about a schedule was not checking if the person asking was allowed to see those secrets. So anyone with an account could read them.

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 by vaib25vicky

View all

5 more disclosed reports, best first.

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.