GitHub Enterprise Server
Path traversal in GitHub Enterprise Server allowed unauthenticated deletion of instance storage via the X-GitHub-Request-Id header
A path traversal vulnerability was identified in GitHub Enterprise Server that allowed an unauthenticated attacker to delete arbitrary files and directories on the instance, including the entire user storage directory containing Git LFS objects, release assets, attachments, and avatars. The X-GitHub-Request-Id request header was used without sanitization as a filesystem path segment for the upload buffer directory, so a traversal value pointed the buffer at an arbitrary path and the deferred cleanup routine recursively removed the traversed target. Exploitation required only network reachability to the instance and no authentication, and it worked even when private mode was enabled. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.22 and was fixed in versions 3.21.4, 3.20.6, 3.19.10, 3.18.13 and 3.17.19. This vulnerability was reported via the GitHub Bug Bounty program.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 3.17.0, <= 3.17.18
- >= 3.18.0, <= 3.18.12
- >= 3.19.0, <= 3.19.9
- >= 3.20.0, <= 3.20.5
- >= 3.21.0, <= 3.21.3
Fixed in 3.17.19, 3.18.13, 3.19.10, 3.20.6, 3.21.4
Mitigation
Upgrade Enterprise Server to 3.17.19 or 3.18.13 or 3.19.10 or 3.20.6 or 3.21.4 or later.
References
- Release notes docs.github.com/en/enterprise-server@3.17/admin/rel…
- Release notes docs.github.com/en/enterprise-server@3.18/admin/rel…
- Release notes docs.github.com/en/enterprise-server@3.19/admin/rel…
2 more
- Release notes docs.github.com/en/enterprise-server@3.20/admin/rel…
- Release notes docs.github.com/en/enterprise-server@3.21/admin/rel…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.