Understanding OpenSSH’s Agent Forwarding CVE-2023-38408: A Comprehensive Guide

OpenSSH Vulnerability, CVE-2023-38408, SSH Agent Forwarding, OpenSSH's Agent Forwarding CVE-2023-38408, OpenSSH 9.3p2, PKCS#11 providers, ClamAV, Malwarebytes, Avast, Phoenix Security Vulnerability Management, Phoenix Security Asset Management, Mitigating OpenSSH Vulnerability, Securing OpenSSH, OpenSSH Upgrade, System Scans, Cybersecurity, Network Security


OpenSSH Vulnerability, CVE-2023-38408, SSH Agent Forwarding, OpenSSH's Agent Forwarding CVE-2023-38408, OpenSSH 9.3p2, PKCS#11 providers, ClamAV, Malwarebytes, Avast, Phoenix Security Vulnerability Management, Phoenix Security Asset Management, Mitigating OpenSSH Vulnerability, Securing OpenSSH, OpenSSH Upgrade, System Scans, Cybersecurity, Network Security

OpenSSH, a widely used suite of networking software, has recently been the subject of security discussions due to a discovered vulnerability. The vulnerability, known as CVE-2023-38408, lies in OpenSSH’s forwarded ssh-agent and can potentially allow a remote attacker to execute arbitrary commands. This article aims to provide an in-depth understanding of this vulnerability, its potential impact, and how to mitigate its risks.

Note: this is a Client-side (SSH Agent), not a server issue. The vulnerability might, later on, affect the server side. Moreover, the exploitation being remote would still require interaction client-server

Credit to Daniel C

About OpenSSH’s Agent Forwarding

SSH agent forwarding is a feature of SSH that uses the ssh-agent program to hold private keys for public key authentication. This reduces the need for regular passphrase input, making it instrumental in automation scripts or tasks requiring frequent server connections. The ssh-agent operates by storing keys in memory and unloading only when the process ends. The connections to ssh-agent may be forwarded from further remote to avoid the need for authentication data to be stored on other machines. Despite its benefits, it’s crucial to secure the keys with robust passphrases.

The OpenSSH Vulnerability CVE-2023-38408

The OpenSSH vulnerability, CVE-2023-38408, is a remote code execution vulnerability in OpenSSH’s forwarded ssh-agent. This vulnerability can allow a remote attacker to execute arbitrary commands on a system (client) running a vulnerable version of OpenSSH’s forwarded ssh-agent. The vulnerability was independently verified and a proof-of-concept exploit was developed on installations of Ubuntu Desktop 22.04 and 21.10. Other Linux distributions are likely vulnerable and probably exploitable.

The Impact of OpenSSH Vulnerability CVE-2023-38408 t

Successful exploitation of this vulnerability allows a remote attacker to execute arbitrary commands on vulnerable OpenSSH forwarded ssh-agent. This poses a significant security risk, especially considering the widespread use of OpenSSH. For a broader context on the importance of addressing such vulnerabilities, consider the recent critical RCE vulnerability in Citrix, as discussed in this article.

How to Migrate the OpenSSH Vulnerability CVE-2023-38408

Upon confirmation of the vulnerability, Qualys engaged in responsible vulnerability disclosure and coordinated with the vendor, OpenSSH, to announce the vulnerability. The disclosure timeline was swift, with the initial advisory sent to OpenSSH on July 6, 2023, and the coordinated release of the patch on July 19, 2023. Security teams must apply patches for this vulnerability promptly to prevent potential exploitation

What is the exploitation of CVE-2023-38408 In the wild

The vulnerability is relatively new, and there is currently no evidence of exploitation in the wild, or exploit at scale. Hence the EPSS score is in line; nonetheless due to the nature of remote, please consider urgently patching systems that are externally facing

Graynoise, OpenSSH Vulnerability, CVE-2023-38408, SSH Agent Forwarding, OpenSSH's Agent Forwarding CVE-2023-38408, OpenSSH 9.3p2, PKCS#11 providers, ClamAV, Malwarebytes, Avast, Phoenix Security Vulnerability Management, Phoenix Security Asset Management, Mitigating OpenSSH Vulnerability, Securing OpenSSH, OpenSSH Upgrade, System Scans, Cybersecurity, Network Security

Exploitation with SSH brute-forcing is a common technique adopted so it won’t be short before an attacker will try to weaponize this vulnerability

What is the exploitation data behind CVE-2023-38408 In the wild

CVSS: 4.5 (temp) 

CTI interest: 6.11 (mdeium/high)

RCE Type Remote: Yes

Availability: Yes

Status: Proof-of-Concept

EPSS Score: 0.00169

EPSS Percentile: 0.53066

The number of systems with Open SSH agents are around 46K nonetheless the version has not been verified

OpenSSH Vulnerability, CVE-2023-38408, SSH Agent Forwarding, OpenSSH's Agent Forwarding CVE-2023-38408, OpenSSH 9.3p2, PKCS#11 providers, ClamAV, Malwarebytes, Avast, Phoenix Security Vulnerability Management, Phoenix Security Asset Management, Mitigating OpenSSH Vulnerability, Securing OpenSSH, OpenSSH Upgrade, System Scans, Cybersecurity, Network Security

How to Fix CVE-2023-38408

  1. While the discovery of CVE-2023-38408 in OpenSSH’s Agent Forwarding is concerning, preventive measures are available to avoid exploitation. If you suspect your system may have been compromised, scanning it for malicious code using tools such as ClamAV, Malwarebytes, or Avast is crucial.
  2. To effectively address and safeguard against CVE-2023-38408, follow these comprehensive steps:
  3. Upgrade to OpenSSH 9.3p2 or later
  4. Upgrading to the latest version of OpenSSH is crucial as it includes critical patches to mitigate the vulnerability. Ensure that all relevant systems and servers are promptly updated to the recommended version or a higher one.
  5. Restrict PKCS#11 providers
  6. Configure OpenSSH to allow only specific and trusted PKCS#11 providers. By limiting the use of PKCS#11 providers to known and verified sources, you can reduce the potential attack surface and minimize the risk of exploitation.
  7. Exercise caution when forwarding SSH agent
  8. Be cautious when using agent forwarding in SSH. Avoid forwarding your SSH agent to untrusted servers or environments. Evaluate the security implications and only enable agent forwarding when necessary, considering the potential risks associated with CVE-2023-38408.
  9. Conduct system scans
  10. Regularly scan your systems using reputable antivirus and malware detection tools like ClamAV, Malwarebytes, or Avast. These scans help identify and mitigate potential threats or any malicious code that may have already affected your system.
  11. By following these steps, you can effectively mitigate the risks associated with CVE-2023-38408 and ensure the security of your OpenSSH environment. However, it’s important to remember that these measures are part of a larger security strategy. Regular system updates, continuous monitoring, and the use of comprehensive security solutions like Phoenix Security’s Vulnerability Management and Asset Management tools are crucial in maintaining a robust and secure digital infrastructure.

Twitter and other useful resources to fix CVE-2023-38408

How Phoenix Can Help

To manage and prevent such vulnerabilities, comprehensive security solutions are essential. Phoenix Security offers tools such as Vulnerability Management and Asset Management to help organisations quickly act on vulnerabilities like OpenSSH’s CVE-2023-38408.

Phoenix’s Vulnerability Management tool can help identify and prioritize vulnerabilities, providing a clear roadmap for remediation. It can help organizations understand the severity of vulnerabilities like CVE-2023-38408 and prioritize their remediation efforts accordingly.

The Asset Management tool, on the other hand, provides a comprehensive view of all assets in an organization’s network. This can help organizations understand which assets are vulnerable to CVE-2023-38408 and need immediate patching.

Conclusion

The discovery of the OpenSSH’s Agent Forwarding CVE-2023-38408 vulnerability underscores the continuous need for rigorous security measures and immediate response. Even robust systems like OpenSSH can harbor hidden vulnerabilities. Proactively rectifying such vulnerabilities through actions such as implementing patches and using comprehensive security solutions like those offered by Phoenix Security is critical to maintaining the integrity of digital assets.

Get in control of your Application Security posture and Vulnerability management

Previous Issues of Vulnerability Weekly




