CVE-2023-38408

CRITICAL EXPLOITED

OpenSSH < 9.3p2 - Remote Code Execution via PKCS#11 Untrusted Search Path

Title source: llm
STIX 2.1

Exploitation Summary

CVE-2023-38408 has been observed exploited in the wild (reported by VulnCheck KEV). EIP tracks 11 public exploits from researchers including kali-mx, LucasPDiniz, Adel2411.

AI-analyzed exploit summary This repository contains a functional exploit script for CVE-2023-38408, targeting OpenSSH versions before 9.3p2. The script automates the exploitation process by leveraging ssh-agent forwarding to achieve remote code execution via shellcode injection.

Description

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. (Code in /usr/lib is not necessarily safe for loading into ssh-agent.) NOTE: this issue exists because of an incomplete fix for CVE-2016-10009.

Exploits (11)

nomisec WORKING POC 48 stars
by kali-mx · remote
https://github.com/kali-mx/CVE-2023-38408

This repository contains a functional exploit script for CVE-2023-38408, targeting OpenSSH versions before 9.3p2. The script automates the exploitation process by leveraging ssh-agent forwarding to achieve remote code execution via shellcode injection.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenSSH < 9.3p2
Auth required
Prerequisites: Access to a vulnerable OpenSSH server with ssh-agent forwarding enabled · Valid credentials for SSH login
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 39 stars
by LucasPDiniz · remote
https://github.com/LucasPDiniz/CVE-2023-38408

This repository provides a functional proof-of-concept exploit for CVE-2023-38408, demonstrating how an attacker can leverage OpenSSH's PKCS#11 feature to achieve remote code execution by injecting shellcode into the ssh-agent process via a forwarded agent socket.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenSSH (before 9.3p2)
Auth required
Prerequisites: SSH agent forwarding enabled · Attacker control of the forwarded agent socket · Write access to the client filesystem
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WRITEUP 4 stars
by Adel2411 · poc
https://github.com/Adel2411/cve-2023-38408

This repository provides a detailed technical analysis of CVE-2023-38408, a vulnerability in OpenSSH's ssh-agent that allows remote code execution via malicious PKCS#11 provider loading. It includes background concepts, attack flow analysis, and mitigation strategies.

Classification
Writeup 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenSSH < 9.3p2
No auth needed
Prerequisites: Agent forwarding enabled · PKCS#11 support in ssh-agent
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec SCANNER 4 stars
by TX-One · client-side
https://github.com/TX-One/CVE-2023-38408

The repository contains a scanner for CVE-2023-38408, which checks OpenSSH versions for vulnerability by parsing SSH banners. It does not include functional exploit code but provides detailed technical analysis and steps for exploitation.

Classification
Scanner 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenSSH (before 9.3p2)
No auth needed
Prerequisites: SSH agent forwarding enabled · Ability to write to the client filesystem
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 2 stars
by classic130 · poc
https://github.com/classic130/CVE-2023-38408

This repository contains a functional exploit for CVE-2023-38408, a remote code execution vulnerability in OpenSSH's forwarded ssh-agent. The exploit is structured in multiple steps, including shell scripts and C programs, to achieve RCE by manipulating the ssh-agent.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Complex
Reliability
Reliable
Target: OpenSSH (forwarded ssh-agent)
Auth required
Prerequisites: Access to a vulnerable OpenSSH instance with forwarded ssh-agent · Ability to execute scripts and compile C code on the target system
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 1 stars
by mrtacojr · poc
https://github.com/mrtacojr/CVE-2023-38408

This script automates the installation of a vulnerable version of OpenSSH (9.6p1) to demonstrate CVE-2023-38408. It removes existing OpenSSH packages, compiles and installs the vulnerable version, and configures the service to run.

Classification
Working Poc 90%
Attack Type
Other
Complexity
Moderate
Reliability
Reliable
Target: OpenSSH 9.6p1
No auth needed
Prerequisites: sudo/root access · Ubuntu-based system · internet access for downloads
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec SUSPICIOUS
by nonosticisiguzo-command · poc
https://github.com/nonosticisiguzo-command/nmap-scan-results

The repository contains no actual exploit code or technical details, only a vague reference to CVE-2023-38408 and a link to an external 'Full Report'. This is characteristic of a social engineering lure.

Classification
Suspicious 95%
Attack Type
Other
Complexity
Theoretical
Reliability
Theoretical
Target: unspecified
No auth needed
devstral-2 · analyzed Apr 13, 2026 Full analysis →
nomisec WRITEUP
by jakovtodorovic · poc
https://github.com/jakovtodorovic/openSSH-agent-forwarding-vulnerability-analysis-CVE-2023-38408

This repository provides a detailed technical analysis of CVE-2023-38408, an OpenSSH vulnerability related to SSH agent forwarding that allows remote code execution on the client. It includes root cause analysis, exploitation scenarios, patch behavior, and mitigation strategies.

Classification
Writeup 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenSSH (before 9.3p2)
No auth needed
Prerequisites: Agent forwarding enabled · Vulnerable OpenSSH version · User connects to attacker-controlled or compromised host
devstral-2 · analyzed Feb 19, 2026 Full analysis →
nomisec WORKING POC
by xitexploiter96-dot · remote-auth
https://github.com/xitexploiter96-dot/CVE-2023-38408

This script exploits CVE-2023-38408 by injecting an SSH key into the authorized_keys file, setting up an SSH agent socket, and executing shellcode via a bind shell. It requires interaction with a target system to establish a reverse connection.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Unknown (likely a Linux-based system with SSH and specific libraries)
Auth required
Prerequisites: SSH access to the target system · Ability to modify authorized_keys · Specific libraries present on the target system
devstral-2 · analyzed Feb 19, 2026 Full analysis →
nomisec STUB
by wxrdnx · poc
https://github.com/wxrdnx/CVE-2023-38408

The repository contains only a README file with minimal information, referencing a presentation slide and source code for a CS-782 attack presentation. No actual exploit code or technical details are provided.

Classification
Stub 90%
Attack Type
Other
Complexity
Theoretical
Reliability
Theoretical
Target: unspecified
No auth needed
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec SCANNER
by fazilbaig1 · poc
https://github.com/fazilbaig1/cve_2023_38408_scanner

This repository contains a Python-based scanner for CVE-2023-38408, which checks if an OpenSSH server is running a vulnerable version (< 9.3p2) by parsing the SSH banner. It does not exploit the vulnerability but detects it via version checking.

Classification
Scanner 100%
Attack Type
Info Leak
Complexity
Trivial
Reliability
Reliable
Target: OpenSSH < 9.3p2
No auth needed
Prerequisites: Network access to the target SSH port (default: 22)
devstral-2 · analyzed Feb 18, 2026 Full analysis →

References (20)

Core 20
Core References
Third Party Advisory vendor-advisory
https://security.gentoo.org/glsa/202307-01
Exploit, Mailing List, Third Party Advisory mailing-list
http://www.openwall.com/lists/oss-security/2023/07/20/1
Mailing List, Third Party Advisory mailing-list
http://www.openwall.com/lists/oss-security/2023/07/20/2

Scores

CVSS v3 9.8
EPSS 0.7677
EPSS Percentile 99.5%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation none
Automatable yes
Technical Impact total

Details

VulnCheck KEV 2023-07-26
CWE
CWE-428
Status published
Products (4)
fedoraproject/fedora 37
fedoraproject/fedora 38
openbsd/openssh 9.3 (2 CPE variants)
openbsd/openssh < 9.3
Published Jul 20, 2023
Tracked Since Feb 18, 2026