Skip to content
Access control Disclosed report Intermediate CVE-2022-23739

Github Apps can use Scoped-User-To-Server Tokens to Obtain Full Access to User's Projects in Project V2 GraphQL api

An incorrect authorization flaw in GitHub Enterprise Server let a GitHub App installed on an organisation reach organisation-level resources beyond its granted permissions, reading and modifying most resources not tied to a repository.

ahacker1 Follow

Originally disclosed on HackerOne

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

Summary by the program

An incorrect authorization vulnerability was identified in GitHub Enterprise Server, allowing for escalation of privileges in GraphQL API requests from GitHub Apps. This vulnerability allowed an app installed on an organization to gain access to and modify most organization-level resources that are not tied to a repository regardless of granted permissions, such as users and organization-wide projects. Resources associated with repositories were not impacted, such as repository file content, repository-specific projects, issues, or pull requests. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.7.1 and was fixed in versions 3.3.16, 3.4.11, 3.5.8, 3.6.4, 3.7.1. This vulnerability was reported via the GitHub Bug Bounty program.

The original report as published on HackerOne, by ahacker1. 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

Root cause

Likely an incorrect authorization check in the GraphQL API that did not properly restrict scoped user-to-server tokens to the app's granted permissions for organisation-level resources.

Impact

An installed app could gain access to and modify most organisation-level resources not tied to a repository, regardless of its granted permissions; repository-associated resources were not impacted.

What the attacker needed

GitHub App installed on an organisation; GitHub Enterprise Server before 3.7.1

The fix

It was fixed in versions 3.3.16, 3.4.11, 3.5.8, 3.6.4 and 3.7.1.

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 GitHub App is a program that an organisation installs and gives limited permissions to. Normally it should only be able to do what those permissions allow. Here, a flaw meant the app could reach other organisation-wide data and settings it was never granted, though repository contents and issues were not affected.

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 ahacker1

View all

17 more disclosed reports, best first.

More from GitHub

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.