Appsecure logo

CVE-2023-38408: Critical Vulnerability in OpenSSH

CVE-2023-38408 is a critical vulnerability in OpenSSH affecting versions before 9.3p2. It allows remote code execution due to an insufficiently trustworthy search path. Immediate action is required to mitigate risks.

CRITICALPublic ExploitCVSS 9.8 · Published July 20, 2023

Not a customer? See how AppSecure simulates real world attacks to protect your infrastructure.

Speak to Experts

CVE-2023-38408 is a critical vulnerability affecting OpenSSH versions prior to 9.3p2. The vulnerability exists within the PKCS#11 feature in ssh-agent, which has an insufficiently trustworthy search path. This flaw allows remote code execution if an agent is forwarded to a system controlled by an attacker. Specifically, code in /usr/lib may not be safe for loading into ssh-agent. The issue stems from an incomplete fix for CVE-2016-10009.

With a CVSS score of 9.8, classified as critical, this vulnerability poses significant risks to organizations. The attack vector is network-based, requiring no privileges or user interaction, making it particularly dangerous. Organizations utilizing affected versions of OpenSSH should prioritize immediate remediation to mitigate the risk of exploitation.

Currently, there is evidence suggesting that exploits for this vulnerability are known, heightening the urgency for organizations to apply patches promptly. The potential impact includes significant confidentiality, integrity, and availability risks.

Organizations should prioritize patching immediately. The urgency for defenders is clear given the critical nature of this vulnerability and its capacity for exploitation.

Vulnerability Details

The PKCS#11 feature in ssh-agent in OpenSSH versions prior to 9.3p2 is vulnerable due to an insufficiently trustworthy search path. This flaw leads to remote code execution when the agent is forwarded to a malicious system. The CVSS score of 9.8 underscores the severity of this vulnerability, indicating a critical threat level. The vulnerability is classified under CWE-428.

Technical Analysis

The root cause of CVE-2023-38408 lies in the insufficient validation of paths used by the ssh-agent when loading PKCS#11 libraries. The attack vector is network-based, with low complexity, requiring no privileges or user interaction. This vulnerability affects confidentiality, integrity, and availability, with high impacts across the board.

Risk & Impact Analysis

The real-world deployment risk of CVE-2023-38408 is significant, particularly for organizations using vulnerable OpenSSH versions. The blast radius is extensive as attackers may exploit this vulnerability to execute arbitrary code on targeted systems. Organizations should evaluate their exposure and prioritize remediation based on the critical CVSS score.

Given the vulnerability's high-impact potential and current exploitation landscape, organizations must act swiftly. The urgency is critical, emphasizing the necessity for immediate patching.

Exploitation Status

Signal

Status

Known Exploit

Yes

Public PoC

Yes

Actively Exploited

No

Ransomware Use

No

Affected Versions

The affected versions of OpenSSH include all versions prior to 9.3, as well as specific versions such as 9.3p1. Organizations using Fedora 37 and 38 are also at risk. Immediate action is required to secure these systems.

Mitigation & Remediation

Organizations should prioritize patching immediately. Upgrade OpenSSH to version 9.3p2 or later to mitigate the vulnerability. For those unable to apply the patch right away, temporary workarounds include restricting the use of ssh-agent forwarding or implementing stringent network controls to limit exposure. Continuous security testing will help identify any lingering issues.

Detection Guidance

To monitor for exploitation attempts, organizations should analyze logs for unusual ssh-agent activity. Behavioral anomalies such as unexpected agent forwarding requests may indicate attempts to exploit this vulnerability. Network signatures that show abnormal patterns related to SSH traffic should also be investigated.

AppSecure Threat Intelligence Insight

CVE-2023-38408 represents a critical vulnerability that underscores the importance of secure development practices in open-source software. The insufficient validation of search paths is a common oversight that can lead to significant security risks. Security teams should incorporate lessons learned from this incident into their development and review processes to improve overall security posture.

For more comprehensive security assessments, organizations may consider engaging in penetration testing to validate their defenses against similar vulnerabilities.

Lastly, organizations are encouraged to stay informed on emerging vulnerabilities and trends in the threat landscape to ensure proactive security measures are in place.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Latest CVEs. Recently published vulnerabilities from the NVD database.

View all vulnerabilities
CVE IDSeverity
CVE-2025-65418HIGH
CVE-2025-65417MEDIUM
CVE-2025-65416MEDIUM
CVE-2025-65415MEDIUM
CVE-2025-61314HIGH

Protect Your Business with Hacker-Focused Approach.