CVE-2023-51384
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied....
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
5.5
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
CVE-2023-51384- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-284
- Updated
- 2026-11-02
CVE List
5.5
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
CVE-2023-51384- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-284
- Updated
- 2026-11-02
EUVDEUVD-2023-56105
5.5
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
EUVD-2023-56105- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-44xq-r8h3-q4q6
5.5
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied....
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
GHSA-44xq-r8h3-q4q6- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-284
- Updated
- 2026-11-02
OSVALPINE-CVE-2023-51384
5.5
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
ALPINE-CVE-2023-51384- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVAZL-32205
5.5
CVE-2023-51384 affecting package openssh for versions less than 8.9p1-3
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
AZL-32205- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Show 9 moreShow less
OSVAZL-35081
5.5
CVE-2023-51384 affecting package openssh for versions less than 9.7p1-1
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
AZL-35081- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVBELL-CVE-2023-51384
5.5
- Record
BELL-CVE-2023-51384- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSV
5.5
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
CVE-2023-51384- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2023-51384
5.5
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
DEBIAN-CVE-2023-51384- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVJLSEC-2026-69
5.5
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
JLSEC-2026-69- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVROOT-OS-ALPINE-318-CVE-2023-51384
5.5
CVE-2023-51384 in openssh - Patched by Root
Root has patched CVE-2023-51384 in the openssh package for Root:Alpine:3.18. Multiple fixed versions available.
- Record
ROOT-OS-ALPINE-318-CVE-2023-51384- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-06
OSVUBUNTU-CVE-2023-51384
5.5
In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys.
- Record
UBUNTU-CVE-2023-51384- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVMGASA-2024-0010 No score
Updated openssh packages fix security vulnerabilities
The updated packages fix security vulnerabilities: The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an insufficiently trustworthy search path, leading to remote code execution if an agent is forwarded to an attacker-controlled system. (CVE-2023-38408) Prefix Truncation Attacks in SSH Specification (Terrapin Attack). (CVE-2023-48795) In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. When destination constraints are specified during addition of PKCS#11-hosted private keys, these constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys. (CVE-2023-51384) 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. (CVE-2023-51385)
- Record
MGASA-2024-0010- Updated
- 2026-11-02
OSVUSN-6565-1 No score
openssh vulnerabilities
It was discovered that OpenSSH incorrectly handled supplemental groups when running helper programs for AuthorizedKeysCommand and AuthorizedPrincipalsCommand as a different user. An attacker could possibly use this issue to escalate privileges. This issue only affected Ubuntu 20.04 LTS. (CVE-2021-41617)
It was discovered that OpenSSH incorrectly added destination constraints when PKCS#11 token keys were added to ssh-agent, contrary to expectations. This issue only affected Ubuntu 22.04 LTS, and Ubuntu 23.04. (CVE-2023-51384)
It was discovered that OpenSSH incorrectly handled user names or host names with shell metacharacters. An attacker could possibly use this issue to perform OS command injection. (CVE-2023-51385)
- Record
USN-6565-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
opensshAlpine:v3.16 |
8.9 up to 9.0_p1-r5 | 9.0_p1-r5 |
opensshAlpine:v3.17 |
8.9 up to 9.1_p1-r5 | 9.1_p1-r5 |
opensshAlpine:v3.19 |
8.9 up to 9.6_p1-r0 | 9.6_p1-r0 |
opensshAlpine:v3.20 |
8.9 up to 9.6_p1-r0 | 9.6_p1-r0 |
opensshAlpine:v3.21 |
8.9 up to 9.6_p1-r0 | 9.6_p1-r0 |
opensshAlpine:v3.22 |
8.9 up to 9.6_p1-r0 | 9.6_p1-r0 |
opensshAlpine:v3.23 |
8.9 up to 9.6_p1-r0 | 9.6_p1-r0 |
opensshAlpine:v3.24 |
8.9 up to 9.6_p1-r0 | 9.6_p1-r0 |
opensshAzure Linux:2 |
before 8.9p1-3 | 8.9p1-3 |
opensshAzure Linux:3 |
before 9.7p1-1 | 9.7p1-1 |
Show 19 moreShow less
| Package | Affected | Fixed |
|---|---|---|
opensshAlpaquita:23 |
9.1_p1-r3 up to 9.1_p1-r7 | 9.1_p1-r7 |
opensshAlpaquita:stream |
9.3_p1-r7 up to 9.6_p1-r0 | 9.6_p1-r0 |
opensshBellSoft Hardened Containers:23 |
9.1_p1-r3 up to 9.1_p1-r7 | 9.1_p1-r7 |
opensshBellSoft Hardened Containers:stream |
9.3_p1-r7 up to 9.6_p1-r0 | 9.6_p1-r0 |
opensshDebian:12 |
before 1:9.2p1-2+deb12u2, plus listed versions 1:9.2p1-21:9.2p1-2+deb12u1 |
1:9.2p1-2+deb12u2 |
opensshDebian:13 |
before 1:9.6p1-1 | 1:9.6p1-1 |
opensshDebian:14 |
before 1:9.6p1-1 | 1:9.6p1-1 |
OpenSSH_jllJulia |
8.9.0+0 up to 9.9.1+0 | 9.9.1+0 |
opensshMageia:9 From an advisory covering 4 CVEs |
before 9.3p1-2.1.mga9 | 9.3p1-2.1.mga9 |
opensshRoot:Alpine:3.18 |
before 9.3_p2-r20071 | 9.3_p2-r200719.3_p2-r200739.3_p2-r200749.3_p2-r200729.3_p2-r300759.3_p2-r40076 |
rootio-opensshRoot:Alpine:3.18 |
before 9.3_p2-r20071 | 9.3_p2-r200719.3_p2-r200739.3_p2-r200749.3_p2-r200729.3_p2-r300759.3_p2-r40076 |
openssh-ssh1Ubuntu:18.04:LTS |
All versions, plus listed versions 1:7.5p1-81:7.5p1-91:7.5p1-9build11:7.5p1-10 |
None known |
openssh-ssh1Ubuntu:20.04:LTS |
All versions, plus listed versions 1:7.5p1-11build1 |
None known |
opensshUbuntu:22.04:LTS |
before 1:8.9p1-3ubuntu0.6, plus listed versions 1:8.4p1-6ubuntu21:8.7p1-21:8.7p1-2build11:8.7p1-41:8.8p1-1 Show 5 moreShow less1:8.9p1-31:8.9p1-3ubuntu0.11:8.9p1-3ubuntu0.31:8.9p1-3ubuntu0.41:8.9p1-3ubuntu0.5 |
1:8.9p1-3ubuntu0.6 |
openssh-ssh1Ubuntu:22.04:LTS |
All versions, plus listed versions 1:7.5p1-121:7.5p1-12build11:7.5p1-13 |
None known |
opensshUbuntu:24.04:LTS |
before 1:9.6p1-3ubuntu1, plus listed versions 1:9.3p1-1ubuntu31:9.4p1-1ubuntu1 |
1:9.6p1-3ubuntu1 |
openssh-ssh1Ubuntu:24.04:LTS |
All versions, plus listed versions 1:7.5p1-141:7.5p1-151:7.5p1-15build11:7.5p1-16 |
None known |
opensshUbuntu:20.04:LTS From an advisory covering 3 CVEs |
before 1:8.2p1-4ubuntu0.11, plus listed versions 1:8.0p1-6build11:8.1p1-11:8.1p1-51:8.2p1-41:8.2p1-4ubuntu0.1 Show 8 moreShow less1:8.2p1-4ubuntu0.21:8.2p1-4ubuntu0.31:8.2p1-4ubuntu0.41:8.2p1-4ubuntu0.51:8.2p1-4ubuntu0.71:8.2p1-4ubuntu0.81:8.2p1-4ubuntu0.91:8.2p1-4ubuntu0.10 |
1:8.2p1-4ubuntu0.11 |
opensshUbuntu:22.04:LTS From an advisory covering 3 CVEs |
before 1:8.9p1-3ubuntu0.6, plus listed versions 1:8.4p1-6ubuntu21:8.7p1-21:8.7p1-2build11:8.7p1-41:8.8p1-1 Show 5 moreShow less1:8.9p1-31:8.9p1-3ubuntu0.11:8.9p1-3ubuntu0.31:8.9p1-3ubuntu0.41:8.9p1-3ubuntu0.5 |
1:8.9p1-3ubuntu0.6 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | OSV | |
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-51384 is a medium vulnerability (CVSS 5.5) in Openbsd Openssh, published December 18, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.43%, the 37th percentile. Fixed in openssh 9.0_p1-r5.
References
openssh.com/txt/release-9.6
openwall.com/lists/oss-security/2023/12/18/2
github.com/openssh/openssh-portable/commit/881d9c6af9da4257c69c327c4e2f1508b2fa754b
debian.org/security/2023/dsa-5586
security.netapp.com/advisory/ntap-20240105-0005
support.apple.com/kb/HT214084
Show 27 moreShow less
seclists.org/fulldisclosure/2024/Mar/21
cert-portal.siemens.com/productcert/html/ssa-794697.html
cert-portal.siemens.com/productcert/html/ssa-769027.html
cert-portal.siemens.com/productcert/html/ssa-082556.html
cert-portal.siemens.com/productcert/html/ssa-019113.html
cert-portal.siemens.com/productcert/html/ssa-457936.html
nvd.nist.gov/vuln/detail/CVE-2023-51384
github.com/advisories/GHSA-44xq-r8h3-q4q6
security.alpinelinux.org/vuln/CVE-2023-51384
docs.bell-sw.com/security/cves/CVE-2023-51384
docs.bell-sw.com/security/advisories/BELL-SA-2023-11
github.com/CVEProject/cvelistV5/tree/main/cves/2023/51xxx/CVE-2023-51384.json
security-tracker.debian.org/tracker/CVE-2023-51384
advisories.mageia.org/MGASA-2024-0010.html
bugs.mageia.org/show_bug.cgi?id=32704
ubuntu.com/security/notices/USN-6565-1
openwall.com/lists/oss-security/2023/12/18/3
openwall.com/lists/oss-security/2023/12/19/5
openwall.com/lists/oss-security/2023/12/20/3
bugs.mageia.org/show_bug.cgi?id=31001
openwall.com/lists/oss-security/2023/07/19/8
openwall.com/lists/oss-security/2023/07/19/9
openssh.com/txt/release-9.3p2
ubuntu.com/security/CVE-2023-51384
cve.org/CVERecord?id=CVE-2023-51384
ubuntu.com/security/CVE-2021-41617
ubuntu.com/security/CVE-2023-51385