{"schema_version":"1.9.0","id":"CVE-2023-51385","published":"2023-12-18T00:00:00Z","modified":"2026-08-12T14:51:47.762040Z","related":["ALSA-2024:0606","ALSA-2024:1130","SUSE-SU-2024:0596-1","SUSE-SU-2024:0603-1","SUSE-SU-2024:0604-1","SUSE-SU-2024:2393-1","SUSE-SU-2025:20009-1","openSUSE-SU-2024:14113-1"],"details":"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.","affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/openssh/openssh-portable","events":[{"introduced":"0"},{"fixed":"8241b9c0529228b4b86d88b1a6076fb9f97e4a99"},{"fixed":"7ef3787c84b6b524501211b11a26c742f829af1a"}],"database_specific":{"cpe":"cpe:2.3:a:openbsd:openssh:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"9.6"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["V_9_5_P1","V_9_2_P1","V_9_3_P1","V_9_1_P1","V_9_0_P1","V_8_9_P1","V_8_8_P1","V_8_7_P1","V_8_6_P1","V_8_5_P1","V_8_4_P1","V_8_2_P1","V_8_1_P1","V_8_0_P1","V_7_9_P1","V_7_8_P1","V_7_7_P1","V_7_6_P1","V_7_5_P1","V_7_4_P1","V_7_3_P1","V_7_2_P1","V_7_1_P1","V_7_0_P1","V_6_9_P1","V_6_8_P1","V_6_6_P1","V_6_5_P1","V_6_2_P1","V_6_1_P1","V_6_0_P1","V_5_7_P1","V_5_5_P1","V_5_2_P1","V_5_1_P1","V_5_0_P1","V_4_2_P1","V_3_9_P1","V_3_8_P1","AFTER_KRB5_GSSAPI_MERGE","BEFORE_KRB5_GSSAPI_MERGE","POST_KRB4_REMOVAL","PRE_KRB4_REMOVAL","AFTER_FREEBSD_PAM_MERGE","BEFORE_FREEBSD_PAM_MERGE","V_3_6_1_P1","V_3_4_P1","V_3_2_2_P1","PRE_SW_KRBV","V_3_1_P1","V_3_0_1_P1","V_3_0_P1","V_2_5_2_P1","V_2_5_1_P2","V_2_5_1_P1","V_2_5_0_P1","PRE-REORDER","V_2_3_0_P1","PRE_CYGWIN_MERGE","V_2_2_0_P1","V_2_1_1_P4","V_2_1_1_P3","ABOUT_TO_ADD_INET_ATON","V_2_1_1_P2","V_2_1_1_P1","PRE_NEW_LOGIN_CODE","V_2_1_0_P3","V_2_1_0_P2","V_2_1_0_P1","V_2_1_0","V_2_0_0_BETA2","V_2_0_0_BETA1","V_2_0_0_TEST1","V_1_2_3_TEST3","V_1_2_3_TEST2","V_1_2_3_TEST1","V_1_2_3","V_1_2_3_PRE5","V_1_2_3_PRE4","V_1_2_3_PRE3","V_1_2_3_PRE2","V_1_2_3_PRE1","V_1_2_2_P1","V_1_2_2","V_1_2_2_PRE29","V_1_2_2_PRE28","V_1_2_1_PRE27","V_1_2_1_PRE26","PRE_IPV6","V_1_2_1_PRE25","V_1_2_1_PRE24","V_1_2_1_PRE23","V_1_2_1_PRE22","PRE_FIXPATHS_INTEGRATION","V_1_2_1_PRE21","V_1_2_1_PRE20","V_1_2_1_PRE19","PRE_HPUX_INTEGRATION","V_1_2_1_PRE18","V_1_2PRE17","V_1_2_PRE16","V_1_2_PRE15","V_1_2_PRE14","V_1_2_PRE13","V_1_2_PRE12","V_1_2_PRE11","V_1_2_PRE10","V_1_2_PRE9","V_1_2_PRE8","V_1_2_PRE7","V_1_2_PRE6","V_1_2_PRE5","V_1_2_PRE4","PRE_DAN_PATCH_MERGE"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-51385.json","vanir_signatures":[{"deprecated":false,"digest":{"function_hash":"70957496196284585050479216237541973508","length":25589},"id":"CVE-2023-51385-0a0232ee","signature_type":"Function","signature_version":"v1","source":"https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a","target":{"file":"ssh.c","function":"main"}},{"deprecated":false,"digest":{"line_hashes":["302129403808892202751107050716447255615","131931615182977091926508911644840089378","292141981209210395634936391072959491054","163768464370795856549232577824910300828","228255596276621902893441569339173223720","54970469869008711962314518569320120653","292412567841264930351270340709776136395"],"threshold":0.9},"id":"CVE-2023-51385-1f7f63ed","signature_type":"Line","signature_version":"v1","source":"https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a","target":{"file":"ssh.c"}}],"vanir_signatures_modified":"2026-08-12T14:51:47Z"}}],"references":[{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2025/10/07/1"},{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2025/10/12/1"},{"type":"WEB","url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html"},{"type":"WEB","url":"https://cert-portal.siemens.com/productcert/html/ssa-769027.html"},{"type":"WEB","url":"https://cert-portal.siemens.com/productcert/html/ssa-794697.html"},{"type":"WEB","url":"https://support.apple.com/kb/HT214084"},{"type":"WEB","url":"https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html"},{"type":"WEB","url":"https://www.openssh.com/txt/release-9.6"},{"type":"WEB","url":"https://www.openwall.com/lists/oss-security/2023/12/18/2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/51xxx/CVE-2023-51385.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-51385"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202312-17"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20240105-0005/"},{"type":"ADVISORY","url":"https://www.debian.org/security/2023/dsa-5586"},{"type":"FIX","url":"https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a"},{"type":"ARTICLE","url":"http://seclists.org/fulldisclosure/2024/Mar/21"},{"type":"ARTICLE","url":"http://www.openwall.com/lists/oss-security/2023/12/26/4"},{"type":"ARTICLE","url":"https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html"}],"database_specific":{"cna_assigner":"mitre","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/51xxx/CVE-2023-51385.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"}]}