Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 55.2k
    • Issues 55.2k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1.6k
    • Merge requests 1.6k
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #382260
Closed
Open
Issue created Nov 10, 2022 by Greg Myers@gregDeveloper

Webhook secret tokens can be leaked by maintainer changing URL

HackerOne report #1757999 by joaxcar on 2022-11-01, assigned to @greg:

Report | How To Reproduce | Imported issue

Report

Imported from h1: #383113 (closed)

Summary

Since issue #359989 (closed) was merged, webhook secrets are now hidden for maintainers of a project after they are saved. The UI and API gives no way of retrieving the secret after configuration.

However, a maintainer with access to the project webhook settings could change the webhook URL to a different endpoint and extract the secret token via the request sent to that endpoint.

Impact

Secret webhook tokens are discoverable to project maintainers who change the webhook URL.

What is the current bug behavior?

Secret token value is retained, not reset upon changing the webhook URL.

What is the expected correct behavior?

Secret token will be reset and not retained after changing a webhook URL.

Relevant logs and/or screenshots

Output of checks

This bug happens on GitLab.com

How To Reproduce

Please add reproducibility information to this section:

  1. Create a new project
  2. Go to https://gitlab.com/GROUP/PROJECT/-/hooks and configure a webhook. Make sure you also add a secret token.
  3. Click save
  4. Invite another user to the project as a maintainer
  5. Log into GitLab as the newly-appointed maintainer
  6. Go to the project hooks as this user https://gitlab.com/GROUP/PROJECT/-/hooks
  7. Modify webhook URL to point to an endpoint that can be used to sniff/extract the secret token (webhook.site)
  8. Test the webhook
  9. Get secret token from request header sent to the new endpoint
  10. (Optional) Change webhook URL back to original URL to restore functionality and reduce likelihook of detection

Related to #381895 (closed)

Edited Nov 17, 2022 by Greg Myers
Assignee
Assign to
Time tracking