Arbitrary Command Injection Affecting github.com/cli/cli/internal/codespaces/rpc package, versions <2.62.0
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-GOLANG-GITHUBCOMCLICLIINTERNALCODESPACESRPC-8381312
- published 15 Nov 2024
- disclosed 14 Nov 2024
- credit RyotaK
Introduced: 14 Nov 2024
New CVE-2024-52308 Open this link in a new tabHow to fix?
Upgrade github.com/cli/cli/internal/codespaces/rpc
to version 2.62.0 or higher.
Overview
Affected versions of this package are vulnerable to Arbitrary Command Injection via the gh codespace ssh
or gh codespace logs
commands. An attacker can execute arbitrary code on the user's workstation by manipulating SSH connection details to send a remote username containing something like -oProxyCommand="echo hacked" #
. The -oProxyCommand
flag causes ssh
to execute the provided command while #
shell comment causes any other ssh
arguments to be ignored.
Note:
This is only exploitable if the user connects to a malicious third-party devcontainer.