Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
CriticalPublic exploit

Unsafe reflection RCE in GitHub Enterprise Server organizations actions settings

IdentifiersCVE-2024-0200CWE-470· Use of Externally-Controlled Input…

CVE-2024-0200 is an unsafe reflection vulnerability in GitHub Enterprise Server (GHES) caused by use of a user-controlled parameter to select a method invoked on a Repository object. According to the provided content, the vulnerable path is in Organizations::Settings::RepositoryItemsComponent, where repository.send is called with a repository identifier key derived from the rid_key request parameter in Orgs::ActionsSettings::RepositoryItemsController without proper validation. This creates an arbitrary zero-argument method invocation primitive against Repository objects. The researcher identified Repository::GitDependency#nw_fsck as a viable target; that path reaches GitRPC::Backend#nw_fsck and process spawning logic that returns metadata including the spawned process environment. As a result, an attacker could disclose environment variables from the Rails/container environment. On GHES, the content states this disclosure can be escalated to remote code execution, including via exposure of ENTERPRISE_SESSION_SECRET and subsequent abuse of forged Rails session cookies and unsafe Marshal deserialization. The vulnerability affected all GHES versions prior to 3.12 and was fixed in 3.8.13, 3.9.8, 3.10.5, and 3.11.3.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an authenticated attacker with sufficient privileges to invoke unintended methods on Repository objects, leading at minimum to disclosure of sensitive environment variables available to the Rails process. The provided content states that on GitHub.com this exposed approximately 1,220 environment variables, including numerous access keys and secrets. For GHES, the issue can be escalated beyond information disclosure to remote code execution if leaked secrets include ENTERPRISE_SESSION_SECRET, enabling forged Rails session cookies and abuse of unsafe deserialization. The practical impact therefore includes secret disclosure, compromise of application trust boundaries, potential full server-side code execution on GHES, and follow-on compromise of connected systems or services reachable with exposed credentials.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, restrict access to the affected organizations actions settings functionality to the smallest possible set of trusted administrators and review whether GitHub Actions must remain enabled on exposed GHES instances. Monitor and investigate requests to /organizations/<organization>/settings/actions/repository_items for anomalous rid_key values, including values supplied in request bodies. Reduce the set of environment variables inherited by Rails and spawned git processes to minimize disclosure impact. Rotate sensitive secrets, particularly session-related secrets and any credentials present in process environments, if compromise is suspected.

Remediation

Patch, then assume compromise.

Upgrade GitHub Enterprise Server to a fixed release. The provided content states the issue was fixed in GHES 3.8.13, 3.9.8, 3.10.5, and 3.11.3; all versions prior to 3.12 are affected unless updated to the relevant patched build. Code-level remediation is to eliminate unsafe reflection on attacker-controlled input by validating or allowlisting rid_key values before method dispatch and ensuring user input cannot reach repository.send or equivalent dynamic invocation paths. Because exploitation may disclose secrets, rotate any credentials, tokens, or secrets that may have been exposed, especially session-signing material and service access keys.
PUBLIC EXPLOITS

Exploits

1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.

VALID 1 / 1 TOTALView more in app
CVE-2024-0507_CVE-2024-0200-githubMaturityPoCVerified exploit

This repository contains two Python exploit scripts targeting critical vulnerabilities in GitHub Enterprise Server: CVE-2024-0200 and CVE-2024-0507. The structure is straightforward, with each exploit in its own file (CVE-2024-0200.py and CVE-2024-0507.py), a README.md with background and references, and an assets directory for images. CVE-2024-0200.py exploits an unsafe reflection vulnerability that allows an attacker with organization owner credentials to leak the ENTERPRISE_SESSION_SECRET and craft a malicious session cookie. This cookie, when sent to the server, triggers a Ruby Marshal deserialization vulnerability, resulting in remote code execution (RCE) as the server. The payload opens a reverse shell to an attacker-controlled IP and port. CVE-2024-0507.py exploits a command injection vulnerability in the management console's storage settings. By injecting a command into a POST parameter, the attacker can reset the root site admin password to a known value, effectively escalating privileges to site admin. The script automates login, CSRF token handling, payload delivery, and status checking. Both exploits require valid credentials and target network-accessible endpoints on the GitHub Enterprise Server web interface. The code is operational, automating the full exploitation process for each CVE. No fake or detection-only scripts are present.

convisolabsDisclosed Mar 18, 2024pythonnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
GitHubEnterprise Serverapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity

Community discussion across Reddit, Mastodon, and other social sources.