CVE-2024-52308
CVE-2024-52308 · Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer
CVSS 8.0 · Élevée · EPSS 0,9% · Correctif disponible
Comparez avec votre version installée
Les produits concernés et les versions corrigées connues sont des informations publiques. Comparez-les avec votre version installée.
- cliAucun correctif publié
- gh Debian 12Aucun correctif publié
- gh Debian 13Mettez à jour vers 2.46.0-2
- gh Ubuntu Pro 24.04 LTSMettez à jour vers 2.45.0-1ubuntu0.2+esm1
Vérifiez la version installée :
dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="gh"'Évaluez les risques de votre serveur
La vérification gratuite donne une note et un résumé des risques par pile technologique, sans inscription. Elle ne précise pas si cette vulnérabilité particulière vous concerne.
La surveillance compare les informations publiques aux logiciels de vos serveurs. Elle fournit les résultats détaillés et l’ordre des mises à jour.
curl -fsSL https://patchfirst.dev/check.sh | shLes canaux diffusent des actualités générales sur les technologies ; la surveillance signale les nouveaux résultats sur vos serveurs dans votre tableau de bord, par notification du navigateur, dans Telegram ou par webhook.
Cette page présente des faits issus de sources publiques. Consultez l’avis original avant toute mise à jour.
The GitHub CLI version 2.6.1 and earlier are vulnerable to remote code execution through a malicious codespace SSH server when using `gh codespace ssh` or `gh codespace logs` commands. This has been patched in the cli v2.62.0.
Developers connect to remote codespaces through an SSH server running within the devcontainer, which is generally provided through the [default devcontainer image]( https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-... https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#using-the-default-dev-container-configuration) . GitHub CLI [retrieves SSH connection details]( https://github.com/cli/cli/blob/30066b0042d0c5928d959e288144300cb28196c9/internal/codespaces/rpc/inv... https://github.com/cli/cli/blob/30066b0042d0c5928d959e288144300cb28196c9/internal/codespaces/rpc/invoker.go#L230-L244 ), such as remote username, which is used in [executing `ssh` commands]( https://github.com/cli/cli/blob/e356c69a6f0125cfaac782c35acf77314f18908d/pkg/cmd/codespace/ssh.go#L2... https://github.com/cli/cli/blob/e356c69a6f0125cfaac782c35acf77314f18908d/pkg/cmd/codespace/ssh.go#L263 ) for `gh codespace ssh` or `gh codespace logs` commands.
This exploit occurs when a malicious third-party devcontainer contains a modified SSH server that injects `ssh` arguments within the SSH connection details. `gh codespace ssh` and `gh codespace logs` commands could execute arbitrary code on the user's workstation if the remote username contains 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.
In `2.62.0`, the remote username information is being validated before being used.
- Publication
- Mise à jour
Correctifs dans les distributions
- openSUSE-SU-2026:21310-1 · openSUSE Leap 16.0 ·
- openSUSE-SU-2025:0021-1 · openSUSE Leap 15.6, SUSE Package Hub 15 SP6 ·
- USN-7130-1 · Ubuntu Pro 24.04 LTS ·
- openSUSE-SU-2024:14513-1 · openSUSE Tumbleweed ·
- openSUSE-SU-2024:14509-1 · openSUSE Tumbleweed ·
Pile logicielle: system
Produits et versions concernés
cli
- Versions du logiciel
- <= 2.61.0: Concernée
Aucun correctif publié
gh Debian 12
- Versions du logiciel
- 2.23.0+dfsg1-1
- 2.24.3+dfsg1-1
- 2.27.0+dfsg1-1
- 2.30.0-1
- 2.30.0-2
- 2.35.0-1
Toutes les versions (16)
- 2.40.1+dfsg1-1
- 2.42.1-1
- 2.43.1-1
- 2.44.1-1
- 2.44.1-2
- 2.45.0-1
- 2.46.0-1
- 2.46.0-2
- 2.46.0-3
- 2.46.0-4
- Plages de versions concernées
- ECOSYSTEM: (−∞, +∞)
Aucun correctif publié
gh Debian 13
- Plages de versions concernées
- ECOSYSTEM: < 2.46.0-2
Mettez à jour vers 2.46.0-2
gh Ubuntu Pro 24.04 LTS
- Versions du logiciel
- 2.27.0+dfsg1-1build1
- 2.30.0-2
- 2.35.0-1
- 2.40.1+dfsg1-1
- 2.42.1-1
- 2.43.1-1
Toutes les versions (12)
- 2.44.1-1
- 2.44.1-2
- 2.45.0-1
- 2.45.0-1build1
- 2.45.0-1ubuntu0.1
- 2.45.0-1ubuntu0.2
- Plages de versions concernées
- ECOSYSTEM: < 2.45.0-1ubuntu0.2+esm1
Mettez à jour vers 2.45.0-1ubuntu0.2+esm1