CVE-2021-22865 (GCVE-0-2021-22865)
Vulnerability from cvelistv5 – Published: 2021-04-02 17:25 – Updated: 2024-08-03 18:51
VLAI
Title
Improper access control in GitHub Enterprise Server leading to unauthorized read access to private repository metadata
Summary
An improper access control vulnerability was identified in GitHub Enterprise Server that allowed access tokens generated from a GitHub App's web authentication flow to read private repository metadata via the REST API without having been granted the appropriate permissions. To exploit this vulnerability, an attacker would need to create a GitHub App on the instance and have a user authorize the application through the web authentication flow. The private repository metadata returned would be limited to repositories owned by the user the token identifies. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.0.4 and was fixed in versions 3.0.4, 2.22.10, 2.21.18. This vulnerability was reported via the GitHub Bug Bounty program.
Severity
6.5 (Medium)
CWE
- CWE-285 - Improper Authorization
Assigner
References
3 references
| URL | Tags |
|---|---|
| https://docs.github.com/en/enterprise-server%403.… | x_refsource_MISC |
| https://docs.github.com/en/enterprise-server%402.… | x_refsource_MISC |
| https://docs.github.com/en/enterprise-server%402.… | x_refsource_MISC |
Impacted products
1 product
| Vendor | Product | Version | |
|---|---|---|---|
| GitHub | GitHub Enterprise Server |
Affected:
3.0 , < 3.0.4
(custom)
Affected: 2.22 , < 2.22.10 (custom) Affected: 2.21 , < 2.21.18 (custom) |
Credits
{
"containers": {
"adp": [
{
"providerMetadata": {
"dateUpdated": "2024-08-03T18:51:07.557Z",
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE"
},
"references": [
{
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://docs.github.com/en/enterprise-server%403.0/admin/release-notes#3.0.4"
},
{
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://docs.github.com/en/enterprise-server%402.22/admin/release-notes#2.22.10"
},
{
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://docs.github.com/en/enterprise-server%402.21/admin/release-notes#2.21.18"
}
],
"title": "CVE Program Container"
}
],
"cna": {
"affected": [
{
"product": "GitHub Enterprise Server",
"vendor": "GitHub",
"versions": [
{
"lessThan": "3.0.4",
"status": "affected",
"version": "3.0",
"versionType": "custom"
},
{
"lessThan": "2.22.10",
"status": "affected",
"version": "2.22",
"versionType": "custom"
},
{
"lessThan": "2.21.18",
"status": "affected",
"version": "2.21",
"versionType": "custom"
}
]
}
],
"credits": [
{
"lang": "en",
"value": "djcruz93"
}
],
"descriptions": [
{
"lang": "en",
"value": "An improper access control vulnerability was identified in GitHub Enterprise Server that allowed access tokens generated from a GitHub App\u0027s web authentication flow to read private repository metadata via the REST API without having been granted the appropriate permissions. To exploit this vulnerability, an attacker would need to create a GitHub App on the instance and have a user authorize the application through the web authentication flow. The private repository metadata returned would be limited to repositories owned by the user the token identifies. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.0.4 and was fixed in versions 3.0.4, 2.22.10, 2.21.18. This vulnerability was reported via the GitHub Bug Bounty program."
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-285",
"description": "CWE-285: Improper Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2021-04-02T17:25:14.000Z",
"orgId": "82327ea3-741d-41e4-88f8-2cf9e791e760",
"shortName": "GitHub_P"
},
"references": [
{
"tags": [
"x_refsource_MISC"
],
"url": "https://docs.github.com/en/enterprise-server%403.0/admin/release-notes#3.0.4"
},
{
"tags": [
"x_refsource_MISC"
],
"url": "https://docs.github.com/en/enterprise-server%402.22/admin/release-notes#2.22.10"
},
{
"tags": [
"x_refsource_MISC"
],
"url": "https://docs.github.com/en/enterprise-server%402.21/admin/release-notes#2.21.18"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "Improper access control in GitHub Enterprise Server leading to unauthorized read access to private repository metadata",
"x_legacyV4Record": {
"CVE_data_meta": {
"ASSIGNER": "product-cna@github.com",
"ID": "CVE-2021-22865",
"STATE": "PUBLIC",
"TITLE": "Improper access control in GitHub Enterprise Server leading to unauthorized read access to private repository metadata"
},
"affects": {
"vendor": {
"vendor_data": [
{
"product": {
"product_data": [
{
"product_name": "GitHub Enterprise Server",
"version": {
"version_data": [
{
"version_affected": "\u003c",
"version_name": "3.0",
"version_value": "3.0.4"
},
{
"version_affected": "\u003c",
"version_name": "2.22",
"version_value": "2.22.10"
},
{
"version_affected": "\u003c",
"version_name": "2.21",
"version_value": "2.21.18"
}
]
}
}
]
},
"vendor_name": "GitHub"
}
]
}
},
"credit": [
{
"lang": "eng",
"value": "djcruz93"
}
],
"data_format": "MITRE",
"data_type": "CVE",
"data_version": "4.0",
"description": {
"description_data": [
{
"lang": "eng",
"value": "An improper access control vulnerability was identified in GitHub Enterprise Server that allowed access tokens generated from a GitHub App\u0027s web authentication flow to read private repository metadata via the REST API without having been granted the appropriate permissions. To exploit this vulnerability, an attacker would need to create a GitHub App on the instance and have a user authorize the application through the web authentication flow. The private repository metadata returned would be limited to repositories owned by the user the token identifies. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.0.4 and was fixed in versions 3.0.4, 2.22.10, 2.21.18. This vulnerability was reported via the GitHub Bug Bounty program."
}
]
},
"problemtype": {
"problemtype_data": [
{
"description": [
{
"lang": "eng",
"value": "CWE-285: Improper Authorization"
}
]
}
]
},
"references": {
"reference_data": [
{
"name": "https://docs.github.com/en/enterprise-server@3.0/admin/release-notes#3.0.4",
"refsource": "MISC",
"url": "https://docs.github.com/en/enterprise-server@3.0/admin/release-notes#3.0.4"
},
{
"name": "https://docs.github.com/en/enterprise-server@2.22/admin/release-notes#2.22.10",
"refsource": "MISC",
"url": "https://docs.github.com/en/enterprise-server@2.22/admin/release-notes#2.22.10"
},
{
"name": "https://docs.github.com/en/enterprise-server@2.21/admin/release-notes#2.21.18",
"refsource": "MISC",
"url": "https://docs.github.com/en/enterprise-server@2.21/admin/release-notes#2.21.18"
}
]
},
"source": {
"discovery": "EXTERNAL"
}
}
}
},
"cveMetadata": {
"assignerOrgId": "82327ea3-741d-41e4-88f8-2cf9e791e760",
"assignerShortName": "GitHub_P",
"cveId": "CVE-2021-22865",
"datePublished": "2021-04-02T17:25:14.000Z",
"dateReserved": "2021-01-06T00:00:00.000Z",
"dateUpdated": "2024-08-03T18:51:07.557Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1",
"vulnerability-lookup:meta": {
"epss": {
"cve": "CVE-2021-22865",
"date": "2026-06-03",
"epss": "0.00226",
"percentile": "0.45395"
},
"fkie_nvd": {
"configurations": "[{\"nodes\": [{\"operator\": \"OR\", \"negate\": false, \"cpeMatch\": [{\"vulnerable\": true, \"criteria\": \"cpe:2.3:a:github:enterprise_server:*:*:*:*:*:*:*:*\", \"versionEndExcluding\": \"2.21.18\", \"matchCriteriaId\": \"83563454-A07F-4BB4-8372-C950C437CCA7\"}, {\"vulnerable\": true, \"criteria\": \"cpe:2.3:a:github:enterprise_server:*:*:*:*:*:*:*:*\", \"versionStartIncluding\": \"2.22.0\", \"versionEndExcluding\": \"2.22.10\", \"matchCriteriaId\": \"7CDD3874-DF16-4708-B490-B9837E8C1E84\"}, {\"vulnerable\": true, \"criteria\": \"cpe:2.3:a:github:enterprise_server:*:*:*:*:*:*:*:*\", \"versionStartIncluding\": \"3.0.0\", \"versionEndExcluding\": \"3.0.4\", \"matchCriteriaId\": \"A99BF524-7BF7-4DD9-845D-EF117D94D71F\"}]}]}]",
"descriptions": "[{\"lang\": \"en\", \"value\": \"An improper access control vulnerability was identified in GitHub Enterprise Server that allowed access tokens generated from a GitHub App\u0027s web authentication flow to read private repository metadata via the REST API without having been granted the appropriate permissions. To exploit this vulnerability, an attacker would need to create a GitHub App on the instance and have a user authorize the application through the web authentication flow. The private repository metadata returned would be limited to repositories owned by the user the token identifies. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.0.4 and was fixed in versions 3.0.4, 2.22.10, 2.21.18. This vulnerability was reported via the GitHub Bug Bounty program.\"}, {\"lang\": \"es\", \"value\": \"Se identific\\u00f3 una vulnerabilidad de control de acceso inapropiado en GitHub Enterprise Server que permit\\u00eda que los tokens de acceso generados a partir del flujo de autenticaci\\u00f3n web de una aplicaci\\u00f3n GitHub leyeran metadatos del repositorio privado por medio de la API REST sin haber recibido los permisos apropiados.\u0026#xa0;Para explotar esta vulnerabilidad, un atacante necesitar\\u00eda crear una aplicaci\\u00f3n GitHub en la instancia y hacer que un usuario autorizara la aplicaci\\u00f3n mediante el flujo de autenticaci\\u00f3n web.\u0026#xa0;Los metadatos del repositorio privado devueltos se limitar\\u00edan a los repositorios propiedad del usuario que identifica el token.\u0026#xa0;Esta vulnerabilidad afect\\u00f3 a todas las versiones de GitHub Enterprise Server anteriores a la 3.0.4 y fue corregido en versiones 3.0.4, 2.22.10, 2.21.18.\u0026#xa0;Esta vulnerabilidad se report\\u00f3 por medio del programa GitHub Bug Bounty.\"}]",
"id": "CVE-2021-22865",
"lastModified": "2024-11-21T05:50:47.607",
"metrics": "{\"cvssMetricV31\": [{\"source\": \"nvd@nist.gov\", \"type\": \"Primary\", \"cvssData\": {\"version\": \"3.1\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N\", \"baseScore\": 6.5, \"baseSeverity\": \"MEDIUM\", \"attackVector\": \"NETWORK\", \"attackComplexity\": \"LOW\", \"privilegesRequired\": \"NONE\", \"userInteraction\": \"REQUIRED\", \"scope\": \"UNCHANGED\", \"confidentialityImpact\": \"HIGH\", \"integrityImpact\": \"NONE\", \"availabilityImpact\": \"NONE\"}, \"exploitabilityScore\": 2.8, \"impactScore\": 3.6}], \"cvssMetricV2\": [{\"source\": \"nvd@nist.gov\", \"type\": \"Primary\", \"cvssData\": {\"version\": \"2.0\", \"vectorString\": \"AV:N/AC:M/Au:N/C:P/I:N/A:N\", \"baseScore\": 4.3, \"accessVector\": \"NETWORK\", \"accessComplexity\": \"MEDIUM\", \"authentication\": \"NONE\", \"confidentialityImpact\": \"PARTIAL\", \"integrityImpact\": \"NONE\", \"availabilityImpact\": \"NONE\"}, \"baseSeverity\": \"MEDIUM\", \"exploitabilityScore\": 8.6, \"impactScore\": 2.9, \"acInsufInfo\": false, \"obtainAllPrivilege\": false, \"obtainUserPrivilege\": false, \"obtainOtherPrivilege\": false, \"userInteractionRequired\": true}]}",
"published": "2021-04-02T18:15:21.997",
"references": "[{\"url\": \"https://docs.github.com/en/enterprise-server%402.21/admin/release-notes#2.21.18\", \"source\": \"product-cna@github.com\"}, {\"url\": \"https://docs.github.com/en/enterprise-server%402.22/admin/release-notes#2.22.10\", \"source\": \"product-cna@github.com\"}, {\"url\": \"https://docs.github.com/en/enterprise-server%403.0/admin/release-notes#3.0.4\", \"source\": \"product-cna@github.com\"}, {\"url\": \"https://docs.github.com/en/enterprise-server%402.21/admin/release-notes#2.21.18\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://docs.github.com/en/enterprise-server%402.22/admin/release-notes#2.22.10\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://docs.github.com/en/enterprise-server%403.0/admin/release-notes#3.0.4\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}]",
"sourceIdentifier": "product-cna@github.com",
"vulnStatus": "Modified",
"weaknesses": "[{\"source\": \"product-cna@github.com\", \"type\": \"Secondary\", \"description\": [{\"lang\": \"en\", \"value\": \"CWE-285\"}]}, {\"source\": \"nvd@nist.gov\", \"type\": \"Primary\", \"description\": [{\"lang\": \"en\", \"value\": \"NVD-CWE-Other\"}]}]"
},
"nvd": "{\"cve\":{\"id\":\"CVE-2021-22865\",\"sourceIdentifier\":\"product-cna@github.com\",\"published\":\"2021-04-02T18:15:21.997\",\"lastModified\":\"2024-11-21T05:50:47.607\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"An improper access control vulnerability was identified in GitHub Enterprise Server that allowed access tokens generated from a GitHub App\u0027s web authentication flow to read private repository metadata via the REST API without having been granted the appropriate permissions. To exploit this vulnerability, an attacker would need to create a GitHub App on the instance and have a user authorize the application through the web authentication flow. The private repository metadata returned would be limited to repositories owned by the user the token identifies. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.0.4 and was fixed in versions 3.0.4, 2.22.10, 2.21.18. This vulnerability was reported via the GitHub Bug Bounty program.\"},{\"lang\":\"es\",\"value\":\"Se identific\u00f3 una vulnerabilidad de control de acceso inapropiado en GitHub Enterprise Server que permit\u00eda que los tokens de acceso generados a partir del flujo de autenticaci\u00f3n web de una aplicaci\u00f3n GitHub leyeran metadatos del repositorio privado por medio de la API REST sin haber recibido los permisos apropiados.\u0026#xa0;Para explotar esta vulnerabilidad, un atacante necesitar\u00eda crear una aplicaci\u00f3n GitHub en la instancia y hacer que un usuario autorizara la aplicaci\u00f3n mediante el flujo de autenticaci\u00f3n web.\u0026#xa0;Los metadatos del repositorio privado devueltos se limitar\u00edan a los repositorios propiedad del usuario que identifica el token.\u0026#xa0;Esta vulnerabilidad afect\u00f3 a todas las versiones de GitHub Enterprise Server anteriores a la 3.0.4 y fue corregido en versiones 3.0.4, 2.22.10, 2.21.18.\u0026#xa0;Esta vulnerabilidad se report\u00f3 por medio del programa GitHub Bug Bounty.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N\",\"baseScore\":6.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"REQUIRED\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"NONE\"},\"exploitabilityScore\":2.8,\"impactScore\":3.6}],\"cvssMetricV2\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"2.0\",\"vectorString\":\"AV:N/AC:M/Au:N/C:P/I:N/A:N\",\"baseScore\":4.3,\"accessVector\":\"NETWORK\",\"accessComplexity\":\"MEDIUM\",\"authentication\":\"NONE\",\"confidentialityImpact\":\"PARTIAL\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"NONE\"},\"baseSeverity\":\"MEDIUM\",\"exploitabilityScore\":8.6,\"impactScore\":2.9,\"acInsufInfo\":false,\"obtainAllPrivilege\":false,\"obtainUserPrivilege\":false,\"obtainOtherPrivilege\":false,\"userInteractionRequired\":true}]},\"weaknesses\":[{\"source\":\"product-cna@github.com\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-285\"}]},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"NVD-CWE-Other\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:github:enterprise_server:*:*:*:*:*:*:*:*\",\"versionEndExcluding\":\"2.21.18\",\"matchCriteriaId\":\"83563454-A07F-4BB4-8372-C950C437CCA7\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:github:enterprise_server:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"2.22.0\",\"versionEndExcluding\":\"2.22.10\",\"matchCriteriaId\":\"7CDD3874-DF16-4708-B490-B9837E8C1E84\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:github:enterprise_server:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"3.0.0\",\"versionEndExcluding\":\"3.0.4\",\"matchCriteriaId\":\"A99BF524-7BF7-4DD9-845D-EF117D94D71F\"}]}]}],\"references\":[{\"url\":\"https://docs.github.com/en/enterprise-server%402.21/admin/release-notes#2.21.18\",\"source\":\"product-cna@github.com\"},{\"url\":\"https://docs.github.com/en/enterprise-server%402.22/admin/release-notes#2.22.10\",\"source\":\"product-cna@github.com\"},{\"url\":\"https://docs.github.com/en/enterprise-server%403.0/admin/release-notes#3.0.4\",\"source\":\"product-cna@github.com\"},{\"url\":\"https://docs.github.com/en/enterprise-server%402.21/admin/release-notes#2.21.18\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://docs.github.com/en/enterprise-server%402.22/admin/release-notes#2.22.10\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://docs.github.com/en/enterprise-server%403.0/admin/release-notes#3.0.4\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}"
}
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…