# Attacker is able to query Github repositories of arbitrary Shopify Hydrogen Users 

Hydrogen app's GitHubRepositoriesQuery GraphQL operation trusted client-supplied ownerName/ownerId, letting any merchant list another user's private GitHub repositories.

- Payout: $900
- Severity: low
- Program: Shopify
- Found by: kun_19
- Disclosed: 2023-03-09
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/1692788
- Library page: https://bugbountylibrary.com/r/h1%3A1692788
- Tags: area:web domain:api domain:web impact:data-leak impact:internal-access kind:bounty platform:hackerone sev:low tech:github-actions tech:graphql technique:recon vuln:access-control vuln:idor

**Target:** Shopify admin internal GraphQL endpoint (GitHubRepositoriesQuery) in Hydrogen app
**Root cause:** The GitHubRepositoriesQuery resolver used attacker-controlled ownerName/ownerId variables to select which GitHub account's token to query, without verifying the requesting shop owned that GitHub connection.
**Steps:**
1. Victim installs Hydrogen app and connects GitHub account with private repos; open Create Storefront to trigger GitHubRepositoriesQuery.
2. Capture victim's ownerName and ownerId from the request.
3. As attacker, send `POST /admin/internal/web/graphql/core?operation=GitHubRepositoriesQuery&type=query` with attacker cookies/CSRF and body variables `ownerName=<victim>`, `ownerId=<victim_id>`.
4. Response returns victim's private repository names, descriptions, default branches.
**How found:** Observed the GitHubRepositoriesQuery request during normal storefront creation, noticed ownerName/ownerId were client-supplied parameters, hypothesized they weren't bound to the session, and replayed with another account's identifiers.
**Exploitation:** Attacker with any Shopify store account sends the GraphQL query with victim's ownerName/ownerId; server uses the victim's stored GitHub token to fetch and return private repo metadata.
**Insight:** Internal admin GraphQL operations that take owner/account identifiers as variables often resolve the credential server-side from those IDs; replay the operation cross-tenant with a second account to test whether ownership is bound to the session.

