| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 8.3 | $0-$5k | 0.00 |
Summary
A vulnerability categorized as critical has been discovered in cli up to 2.61.0. The affected element is an unknown function. Such manipulation leads to command injection. This vulnerability is uniquely identified as CVE-2024-52308. The attack can be launched remotely. No exploit exists. It is advisable to upgrade the affected component.
Details
A vulnerability was found in cli up to 2.61.0. It has been rated as critical. Affected by this issue is an unknown functionality. The manipulation with an unknown input leads to a command injection vulnerability. Using CWE to declare the problem leads to CWE-77. The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. Impacted is confidentiality, integrity, and availability. CVE summarizes:
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.
The weakness was disclosed by Ryotak as GHSA-p2h2-3vg9-4p87. The advisory is available at github.com. This vulnerability is handled as CVE-2024-52308 since 11/06/2024. The exploitation is known to be difficult. The attack may be launched remotely. The technical details are unknown and an exploit is not available. This vulnerability is assigned to T1202 by the MITRE ATT&CK project.
The vulnerability scanner Nessus provides a plugin with the ID 211885 (Ubuntu 24.04 LTS / 24.10 : GitHub CLI vulnerability (USN-7130-1)), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 2.62.0 eliminates this vulnerability.
The vulnerability is also documented in the vulnerability database at Tenable (211885). If you want to get best quality of vulnerability data, you may have to visit VulDB.
Product
Name
Version
- 2.0
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
- 2.8
- 2.9
- 2.10
- 2.11
- 2.12
- 2.13
- 2.14
- 2.15
- 2.16
- 2.17
- 2.18
- 2.19
- 2.20
- 2.21
- 2.22
- 2.23
- 2.24
- 2.25
- 2.26
- 2.27
- 2.28
- 2.29
- 2.30
- 2.31
- 2.32
- 2.33
- 2.34
- 2.35
- 2.36
- 2.37
- 2.38
- 2.39
- 2.40
- 2.41
- 2.42
- 2.43
- 2.44
- 2.45
- 2.46
- 2.47
- 2.48
- 2.49
- 2.50
- 2.51
- 2.52
- 2.53
- 2.54
- 2.55
- 2.56
- 2.57
- 2.58
- 2.59
- 2.60
- 2.61.0
Website
- Product: https://github.com/cli/cli/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.4VulDB Meta Temp Score: 8.3
VulDB Base Score: 7.5
VulDB Temp Score: 7.2
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 9.6
NVD Vector: 🔍
CNA Base Score: 8.0
CNA Vector (GitHub_M): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Command injectionCWE: CWE-77 / CWE-74 / CWE-707
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 211885
Nessus Name: Ubuntu 24.04 LTS / 24.10 : GitHub CLI vulnerability (USN-7130-1)
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: cli 2.62.0
Timeline
11/06/2024 🔍11/15/2024 🔍
11/15/2024 🔍
11/27/2024 🔍
Sources
Product: github.comAdvisory: GHSA-p2h2-3vg9-4p87
Researcher: Ryotak
Status: Confirmed
CVE: CVE-2024-52308 (🔍)
GCVE (CVE): GCVE-0-2024-52308
GCVE (VulDB): GCVE-100-284642
Entry
Created: 11/15/2024 07:47Updated: 11/27/2024 05:45
Changes: 11/15/2024 07:47 (64), 11/20/2024 17:53 (12), 11/27/2024 05:45 (2)
Complete: 🔍
Cache ID: 216::103
If you want to get best quality of vulnerability data, you may have to visit VulDB.
No comments yet. Languages: en.
Please log in to comment.