Improper handling of null bytes in GitHub Actions Runner allows an attacker to set arbitrary environment variables
A code injection flaw in GitHub Actions on Windows runners let an attacker who could already set one environment variable value inject additional arbitrary environment variables. This could allow them to alter the runner's environment beyond their intended permissions.
- Triaged in 5 days
- Fixed in 4 months
- Paid in 4 months
- Disclosed after 4 months
Summary by the program
A code injection vulnerability was identified in GitHub Enterprise Server that allowed setting arbitrary environment variables from a single environment variable value in GitHub Actions when using a Windows based runner. To exploit this vulnerability, an attacker would need existing permission to control the value of environment variables for use with GitHub Actions. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.8.0 and was fixed in versions 3.4.15, 3.5.12, 3.6.8, 3.7.5. This vulnerability was reported via the GitHub Bug Bounty program.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker with existing permission to control environment variable values could set arbitrary environment variables on a Windows-based GitHub Actions runner.
What the attacker needed
GitHub Enterprise Server before 3.8.0; Windows-based Actions runner; Permission to control an environment variable value
The fix
The vulnerability was fixed in GitHub Enterprise Server versions 3.4.15, 3.5.12, 3.6.8, and 3.7.5.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Environment variables are named settings programs read. Here, someone who could already control one setting could use it to add other settings they were not supposed to control.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.