CVE-2022-46255: CWE-22 in GitHub GitHub Enterprise Server
An improper limitation of a pathname to a restricted directory vulnerability was identified in GitHub Enterprise Server that enabled remote code execution. A check was added within Pages to ensure the working directory is clean before unpacking new content to prevent an arbitrary file overwrite bug. This vulnerability affected only version 3.7.0 of GitHub Enterprise Server and was fixed in version 3.7.1. This vulnerability was reported via the GitHub Bug Bounty program.
AI Analysis
Technical Summary
CVE-2022-46255 is a critical security vulnerability identified in GitHub Enterprise Server version 3.7.0. The issue is classified under CWE-22, which corresponds to an improper limitation of a pathname to a restricted directory, commonly known as a directory traversal vulnerability. This flaw allowed an attacker to perform remote code execution (RCE) by exploiting the Pages feature within GitHub Enterprise Server. Specifically, the vulnerability arose because the system did not adequately verify that the working directory was clean before unpacking new content. This oversight enabled an attacker to overwrite arbitrary files on the server by manipulating pathnames during the content unpacking process. The ability to overwrite files arbitrarily can lead to execution of malicious code with the privileges of the GitHub Enterprise Server process, potentially compromising the entire server environment. The vulnerability was fixed in version 3.7.1 by adding a check to ensure the working directory is clean before unpacking new content, effectively preventing the arbitrary file overwrite. The CVSS v3.1 base score for this vulnerability is 9.8, indicating a critical severity level. The vector string (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) highlights that the vulnerability is remotely exploitable over the network without any authentication or user interaction, and it impacts confidentiality, integrity, and availability to a high degree. No known exploits in the wild have been reported to date, but the severity and ease of exploitation make it a significant risk for organizations using the affected version of GitHub Enterprise Server.
Potential Impact
For European organizations, the impact of CVE-2022-46255 can be severe, especially for those relying on GitHub Enterprise Server 3.7.0 for their software development lifecycle and internal code repositories. Successful exploitation could lead to full compromise of the GitHub Enterprise Server, allowing attackers to execute arbitrary code, modify or delete critical files, and potentially gain access to sensitive source code and intellectual property. This could result in data breaches, disruption of development operations, and supply chain risks if compromised code is propagated downstream. Organizations in sectors with stringent data protection requirements, such as finance, healthcare, and critical infrastructure, face heightened risks due to potential regulatory non-compliance and reputational damage. Moreover, the ability to remotely exploit this vulnerability without authentication or user interaction increases the attack surface and lowers the barrier for threat actors, including nation-state groups and cybercriminals, to target European enterprises. The absence of known exploits in the wild does not diminish the urgency of patching, as public disclosure and the critical nature of the flaw may prompt rapid development of exploit code.
Mitigation Recommendations
1. Immediate Upgrade: Organizations should prioritize upgrading GitHub Enterprise Server from version 3.7.0 to 3.7.1 or later, where the vulnerability is patched. 2. Access Controls: Restrict network access to GitHub Enterprise Server instances to trusted IP ranges and use VPNs or zero-trust network access solutions to limit exposure. 3. Monitoring and Logging: Implement enhanced monitoring of file system changes and audit logs related to the Pages feature to detect unusual activity indicative of exploitation attempts. 4. Incident Response Preparedness: Prepare incident response plans specifically for GitHub Enterprise Server compromise scenarios, including backups and recovery procedures. 5. Configuration Review: Review and harden the configuration of the Pages feature and related services to minimize unnecessary permissions and reduce the attack surface. 6. Segmentation: Isolate GitHub Enterprise Server instances from other critical infrastructure to contain potential breaches. 7. Threat Intelligence Sharing: Engage with industry groups and national cybersecurity centers to stay informed about emerging exploits or attack campaigns targeting this vulnerability. These steps go beyond generic patching advice by emphasizing network-level protections, monitoring, and operational readiness tailored to the specific nature of this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Belgium, Italy
CVE-2022-46255: CWE-22 in GitHub GitHub Enterprise Server
Description
An improper limitation of a pathname to a restricted directory vulnerability was identified in GitHub Enterprise Server that enabled remote code execution. A check was added within Pages to ensure the working directory is clean before unpacking new content to prevent an arbitrary file overwrite bug. This vulnerability affected only version 3.7.0 of GitHub Enterprise Server and was fixed in version 3.7.1. This vulnerability was reported via the GitHub Bug Bounty program.
AI-Powered Analysis
Technical Analysis
CVE-2022-46255 is a critical security vulnerability identified in GitHub Enterprise Server version 3.7.0. The issue is classified under CWE-22, which corresponds to an improper limitation of a pathname to a restricted directory, commonly known as a directory traversal vulnerability. This flaw allowed an attacker to perform remote code execution (RCE) by exploiting the Pages feature within GitHub Enterprise Server. Specifically, the vulnerability arose because the system did not adequately verify that the working directory was clean before unpacking new content. This oversight enabled an attacker to overwrite arbitrary files on the server by manipulating pathnames during the content unpacking process. The ability to overwrite files arbitrarily can lead to execution of malicious code with the privileges of the GitHub Enterprise Server process, potentially compromising the entire server environment. The vulnerability was fixed in version 3.7.1 by adding a check to ensure the working directory is clean before unpacking new content, effectively preventing the arbitrary file overwrite. The CVSS v3.1 base score for this vulnerability is 9.8, indicating a critical severity level. The vector string (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) highlights that the vulnerability is remotely exploitable over the network without any authentication or user interaction, and it impacts confidentiality, integrity, and availability to a high degree. No known exploits in the wild have been reported to date, but the severity and ease of exploitation make it a significant risk for organizations using the affected version of GitHub Enterprise Server.
Potential Impact
For European organizations, the impact of CVE-2022-46255 can be severe, especially for those relying on GitHub Enterprise Server 3.7.0 for their software development lifecycle and internal code repositories. Successful exploitation could lead to full compromise of the GitHub Enterprise Server, allowing attackers to execute arbitrary code, modify or delete critical files, and potentially gain access to sensitive source code and intellectual property. This could result in data breaches, disruption of development operations, and supply chain risks if compromised code is propagated downstream. Organizations in sectors with stringent data protection requirements, such as finance, healthcare, and critical infrastructure, face heightened risks due to potential regulatory non-compliance and reputational damage. Moreover, the ability to remotely exploit this vulnerability without authentication or user interaction increases the attack surface and lowers the barrier for threat actors, including nation-state groups and cybercriminals, to target European enterprises. The absence of known exploits in the wild does not diminish the urgency of patching, as public disclosure and the critical nature of the flaw may prompt rapid development of exploit code.
Mitigation Recommendations
1. Immediate Upgrade: Organizations should prioritize upgrading GitHub Enterprise Server from version 3.7.0 to 3.7.1 or later, where the vulnerability is patched. 2. Access Controls: Restrict network access to GitHub Enterprise Server instances to trusted IP ranges and use VPNs or zero-trust network access solutions to limit exposure. 3. Monitoring and Logging: Implement enhanced monitoring of file system changes and audit logs related to the Pages feature to detect unusual activity indicative of exploitation attempts. 4. Incident Response Preparedness: Prepare incident response plans specifically for GitHub Enterprise Server compromise scenarios, including backups and recovery procedures. 5. Configuration Review: Review and harden the configuration of the Pages feature and related services to minimize unnecessary permissions and reduce the attack surface. 6. Segmentation: Isolate GitHub Enterprise Server instances from other critical infrastructure to contain potential breaches. 7. Threat Intelligence Sharing: Engage with industry groups and national cybersecurity centers to stay informed about emerging exploits or attack campaigns targeting this vulnerability. These steps go beyond generic patching advice by emphasizing network-level protections, monitoring, and operational readiness tailored to the specific nature of this vulnerability.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_P
- Date Reserved
- 2022-11-28T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9849c4522896dcbf6ee7
Added to database: 5/21/2025, 9:09:29 AM
Last enriched: 6/21/2025, 3:24:20 PM
Last updated: 7/26/2025, 9:48:48 AM
Views: 11
Related Threats
CVE-2025-8708: Deserialization in Antabot White-Jotter
LowCVE-2025-8707: Improper Export of Android Application Components in Huuge Box App
MediumCVE-2025-8706: SQL Injection in Wanzhou WOES Intelligent Optimization Energy Saving System
MediumCVE-2025-8705: SQL Injection in Wanzhou WOES Intelligent Optimization Energy Saving System
MediumCVE-2025-8704: SQL Injection in Wanzhou WOES Intelligent Optimization Energy Saving System
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.