OpenBSD OpenSSH: OS Command Injection (CVE-2023-51385)
Published Last modified Sources: Siemens ProductCERT, SUSE, Red Hat, Debian, CVE.org, Ubuntu, BSI
What is affected, what to do
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.
An exploit is publicly available. Update OpenBSD OpenSSH to version 9.6.
- Affected
- OpenBSD OpenSSH
lt *..9.6 - Debian Linux
eq 10.0..10.0 - Debian Linux
eq 11.0..11.0 - Debian Linux
eq 12.0..12.0
- OpenBSD OpenSSH
- Fixed in
- OpenBSD OpenSSH
9.6
- OpenBSD OpenSSH
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
6.5
Priority
XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.
Source: NVD, CVSS v3
6.5
CVSS v3
Severity Medium on the scale from 0 to 10.
Source: Siemens ProductCERT, SUSE, Red Hat, Debian, CVE.org, Ubuntu, BSI
19.8 %
EPSS score
Elevated — model estimates 10-50% exploitation likelihood.
Source: FIRST EPSS, percentile 97.4
Show all metrics
- Severity
- Medium
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 112.45 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- PoC (publicly reported)
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 6.5 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 6.5
EPSS score
The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.
Read in glossary- 19.8 %
- Elevated — model estimates 10-50% exploitation likelihood.
EPSS percentile
The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.
Read in glossary- 97.4
- Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- —
- Published
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- Handle the vulnerability in regular vulnerability handling under Art. 21(2)(e) NIS2.
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- From 11.12.2027, Annex I Part II CRA requires manufacturers of affected products with digital elements to handle vulnerabilities without delay and provide security updates.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
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.
Source: siemens_advisory, suse_csaf, redhat_csaf, Debian Security Advisories, cvelistv5, Ubuntu Security Notices, NVD (NIST), BSI WID Portal, BSI CSAF
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| openbsd | openssh |
|
|
Vendors and products
Affected operating systems
| Linux | debian | debian_linux | 10.0 |
| Linux | debian | debian_linux | 11.0 |
| Linux | debian | debian_linux | 12.0 |
| Linux | debian | openssh | bookworm |
| Linux | debian | openssh | bullseye |
| Linux | ubuntu | openssh | focal |
| Linux | ubuntu | openssh | jammy |
| Linux | ubuntu | openssh | lunar |
| Linux | ubuntu | openssh | mantic |
Public exploit references
Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.
| PoC-in-GitHub (nomi-sec) | cve-2023-51385 (opens in a new tab)github.com | PoC (publicly reported)reported, not verified |
References & sources
- openssh.comtxt/release-9.6
- openwall.comlists/oss-security/2023/12/18/2
- github.comopenssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c74…
- debian.orgDSA-5586Vendor advisory
- vin01.github.iopiptagole/ssh/security/openssh/libssh/remote-code-execution/202…
- lists.debian.org[debian-lts-announce] 20231226 [SECURITY] [DLA 3694-1] openssh security updateMailing list
- openwall.com[oss-security] 20231226 CVE-2023-51385, CVE-2023-6004: OpenSSH, libssh: Security weakness in ProxyCommand handlingMailing list
- security.gentoo.orgGLSA-202312-17Vendor advisory
- security.netapp.comadvisory/ntap-20240105-0005
- support.apple.comkb/HT214084
- seclists.org20240313 APPLE-SA-03-07-2024-2 macOS Sonoma 14.4Mailing list
- openwall.comlists/oss-security/2025/10/07/1
- openwall.comlists/oss-security/2025/10/12/1
- Siemens ProductCERTproductcert/html/ssa-794697.html
- Siemens ProductCERTproductcert/html/ssa-769027.html
- Siemens ProductCERTproductcert/html/ssa-082556.html
Changes to this CVE
Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).
Record modifiedMITRE
Show 30 original changes
Individual changes of this event as published by NVD Type Action Before After Reference added —http://seclists.org/fulldisclosure/2024/Mar/21Reference added —http://www.openwall.com/lists/oss-security/2023/12/26/4Reference added —https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1aReference added —https://lists.debian.org/debian-lts-announce/2023/12/msg00017.htmlReference added —https://security.gentoo.org/glsa/202312-17Reference added —https://security.netapp.com/advisory/ntap-20240105-0005/Reference added —https://support.apple.com/kb/HT214084Reference added —https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.htmlReference added —https://www.debian.org/security/2023/dsa-5586Reference added —https://www.openssh.com/txt/release-9.6Reference added —https://www.openwall.com/lists/oss-security/2023/12/18/2Reference removed http://seclists.org/fulldisclosure/2024/Mar/21—Reference removed http://www.openwall.com/lists/oss-security/2023/12/26/4—Reference removed https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a—Reference removed https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html—Reference removed https://security.gentoo.org/glsa/202312-17—Reference removed https://security.netapp.com/advisory/ntap-20240105-0005/—Reference removed https://support.apple.com/kb/HT214084—Reference removed https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html—Reference removed https://www.debian.org/security/2023/dsa-5586—Reference removed https://www.openssh.com/txt/release-9.6—Reference removed https://www.openwall.com/lists/oss-security/2023/12/18/2—Reference type removed http://www.openwall.com/lists/oss-security/2023/12/26/4 Types: Mailing List, Third Party Advisory—Reference type removed https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a Types: Patch—Reference type removed https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html Types: Mailing List, Third Party Advisory—Reference type removed https://security.gentoo.org/glsa/202312-17 Types: Third Party Advisory—Reference type removed https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html Types: Third Party Advisory—Reference type removed https://www.debian.org/security/2023/dsa-5586 Types: Third Party Advisory—Reference type removed https://www.openssh.com/txt/release-9.6 Types: Release Notes—Reference type removed https://www.openwall.com/lists/oss-security/2023/12/18/2 Types: Mailing List, Release Notes—Source identifier: cve@mitre.org
Record modifiedCVE Program
Show 34 original changes
Individual changes of this event as published by NVD Type Action Before After Reference added —http://seclists.org/fulldisclosure/2024/Mar/21Reference added —http://www.openwall.com/lists/oss-security/2023/12/26/4Reference added —http://www.openwall.com/lists/oss-security/2025/10/07/1Reference added —http://www.openwall.com/lists/oss-security/2025/10/12/1Reference added —https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1aReference added —https://lists.debian.org/debian-lts-announce/2023/12/msg00017.htmlReference added —https://security.gentoo.org/glsa/202312-17Reference added —https://security.netapp.com/advisory/ntap-20240105-0005/Reference added —https://support.apple.com/kb/HT214084Reference added —https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.htmlReference added —https://www.debian.org/security/2023/dsa-5586Reference added —https://www.openssh.com/txt/release-9.6Reference added —https://www.openwall.com/lists/oss-security/2023/12/18/2Reference removed http://seclists.org/fulldisclosure/2024/Mar/21—Reference removed http://www.openwall.com/lists/oss-security/2023/12/26/4—Reference removed http://www.openwall.com/lists/oss-security/2025/10/07/1—Reference removed http://www.openwall.com/lists/oss-security/2025/10/12/1—Reference removed https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a—Reference removed https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html—Reference removed https://security.gentoo.org/glsa/202312-17—Reference removed https://security.netapp.com/advisory/ntap-20240105-0005/—Reference removed https://support.apple.com/kb/HT214084—Reference removed https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html—Reference removed https://www.debian.org/security/2023/dsa-5586—Reference removed https://www.openssh.com/txt/release-9.6—Reference removed https://www.openwall.com/lists/oss-security/2023/12/18/2—Reference type removed http://www.openwall.com/lists/oss-security/2023/12/26/4 Types: Mailing List, Third Party Advisory—Reference type removed https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a Types: Patch—Reference type removed https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html Types: Mailing List, Third Party Advisory—Reference type removed https://security.gentoo.org/glsa/202312-17 Types: Third Party Advisory—Reference type removed https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html Types: Third Party Advisory—Reference type removed https://www.debian.org/security/2023/dsa-5586 Types: Third Party Advisory—Reference type removed https://www.openssh.com/txt/release-9.6 Types: Release Notes—Reference type removed https://www.openwall.com/lists/oss-security/2023/12/18/2 Types: Mailing List, Release Notes—Source identifier: af854a3a-2127-422b-91ae-364da2661108
Record modifiedSiemens ADP
Show 7 original changes
Individual changes of this event as published by NVD Type Action Before After Affected versions (publisher) added —Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2023/51xxx/CVE-2023-51385.json">CVE-2023-51385</a>Reference added —https://cert-portal.siemens.com/productcert/html/ssa-082556.htmlReference added —https://cert-portal.siemens.com/productcert/html/ssa-769027.htmlReference added —https://cert-portal.siemens.com/productcert/html/ssa-794697.htmlReference removed https://cert-portal.siemens.com/productcert/html/ssa-082556.html—Reference removed https://cert-portal.siemens.com/productcert/html/ssa-769027.html—Reference removed https://cert-portal.siemens.com/productcert/html/ssa-794697.html—Source identifier: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2023-51385"><img src="https://intel.neosec.eu/badge/cve/CVE-2023-51385.svg?lang=en" alt="CVE-2023-51385 – NEOSEC Intel" height="20"></a>