Incomplete Application of Destination Constraints in OpenSSH

openssh Updated 02 Oct 2025

Summary

18/12/2023
N/A
Yes i
Medium
5.5

CVE-2023-51384: In ssh-agent in OpenSSH before 9.6, certain destination constraints can be incompletely applied. Affects openssh across 2 version ranges.

< 9.0_p1-r5 < 881d9c6af9da4257c69c327c4e2f1508b2fa754b

Fixed in 9.0_p1-r5. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

OpenSSH is an open-source suite of secure networking utilities that provides secure remote login, file transfer, and tunneling capabilities. It is widely used in various operating systems and provides encrypted communication channels over unsecured networks. The vulnerability (CVE-2023-51384) affects OpenSSH versions before 9.6 and involves the incomplete application of destination constraints when adding PKCS#11-hosted private keys.

Vulnerability Detail

The vulnerability arises when destination constraints are specified during the addition of PKCS#11-hosted private keys in ssh-agent. These constraints are only applied to the first key, even if a PKCS#11 token returns multiple keys. This incomplete application of destination constraints can lead to unauthorized access to private keys by an attacker. The impact of this vulnerability can result in the compromise of sensitive information and unauthorized access to systems.

How To Fix

Minimum fixed version

9.0_p1-r5

This is the first release that contains the fix.

sudo apk add --upgrade openssh

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can manually add each PKCS#11-hosted private key separately, ensuring that the destination constraints are correctly applied to each key. However, this workaround can be cumbersome and error-prone, so it is strongly advised to apply the official fix by updating OpenSSH.

Conclusion

The incomplete application of destination constraints in OpenSSH can lead to unauthorized access to private keys and potential compromise of sensitive information. It is crucial to update OpenSSH to version 9.6 or later to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for openssh →

Share this vulnerability

FAQ

OpenSSH is an open-source suite of secure networking utilities that provides secure remote login, file transfer, and tunneling capabilities.

PKCS#11 is a standard interface for cryptographic tokens, such as smart cards and hardware security modules, to perform cryptographic operations.

The vulnerability occurs due to the incomplete application of destination constraints when adding PKCS#11-hosted private keys in ssh-agent.

The vulnerability can lead to unauthorized access to private keys, potentially resulting in the compromise of sensitive information and unauthorized access to systems.

To fix this vulnerability, update OpenSSH to version 9.6 or later, which includes the necessary patches to address the incomplete application of destination constraints.

Related vulnerabilities

Recent vulnerabilities recorded for openssh.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

9.0_p1-r5

This is the first release that contains the fix.

sudo apk add --upgrade openssh

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback