6.5medium
Improper access control in GitHub Enterprise Server leading to unauthorized write access to forkable repositories
- Severity
- 6.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.94% (higher than 61% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_P
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
| Product or package | Versions | Reported by |
|---|---|---|
| GitHub GitHub Enterprise Server | from 2.20 before 2.20.24, from 2.21 before 2.21.15, from 2.22 before 2.22.7, from 3.0 before 3.0.1 | CVE List |
| github github | from 2.4.21 before 2.20.24, from 2.21.0 before 2.21.15, from 2.22.0 before 2.22.7, from 3.0.0 before 3.0.1 | NVD |
All scores
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
| NVD | 4.0medium CVSS:2.0 | AV:N/AC:L/Au:S/C:N/I:P/A:N |
Classification
What each source says
CVE List
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.
NVD (es)
Se identificó una vulnerabilidad de control de acceso inadecuada en GitHub Enterprise Server que permitía a los usuarios autenticados de la instancia obtener acceso de escritura a repositorios no autorizados a través de solicitudes de extracción y solicitudes de API REST específicamente diseñadas. Un atacante tendría que ser capaz de bifurcar el repositorio objetivo, una configuración que está desactivada por defecto para los repositorios privados propiedad de la organización. Las protecciones de la rama, como las revisiones requeridas de las solicitudes de extracción o las comprobaciones de estado, evitarían que las confirmaciones no autorizadas se fusionaran sin una revisión o validación adicional. Esta vulnerabilidad afectaba a todas las versiones de GitHub Enterprise Server desde la versión 2.4.21 y fue corregida en las versiones 2.20.24, 2.21.15, 2.22.7 y 3.0.1. Esta vulnerabilidad fue reportada a través del programa GitHub Bug Bounty
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-22861 changed 2024-08-03 | CVE Terms of Use |
| NVD | CVE-2021-22861 changed 2026-06-17 | Public domain |