Francesco is an internationally renowned public speaker, with multiple interviews in high-profile publications (eg. Forbes), and an author of numerous books and articles, who utilises his platform to evangelize the importance of Cloud security and cutting-edge technologies on a global scale.

Discuss this blog with our community on Slack

Join our AppSec Phoenix community on Slack to discuss this blog and other news with our professional security team

From our Blog

Learn how to predict ransomware risks and vulnerability exploitation using a threat-centric approach. Explore data-driven insights, verified exploit trends, and methods for assessing the likelihood of attacks with key references to CISA KEV, EPSS, and Phoenix Security’s 4D Risk Formula.
Francesco Cipollone
Remote Code Execution flaws continue to undermine Kubernetes ingress integrity. IngressNightmare (CVE-2025-1097, CVE-2025-1098, CVE-2025-24514, CVE-2025-1974) showcases severe threat vectors in NGINX-based proxies, leading to cluster-wide exposure. ASPM, robust remediation tactics, and strong application security solutions—like Phoenix Security—mitigate these vulnerabilities before ransomware groups exploit them.
Francesco Cipollone
Remote Code Execution flaws continue to undermine Kubernetes ingress integrity. IngressNightmare (CVE-2025-1097, CVE-2025-1098, CVE-2025-24514, CVE-2025-1974) showcases severe threat vectors in NGINX-based proxies, leading to cluster-wide exposure. ASPM, robust remediation tactics, and strong application security solutions—like Phoenix Security—mitigate these vulnerabilities before ransomware groups exploit them.
Francesco Cipollone
The recent Google acquisition of Wiz for $32 billion has sent shockwaves through the cybersecurity industry, particularly in the realm of Application Security Posture Management (ASPM). This monumental deal highlights the critical importance of cloud security and the growing demand for robust ASPM solutions. While the acquisition promises potential benefits for Google Cloud users, it also raises concerns about vendor lock-in and the future of cloud-agnostic security. Explore the implications of this acquisition and discover how neutral ASPM solutions like Phoenix Security can bridge the gap in multi-cloud environments, ensuring continuous, collaborative, and comprehensive security from code to cloud.” – Find Assets/Vulns by Scanner – Detailed findings Location information Risk-based Posture Management – Risk and Risk Magnitude for Assets – Filter assets and vulnerabilities by source scanner Integrations – BurpSuite XML Import – Assessment Import API Other Improvements – Improved multi-selection in filters – New CVSS Score column in Vulnerabilities
Alfonso Eusebio
The team at Phoenix Security pleased to bring you another set of new application security (ASPM) features and improvements for vulnerability management across application and cloud security engines. This release builds on top of previous releases with key additions and progress across multiple areas of the platform. Application Security Posture Management (ASPM) Enhancements • New Weighted Asset Risk Formula – Refined risk aggregation for tailored vulnerability management. • Auto-Approval of Risk Exceptions – Accelerate mitigation by automating security approvals. • Enhanced Risk Explorer & Business Unit Insights – Monitor and analyze risk exposure by business units for better prioritization. Vulnerability & Asset Management • Link Findings to Existing Tickets – Seamless GitHub, ServiceNow, and Azure DevOps integration. • Multi-Finding Ticketing for ADO – Group multiple vulnerabilities in a single ticket for better workflow management. • Filter by Business Unit, CWE, Ownership, and Deployment Environment – Target vulnerabilities with precision using advanced filtering. Cyber Threat Intelligence & Security Enhancements • Cyber Threat Intelligence Premium – Access 128,000+ exploits for better exploitability and fixability metrics. • SBOM, Container SBOM & Open Source Artifact Analysis – Conduct deep security analysis with reachability insights. • Enhanced Lacework Container Management – Fetch and analyze running container details for better security reporting. • REST API Enhancements – Use asset tags for automated deployments and streamline security processes. Other Key Updates • CVE & CWE Columns Added – Compare vulnerabilities more effectively. • Custom Status Management for Findings – Personalize security workflows with custom status configurations. • Impact & Risk Explorer Side Panel – Gain heatmap-based insights into vulnerability distribution and team risk impact. 🚀 Stay ahead of vulnerabilities, optimize risk assessment, and enhance security efficiency with Phoenix Security’s latest features! 🚀
Alfonso Eusebio
Discover CVE-2025-30066 tj-actions/changed-files GitHub Action has been compromised, exposing secrets in CI/CD pipelines and posing a major software supply chain security risk. Attackers injected malicious code into all versions (V1–V45), repointing existing tags to a compromised commit that exfiltrated credentials via GitHub Actions logs. Immediate remediation is required—organizations must scan their repositories, rotate secrets, and replace the action to mitigate risk. Learn how Phoenix Security’s ASPM can automate threat detection and enhance GitHub Actions security.
Francesco Cipollone
Derek

