CVE-2021-22861

Improper access control in GitHub Enterprise Server leading to unauthorized write access to forkable repositories

MEDIUM
6.5
CVSS Score
Published: March 3, 2021 at 03:25 AM UTC
Updated: June 17, 2026 at 03:37 AM UTC
2 products affected across 1 vendorGitHubGitHub Enterprise Server

Using GitHub Enterprise Server by GitHub?

Get instant alerts when new vulnerabilities affect GitHub Enterprise Server - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.5
Exploit prediction
EPSS 1.0%

Description

An improper access control vulnerability was identified in GitHub Enterprise Server that allowed authenticated users of the instance to gain write access to unauthorized repositories via specifically crafted pull requests and REST API requests. An attacker would need to be able to fork the targeted repository, a setting that is disabled by default for organization owned private repositories. Branch protections such as required pull request reviews or status checks would prevent unauthorized commits from being merged without further review or validation. This vulnerability affected all versions of GitHub Enterprise Server since 2.4.21 and was fixed in versions 2.20.24, 2.21.15, 2.22.7 and 3.0.1. This vulnerability was reported via the GitHub Bug Bounty program.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.21.0 ≤ v < 2.21.152.22.0 ≤ v < 2.22.72.4.21 ≤ v < 2.20.243.0.0 ≤ v < 3.0.1
Affected range stops below 2.20.24, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.21.15, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.22.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.0.1, so it looks safe — our inference, not a vendor statement
2.20 ≤ v < 2.20.242.21 ≤ v < 2.21.152.22 ≤ v < 2.22.73.0 ≤ v < 3.0.12.202.212.223.0
Affected range stops below 2.20.24, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.21.15, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.22.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.0.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-285NVD-CWE-Other

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card