CVE-2023-51385
Reported by mitre · Published December 18, 2023
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| pam_ssh_agent_auth | Amazon Linux | 0.10.4-4.8.amzn2023.0.10, 0.10.3-2.22.amzn2.0.7 |
| openssh-clients | Amazon Linux | 7.4p1-22.amzn2.0.7 |
| openssh | Alpine | 9.6_p1-r0, 9.1_p1-r5, 9.0_p1-r5 |
| openssh-ldap | Amazon Linux | 7.4p1-22.amzn2.0.7 |
| openssh-keycat | Amazon Linux | 7.4p1-22.amzn2.0.7 |
| openssh | Amazon Linux | 8.7p1-8.amzn2023.0.10, 7.4p1-22.amzn2.0.7 |
| openssh-cavs | Amazon Linux | 7.4p1-22.amzn2.0.7 |
| openssh-server | Amazon Linux | 8.7p1-8.amzn2023.0.10, 7.4p1-22.amzn2.0.7 |
| openssh-server-sysvinit | Amazon Linux | 7.4p1-22.amzn2.0.7 |
| openssh | openbsd | 9.6 |
| SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | Siemens | 1.1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| amazon:2 | pam_ssh_agent_auth | 0 |
| amazon:2 | openssh-clients | 0 |
| alpine | openssh | 0, 0, 0 |
| amazon:2 | openssh-ldap | 0 |
| amazon:2 | openssh-keycat | 0 |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | 3.1.5 |
| amazon:2023 | openssh | 0 |
| amazon:2023 | pam_ssh_agent_auth | 0 |
| Siemens | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | 0 |
| amazon:2 | openssh | 0 |
| amazon:2 | openssh-cavs | 0 |
| amazon:2 | openssh-server | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | 3.1.5 |
| amazon:2023 | openssh-server | 0 |
| amazon:2 | openssh-server-sysvinit | 0 |
| n/a | n/a | * |
| amazon:2023 | openssh-keycat | 0 |
| amazon:2023 | openssh-clients | 0 |
| amazon:2 | openssh-askpass | 0 |
…and 1 more
Timeline
- Dec 18, 2023 CVE Published
- Dec 19, 2023 EPSS Score (30 in total, the first dated here)
- Jul 3, 2024 PoC Published (2 in total, the first dated here)
- Oct 5, 2024 Coalition ESS Score (15 in total, the first dated here)
- Jan 26, 2026 CVE Updated
- Mar 17, 2026 Security Advisory (19 in total, the first dated here)
- Jun 2, 2026 Distribution Patch (13 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2023-51385
vulnetix vdb fixes CVE-2023-51385
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-51385/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- DSA-5586 vendor-advisory
- [debian-lts-announce] 20231226 [SECURITY] [DLA 3694-1] openssh security update mailing-list
- [oss-security] 20231226 CVE-2023-51385, CVE-2023-6004: OpenSSH, libssh: Security weakness in ProxyCommand handling mailing-list
- GLSA-202312-17 vendor-advisory
- 20240313 APPLE-SA-03-07-2024-2 macOS Sonoma 14.4 mailing-list
- poc-proxycommand-vulnerable exploit
- CVE-2023-51385 exploit
- poc-cve-2023-51385 exploit
- CVE-2023-51385 exploit
- CVE-2023-51385_test exploit
- CVE-2023-51385_poc-test exploit
- CVE-2023-51385_test exploit
- CVE-2023-51385 exploit
- CVE-2023-51385 exploit
…and 19 more