CVE-2021-22861
CVE-2021-22861 is a medium-severity vulnerability in Github with a CVSS 3.x base score of 6.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-285.
Key facts
- Severity: Medium (CVSS 3.x base score 6.5)
- CVSS v2: 4.0
- EPSS exploit prediction: 1% (56th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-285
- Affected product: Github
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2021-22861?
- 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.
- How severe is CVE-2021-22861?
- CVE-2021-22861 has a CVSS 3.x base score of 6.5, rated medium severity. It is exploitable over network with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is none, integrity high, and availability none.
- Is CVE-2021-22861 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (56th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-22861?
- CVE-2021-22861 primarily affects Github. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2021-22861?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2021-22861 published?
- CVE-2021-22861 was published on 2021-03-03 and last updated on 2026-06-17.
References
- https://docs.github.com/en/enterprise-server%402.20/admin/release-notes#2.20.24
- https://docs.github.com/en/enterprise-server%402.21/admin/release-notes#2.21.15
- https://docs.github.com/en/enterprise-server%402.22/admin/release-notes#2.22.7
- https://docs.github.com/en/enterprise-server%403.0/admin/release-notes#3.0.1
Affected products (2)
- cpe:2.3:a:github:github:*:*:*:*:enterprise:*:*:*
- cpe:2.3:a:github:github:*:*:*:*:*:*:*:*
More vulnerabilities in Github
- CVE-2020-10516 — Critical (CVSS 9.8): An improper access control vulnerability was identified in the GitHub Enterprise Server API that allowed an…
- CVE-2017-18365 — Critical (CVSS 9.8): The Management Console in GitHub Enterprise 2.8.x before 2.8.7 has a deserialization issue that allows unauthenticated…
- CVE-2020-10519 — High (CVSS 8.8): A remote code execution vulnerability was identified in GitHub Enterprise Server that could be exploited when building…
- CVE-2020-10518 — High (CVSS 8.8): A remote code execution vulnerability was identified in GitHub Enterprise Server that could be exploited when building…
- CVE-2021-22863 — High (CVSS 8.1): An improper access control vulnerability was identified in the GitHub Enterprise Server GraphQL API that allowed…
- CVE-2012-2055 — High (CVSS 7.5): GitHub Enterprise before 20120304 does not properly restrict the use of a hash to provide values for a model's…
Other CWE-285 (Improper Authorization) vulnerabilities
- CVE-2025-65041 — Critical (CVSS 10.0): Improper authorization in Microsoft Partner Center allows an unauthorized attacker to elevate privileges over a network.
- CVE-2023-33189 — Critical (CVSS 10.0): Pomerium is an identity and context-aware access proxy. With specially crafted requests, incorrect authorization…
- CVE-2022-2595 — Critical (CVSS 10.0): Improper Authorization in GitHub repository kromitgmbh/titra prior to 0.79.1.
- CVE-2021-28799 — Critical (CVSS 10.0): An improper authorization vulnerability has been reported to affect QNAP NAS running HBS 3 (Hybrid Backup Sync. ) If…
- CVE-2026-34048 — Critical (CVSS 9.9): Coolify is an open-source and self-hostable tool for managing servers, applications, and databases. Prior to…
- CVE-2026-5412 — Critical (CVSS 9.9): In Juju versions prior to 2.9.57 and 3.6.21, an authorization issue exists in the Controller facade. An authenticated…
Browse all CWE-285 (Improper Authorization) vulnerabilities →