Enterprise Server Vulnerable to Critical Auth Bypass Flaw

Summary:
A critical vulnerability, CVE-2024-6800, was discovered in GitHub Enterprise Server by “ahacker1” through GitHub’s Bug Bounty Program. This vulnerability could be exploited by an attacker with network access to bypass authentication and gain administrator privileges on the affected machine. The vulnerability is a result of a flaw in the XML signature wrapping mechanism used in SAML authentication with certain identity providers. According to the FOFA search engine for network assets exposed on the public web, there are more than 36,500 GHES instances accessible over the internet, most of them (29,200) located in the United States. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.14. GitHub has released updates for affected versions 3.13.3, 3.12.8, 3.11.14, and 3.10.16 of GitHub Enterprise Server to address this vulnerability and two other medium-severity vulnerabilities. There is currently no evidence of active exploitation of this flaw in the wild.

Security Officer Comments:
The discovery of CVE-2024-6800 in GitHub Enterprise Server highlights the ongoing challenges in maintaining the security of enterprise software. The critical severity of CVE-2024-6800 emphasizes the potential for significant damage if exploited. The widespread exposure of GHES instances on the public internet further emphasizes the need to prioritize applying the necessary patches as soon as possible to secure enterprises that utilize GHES. The vulnerability's impact could extend beyond unauthorized access, potentially enabling data exfiltration, system compromise, and other malicious activities such as ransomware operations. Organizations should take steps to protect their GitHub Enterprise Server deployments from unauthorized access, such as implementing firewalls, VPNs, and intrusion detection systems. Software supply chain attacks are becoming more prevalent as adversaries find convenient flaws in widely-adopted third-party software, and GitHub Enterprise is a highly-incentivized target.

Implementing comprehensive patch management processes is essential to ensure the timely application of software security updates as they are released. Consider combining vulnerability scanning and penetration testing with bug bounty hunter programs to proactively identify potential vulnerabilities and weaknesses in the organization's security posture.

Suggested Corrections:
Threat actors employ different techniques to execute software supply chain attacks. Three common techniques are:

  • Hijacking updates
  • Undermining code signing
  • Compromising open-source code

Hijacking Updates
“Most modern software receives routine updates to address bugs and security issues. Software vendors typically distribute updates from centralized servers to customers as a routine part of product maintenance. Threat actors can hijack an update by infiltrating the vendor’s network and either inserting malware into the outgoing update or altering the update to grant the threat actor control over the software’s normal functionality. For example, the NotPetya attack occurred in 2017 when Russian hackers targeting Ukraine spread malware through tax accounting software popular in Ukraine. What would later be called the NotPetya malware spread well beyond Ukraine and caused major global disruptions in crucial industries, including international shipping, financial services, and healthcare” (CISA, 2022)

Undermining Codesigning
“Codesigning is used to validate the identity of the code’s author and the integrity of the code. Attackers undermine codesigning by self-signing certificates, breaking signing systems, or exploiting misconfigured account access controls. By undermining codesigning, threat actors are able to successfully hijack software updates by impersonating a trusted vendor and inserting malicious code into an update. For example, APT 41, a China-based threat actor, routinely undermines codesigning while conducting sophisticated software supply chain compromises against the United States and other countries” (CISA, 2022)

Compromising Open-Source Code
“Open-source code compromises occur when threat actors insert malicious code into publicly accessible code libraries, which unsuspecting developers—looking for free blocks of code to perform specific functions—then add into their own third-party code. For example, in 2018, researchers discovered 12 malicious Python libraries uploaded on the official Python Package Index (PyPI). The attacker used typosquatting tactics by creating libraries titled “diango,” “djago,” “dajngo,” etc., to lure developers seeking the popular “django” Python library. The malicious libraries contained the same code and functionality of those they impersonated; but they also contained additional functionality, including the ability to obtain boot persistence and open a reverse shell on remote workstations. Open-source code compromises can also affect privately owned software because developers of proprietary code routinely leverage blocks of open-source code in their products” (CISA, 2022)

“Network defenders are limited in their ability to quickly mitigate consequences after a threat actor has compromised a software supply chain. This is because organizations rarely control their entire software supply chain and lack authority to compel every organization in their supply chain to take prompt mitigation steps. Due to the difficulty of mitigating consequences after a software supply chain attack occurs, network defenders should observe industry best practices before an attack has occurred. Implementing best practices will bolster an organization’s ability to prevent, mitigate, and respond to such attacks” (CISA, 2022)

NIST suggests eight key practices for establishing a NIST C-SCRM (Cyber Supply Chain Risk Management) approach that can be applied to software.

  1. Integrate C-SCRM across the organization.
  2. Establish a formal C-SCRM program.
  3. Know and manage critical components and suppliers.
  4. Understand the organization’s supply chain. software for which a vulnerability is disclosed
  5. Closely collaborate with key suppliers.
  6. Include key suppliers in resilience and improvement activities.
  7. Assess and monitor throughout the supplier relationship.
  8. Plan for the full lifecycle.

These practices can assist in preventing, mitigating, and responding to software vulnerabilities that may be introduced through the cyber supply chain and exploited by malicious actors.

https://www.cisa.gov/sites/default/files/publications/defending_against_software_supply_chain_attacks_508_1.pdf

Link(s):
https://www.bleepingcomputer.com/news/security/github-enterprise-server-vulnerable-to-critical-auth-bypass-flaw/

https://docs.github.com/en/enterprise-server@3.13/admin/release-notes#3.13.3

https://www.tenable.com/cve/CVE-2024-6800