CVE-2023-51385: n/a
In ssh in OpenSSH before 9.6, OS command injection might occur if a user name or host name has shell metacharacters, and this name is referenced by an expansion token in certain situations. For example, an untrusted Git repository can have a submodule with shell metacharacters in a user name or host name.
AI Analysis
Technical Summary
CVE-2023-51385 is a command injection vulnerability identified in OpenSSH versions before 9.6. The root cause lies in the handling of user names or host names that contain shell metacharacters (e.g., semicolons, backticks) when these names are referenced by expansion tokens in certain operational contexts. Specifically, if an attacker controls a user or host name—such as through a malicious Git repository submodule—they can inject arbitrary OS commands that the OpenSSH process will execute. This vulnerability is categorized under CWE-78 (Improper Neutralization of Special Elements used in an OS Command). The vulnerability can be exploited remotely without requiring authentication or user interaction, as the attack vector involves the processing of names during SSH operations. The CVSS v3.1 base score is 6.5 (medium severity), reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and partial impact on confidentiality and integrity, but no impact on availability. No public exploits have been reported yet, but the vulnerability poses a significant risk especially in environments where OpenSSH is used to interact with untrusted or third-party Git repositories. The lack of a patch link suggests that remediation involves upgrading to OpenSSH 9.6 or later, which addresses this issue by properly sanitizing or restricting shell metacharacters in user and host names during expansion token processing.
Potential Impact
For European organizations, this vulnerability could lead to unauthorized command execution on critical infrastructure, potentially compromising sensitive data confidentiality and integrity. Organizations that rely heavily on OpenSSH for secure remote access and automated Git operations are particularly at risk. Attackers could exploit this vulnerability to execute arbitrary commands, potentially leading to data breaches, lateral movement within networks, or disruption of development pipelines. The impact is heightened in sectors with stringent data protection requirements such as finance, healthcare, and government. Additionally, organizations using continuous integration/continuous deployment (CI/CD) pipelines that pull code from external repositories may inadvertently introduce this risk. The absence of known exploits reduces immediate risk but does not eliminate the threat, especially given the ease of exploitation and network accessibility. Failure to address this vulnerability could result in regulatory non-compliance under GDPR if data breaches occur.
Mitigation Recommendations
European organizations should immediately upgrade all OpenSSH installations to version 9.6 or later, where this vulnerability is fixed. Until upgrades are fully deployed, organizations should implement strict input validation and sanitization for user and host names, especially in automated scripts and Git repository configurations. Restricting or auditing the use of untrusted Git repositories and submodules can reduce exposure. Employing network segmentation and limiting SSH access to trusted users and hosts can further mitigate risk. Monitoring SSH logs for unusual activity related to user or host names containing shell metacharacters can help detect exploitation attempts. Additionally, organizations should review and harden CI/CD pipelines to prevent injection of malicious repository metadata. Security teams should update incident response plans to include this vulnerability and educate developers and system administrators about the risks of untrusted repository content. Finally, applying principle of least privilege on systems running OpenSSH reduces potential damage from exploitation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Ireland
CVE-2023-51385: n/a
Description
In ssh in OpenSSH before 9.6, OS command injection might occur if a user name or host name has shell metacharacters, and this name is referenced by an expansion token in certain situations. For example, an untrusted Git repository can have a submodule with shell metacharacters in a user name or host name.
AI-Powered Analysis
Technical Analysis
CVE-2023-51385 is a command injection vulnerability identified in OpenSSH versions before 9.6. The root cause lies in the handling of user names or host names that contain shell metacharacters (e.g., semicolons, backticks) when these names are referenced by expansion tokens in certain operational contexts. Specifically, if an attacker controls a user or host name—such as through a malicious Git repository submodule—they can inject arbitrary OS commands that the OpenSSH process will execute. This vulnerability is categorized under CWE-78 (Improper Neutralization of Special Elements used in an OS Command). The vulnerability can be exploited remotely without requiring authentication or user interaction, as the attack vector involves the processing of names during SSH operations. The CVSS v3.1 base score is 6.5 (medium severity), reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and partial impact on confidentiality and integrity, but no impact on availability. No public exploits have been reported yet, but the vulnerability poses a significant risk especially in environments where OpenSSH is used to interact with untrusted or third-party Git repositories. The lack of a patch link suggests that remediation involves upgrading to OpenSSH 9.6 or later, which addresses this issue by properly sanitizing or restricting shell metacharacters in user and host names during expansion token processing.
Potential Impact
For European organizations, this vulnerability could lead to unauthorized command execution on critical infrastructure, potentially compromising sensitive data confidentiality and integrity. Organizations that rely heavily on OpenSSH for secure remote access and automated Git operations are particularly at risk. Attackers could exploit this vulnerability to execute arbitrary commands, potentially leading to data breaches, lateral movement within networks, or disruption of development pipelines. The impact is heightened in sectors with stringent data protection requirements such as finance, healthcare, and government. Additionally, organizations using continuous integration/continuous deployment (CI/CD) pipelines that pull code from external repositories may inadvertently introduce this risk. The absence of known exploits reduces immediate risk but does not eliminate the threat, especially given the ease of exploitation and network accessibility. Failure to address this vulnerability could result in regulatory non-compliance under GDPR if data breaches occur.
Mitigation Recommendations
European organizations should immediately upgrade all OpenSSH installations to version 9.6 or later, where this vulnerability is fixed. Until upgrades are fully deployed, organizations should implement strict input validation and sanitization for user and host names, especially in automated scripts and Git repository configurations. Restricting or auditing the use of untrusted Git repositories and submodules can reduce exposure. Employing network segmentation and limiting SSH access to trusted users and hosts can further mitigate risk. Monitoring SSH logs for unusual activity related to user or host names containing shell metacharacters can help detect exploitation attempts. Additionally, organizations should review and harden CI/CD pipelines to prevent injection of malicious repository metadata. Security teams should update incident response plans to include this vulnerability and educate developers and system administrators about the risks of untrusted repository content. Finally, applying principle of least privilege on systems running OpenSSH reduces potential damage from exploitation.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mitre
- Date Reserved
- 2023-12-18T00:00:00.000Z
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 690a6f039e609817bf702c1a
Added to database: 11/4/2025, 9:24:19 PM
Last enriched: 12/19/2025, 4:31:02 AM
Last updated: 2/5/2026, 7:49:16 PM
Views: 62
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-25630
LowCVE-2026-1301: CWE-787 Out-of-bounds Write in o6 Automation GmbH Open62541
MediumCVE-2026-1707: Vulnerability in pgadmin.org pgAdmin 4
HighCVE-2025-68121: CWE-295: Improper Certificate Validation in Go standard library crypto/tls
HighCVE-2025-58190: CWE-835: Loop with Unreachable Exit Condition in golang.org/x/net golang.org/x/net/html
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.