GitHub `Kernel#send()` Flaw Exposed Secrets and Enabled GHES RCE Path
A vulnerability tracked as CVE-2024-0200 allowed attackers with organization owner privileges to abuse an unsafe Ruby Kernel#send() call in GitHub’s organization repository settings flow and invoke unintended zero-argument methods on Repository objects. Researchers showed the bug could be used to trigger Repository::GitDependency#nw_fsck() and leak roughly 2 MB of environment variables from a production GitHub.com container, exposing access keys, secrets, and internal configuration because spawned git processes inherited the parent environment.
The issue affected GitHub.com and GitHub Enterprise Server (GHES) instances with GitHub Actions enabled, but the impact was more severe on GHES. STAR Labs reported that leaked variables on GHES could include ENTERPRISE_SESSION_SECRET and other Marshal-related secrets, which could be chained with forged Rails session cookies and an unsafe Marshal.load path to achieve remote code execution. GitHub hotfixed GitHub.com on December 26, 2023, and later released a patch and advisory, while recommended mitigations included allowlisting the rid_key parameter, reducing environment variables passed to git processes, rotating exposed secrets, and monitoring repository_items requests for abnormal rid_key values.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
6 events from the most recent confirmed update back to the earliest known activity.
STAR Labs publishes technical write-up of the GitHub vulnerability chain
STAR Labs publicly detailed the vulnerability chain, exploitation method, impact on GitHub.com and GHES, and detection and mitigation recommendations. The write-up described the environment variable disclosure and the GHES path to remote code execution.
GitHub releases patch and public announcement for CVE-2024-0200
GitHub published a patch and advisory for CVE-2024-0200, covering affected GitHub Enterprise Server deployments. The announcement disclosed the vulnerability and made remediation available to customers.
Research shows GHES exposure could lead to remote code execution
Analysis of GitHub Enterprise Server showed that leaked environment variables could include ENTERPRISE_SESSION_SECRET or a Marshal-related secret, which could be combined with forged Rails session cookies and an unsafe Marshal deserialization sink to achieve remote code execution. This extended the impact beyond information disclosure on GitHub.com.
GitHub hotfixes GitHub.com for CVE-2024-0200
GitHub applied a hotfix to GitHub.com during the Christmas holiday period to remediate the vulnerability later assigned CVE-2024-0200. The fix addressed the unsafe method invocation path that enabled environment variable disclosure.
Vulnerability used to leak GitHub.com container environment variables
The researcher exploited the flaw on GitHub.com by invoking Repository::GitDependency#nw_fsck(), disclosing roughly 2 MB of environment variables from a production git worker container. The leaked data included numerous access keys, secrets, and internal configuration values inherited by spawned git processes.
Researcher discovers GitHub send() flaw exposing repository method calls
Ngo Wei Lin identified a vulnerability in GitHub's Organizations::Settings::RepositoryItemsComponent where a user-controlled parameter was passed to Ruby's Kernel#send(), enabling zero-argument arbitrary method invocation on Repository-related objects. The issue affected GitHub.com and GitHub Enterprise Server instances with GitHub Actions enabled and required organization owner privileges.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
3 references tracked. Mallory keeps watching after this page renders.
Send()-ing Myself Belated Christmas Gifts - GitHub.com's Environment Variables & GHES Shell | STAR Labs
starlabs.sg
Open sourceSend()-ing Myself Belated Christmas Gifts - GitHub.com's Environment Variables & GHES Shell | STAR Labs
starlabs.sg
Open sourceSend()-ing Myself Belated Christmas Gifts: GitHub.com's Environment Variables & GHES Shell | STAR Labs
starlabs.sg
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