Derek Fisher

Head of product security at a global fintech

Derek Fisher – Head of product security at a global fintech. Speaker, instructor, and author in application security.

Derek is an award winning author of a children’s book series in cybersecurity as well as the author of “The Application Security Handbook.” He is a university instructor at Temple University where he teaches software development security to undergraduate and graduate students. He is a speaker on topics in the cybersecurity space and has led teams, large and small, at organizations in the healthcare and financial industries. He has built and matured information security teams as well as implemented organizational information security strategies to reduce the organizations risk.

Derek got his start in the hardware engineering space where he learned about designing circuits and building assemblies for commercial and military applications. He later pursued a computer science degree in order to advance a career in software development. This is where Derek was introduced to cybersecurity and soon caught the bug. He found a mentor to help him grow in cybersecurity and then pursued a graduate degree in the subject.

Since then Derek has worked in the product security space as an architect and leader. He has led teams to deliver more secure software in organizations from multiple industries. His focus has been to raise the security awareness of the engineering organization while maintaining a practice of secure code development, delivery, and operations.

In his role, Jeevan handles a range of tasks, from architecting security solutions to collaborating with Engineering Leadership to address security vulnerabilities at scale and embed security into the fabric of the organization.

Jeevan Singh

Jeevan Singh

Founder of Manicode Security

Jeevan Singh is the Director of Security Engineering at Rippling, with a background spanning various Engineering and Security leadership roles over the course of his career. He’s dedicated to the integration of security practices into software development, working to create a security-aware culture within organizations and imparting security best practices to the team.
In his role, Jeevan handles a range of tasks, from architecting security solutions to collaborating with Engineering Leadership to address security vulnerabilities at scale and embed security into the fabric of the organization.

James

James Berthoty

Founder of Latio Tech

James Berthoty has over ten years of experience across product and security domains. He founded Latio Tech to help companies find the right security tools for their needs without vendor bias.

christophe

Christophe Parisel

Senior Cloud Security Architect

Senior Cloud Security Architect

Chris

Chris Romeo

Co-Founder
Security Journey

Chris Romeo is a leading voice and thinker in application security, threat modeling, and security champions and the CEO of Devici and General Partner at Kerr Ventures. Chris hosts the award-winning “Application Security Podcast,” “The Security Table,” and “The Threat Modeling Podcast” and is a highly rated industry speaker and trainer, featured at the RSA Conference, the AppSec Village @ DefCon, OWASP Global AppSec, ISC2 Security Congress, InfoSec World and All Day DevOps. Chris founded Security Journey, a security education company, leading to an exit in 2022. Chris was the Chief Security Advocate at Cisco, spreading security knowledge through education and champion programs. Chris has twenty-six years of security experience, holding positions across the gamut, including application security, security engineering, incident response, and various Executive roles. Chris holds the CISSP and CSSLP certifications.

jim

Jim Manico

Founder of Manicode Security

Jim Manico is the founder of Manicode Security, where he trains software developers on secure coding and security engineering. Jim is also the founder of Brakeman Security, Inc. and an investor/advisor for Signal Sciences. He is the author of Iron-Clad Java: Building Secure Web Applications (McGraw-Hill), a frequent speaker on secure software practices, and a member of the JavaOne Rockstar speaker community. Jim is also a volunteer for and former board member of the OWASP foundation.

Join our Mailing list!

Get all the latest news, exclusive deals, and feature updates.

The IKIGAI concept
x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
ShieldPRO