Medium, CVSS 4.4GoPublished
wolfictl leaks GitHub tokens to remote non-GitHub git servers
CVE-2024-35183 · GHSA-8fg7-hp93-qhvr
- Affected
- Go github.com/wolfi-dev/wolfictl < 0.16.10
- Fixed in
- 0.16.10· Vendor fix available
- Issue
- A git authentication issue allows a local user’s GitHub token to be sent to remote servers other than github.com. Details Most git-dependent functionality in wolfictl relies on its own git package, which contains centralized logic for implementing interactions with git repositories. Some of this functionality requires authentication in order to access private repositories. There’s a central function GetGitAuth: https://github.com/wolfi-dev/wolfictl/blob/6d99909f7b1aa23f732d84dad054b02a61f530e6/pkg/git/git.go#L22 This looks for a GitHub token in the environment variable GITHUBTOKEN and returns it as an HTTP basic auth object to be used with the github.com/go-git/go-git/v5 library. Most callers (direct or indirect) of GetGitAuth use the token to authenticate to github.com only; however, in some cases callers were passing this authentication without checking that the remote git repository was hosted on github.com. Issue 1 One of these callers processed git URLs from Melange…
Recommended action: Upgrade to 0.16.10 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.