CVE-2023-38408: Remote Code Execution in OpenSSH ssh-agent PKCS#11 Support
- Vendors
- Fedora ProjectOpenbsd
OpenSSH before 9.3p2 contains an insufficiently trustworthy library search path in ssh-agent's PKCS#11 support. An attacker with access to a forwarded agent socket can cause specific libraries present on the system running the agent to be loaded and abused for arbitrary code execution on that system. Libraries permitted by the default provider allowlist are not necessarily safe to load. The vulnerability results from an incomplete fix for CVE-2016-10009 and affects the client-side agent rather than constituting a standalone remote vulnerability in sshd.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation permits arbitrary code execution on the machine running ssh-agent with the privileges of the agent process, typically those of the affected user. This can compromise that user's accessible data and resources, permit data modification, and disrupt processes. Merely exposing an SSH server does not establish exploitability; the vulnerable agent must be reachable through forwarding and suitable libraries must be present.
Mitigation
If you can’t patch tonight, do this now.
Disable agent forwarding or avoid forwarding agents to untrusted systems. Alternatively, start ssh-agent with an empty PKCS#11/FIDO provider allowlist using ssh-agent -P '', or restrict the allowlist to explicitly trusted, necessary provider libraries. The remote-provider restriction introduced in OpenSSH 9.3p2 depends on the SSH client identifying forwarded requests; alternative socket-forwarding tools may circumvent that identification.
Remediation
Patch, then assume compromise.
Upgrade OpenSSH to 9.3p2 or later, or install a vendor package containing the complete backported fix. Restart affected agents and SSH sessions using agent forwarding after updating. OpenSSH 9.3p2 blocks remote clients from loading PKCS#11 modules by default; do not restore the previous behavior with -Oallow-remote-pkcs11. For RHEL 8, RHSA-2026:69266 supplies OpenSSH 8.0p1-33.el8_10 to correct an incomplete backport; Rocky Linux provides the corresponding correction through RLSA-2026:69266. For affected Moxa EDS and RKS switches, obtain the vendor patches and upgrade to firmware 4.1.58 and 5.0.4, respectively.
Exploits
3 exploits validated by Mallory's analysis. Hidden: 6 rejected by Mallory's analysis as not a working exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2023-38408 exploited in the wild?
- As of Nov 6, 2026, Mallory has no reports of CVE-2023-38408 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2023-38408?
- Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2023-38408, the earliest disclosed Aug 9, 2023.
- Is there a patch for CVE-2023-38408?
- Upgrade OpenSSH to 9.3p2 or later, or install a vendor package containing the complete backported fix. Restart affected agents and SSH sessions using agent forwarding after updating.
- What products are affected by CVE-2023-38408?
- Openbsd Openssh and Fedora Project Fedora.
- How severe is CVE-2023-38408?
- CVE-2023-38408 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 79.7% (100th percentile) as of Nov 6, 2026.
Recent activity
30 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.