Github · Github Enterprise Server · CVE-2021-22861
**Name of the Vulnerable Software and Affected Versions**
GitHub Enterprise Server versions 2.4.21 through 2.20.23
GitHub Enterprise Server versions 2.21.0 through 2.21.14
GitHub Enterprise Server versions 2.22.0 through 2.22.6
GitHub Enterprise Server versions 3.0.0
**Description**
An improper access control issue was identified in GitHub Enterprise Server, allowing authenticated users to gain write access to unauthorized repositories via specifically crafted pull requests and REST API requests. To exploit this, 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.
**Recommendations**
For GitHub Enterprise Server versions 2.4.21 through 2.20.23, update to version 2.20.24.
For GitHub Enterprise Server versions 2.21.0 through 2.21.14, update to version 2.21.15.
For GitHub Enterprise Server versions 2.22.0 through 2.22.6, update to version 2.22.7.
For GitHub Enterprise Server versions 3.0.0, update to version 3.0.1.