Don’t let overlooked obligations become incidents. Learn how.
Utility navigation bar redirect icon
Portal LoginSupportContact
Search
Close search
Huntress Logo in Teal
  • Platform Overview
    Managed EDR

    Get full endpoint visibility, detection, and response.

    Managed EDR

    Get full endpoint visibility, detection, and response.

    Managed ITDR

    Protect your Microsoft 365 and Google Workspace identities and email environments.

    Managed ITDR

    Protect your Microsoft 365 and Google Workspace identities and email environments.

    Managed SIEM

    Managed threat response and robust compliance support at a predictable price.

    Managed SIEM

    Managed threat response and robust compliance support at a predictable price.

    Managed Security Awareness Training

    Empower your teams with science-backed security awareness training.

    Managed Security Awareness Training

    Empower your teams with science-backed security awareness training.

    Managed ISPM

    Continuous Microsoft 365 and identity hardening, managed and enforced by Huntress experts.

    Managed ISPM

    Continuous Microsoft 365 and identity hardening, managed and enforced by Huntress experts.

    Managed ESPM

    Proactively secure endpoints against attacks.

    Managed ESPM

    Proactively secure endpoints against attacks.

    Integrations
    Integrations
    Support Documentation
    Support Documentation
    See Huntress in Action

    Quickly deploy and manage real-time protection for endpoints, email, and employees - all from a single dashboard.

    Huntress Cybersecurity
    See Huntress in Action

    Quickly deploy and manage real-time protection for endpoints, email, and employees - all from a single dashboard.

    Huntress Cybersecurity
  • Threats We Stop
    Phishing
    Phishing
    Business Email Compromise
    Business Email Compromise
    Ransomware
    Ransomware
    Infostealers
    Infostealers
    View Allright arrowView Allright arrow
    Industries We Serve
    Education
    Education
    Financial Services
    Financial Services
    State and Local Government
    State and Local Government
    Healthcare
    Healthcare
    Law Firms
    Law Firms
    Manufacturing
    Manufacturing
    Utilities
    Utilities
    View Allright arrowView Allright arrow
    Tailored Solutions
    MSPs
    MSPs
    Resellers
    Resellers
    SMBs
    SMBs
    Compliance
    Compliance
    What Gets Overlooked Gets Exploited

    Most days, nothing happens. But one day, something will.

    Huntress Cybersecurity
    Cybercriminals Have Evolved

    Get the intel on today’s cybercriminal groups and learn how to protect yourself.

    Huntress Cybersecurity
  • Pricing
  • Community Series
    The Product Lab

    Shape the next big thing in cybersecurity together.

    The Product Lab

    Shape the next big thing in cybersecurity together.

    Fireside Chat

    Real people. Real perspectives. Better conversations.

    Fireside Chat

    Real people. Real perspectives. Better conversations.

    Tradecraft Tuesday

    No products, no pitches – just tradecraft.

    Tradecraft Tuesday

    No products, no pitches – just tradecraft.

    _declassified

    Exposing hidden truths in the world of cybersecurity.

    _declassified

    Exposing hidden truths in the world of cybersecurity.

    Resources
    Upcoming Events
    Upcoming Events
    Ebooks
    Ebooks
    On-Demand Webinars
    On-Demand Webinars
    Videos
    Videos
    Whitepapers
    Whitepapers
    Datasheets
    Datasheets
    Cybersecurity Education
    Cybersecurity 101
    Cybersecurity 101
    Cybersecurity Guides
    Cybersecurity Guides
    Threat Library
    Threat Library
    Real Tradecraft, Real Results
    Real Tradecraft, Real Results
    2026 Cyber Threat Report
    2026 Cyber Threat Report
    The Huntress Blog
    Huntress Lands on the Microsoft Marketplace
    Huntress Cybersecurity
    Huntress Lands on the Microsoft Marketplace
    Huntress Cybersecurity
    How Huntress & DEFCERT Are Streamlining CMMC Assessment Prep
    Huntress Cybersecurity
    How Huntress & DEFCERT Are Streamlining CMMC Assessment Prep
    Huntress Cybersecurity
    Live Hacking Into Microsoft 365 with Kyle Hanslovan
    Huntress Cybersecurity
    Live Hacking Into Microsoft 365 with Kyle Hanslovan
    Huntress Cybersecurity
  • Why Huntress

    Go beyond AI in the fight against today’s hackers with Huntress Managed EDR purpose-built for your needs

    Huntress Cybersecurity
    Why Huntress

    Go beyond AI in the fight against today’s hackers with Huntress Managed EDR purpose-built for your needs

    Huntress Cybersecurity
    The Huntress SOC

    24/7 Security Operations Center

    The Huntress SOC

    24/7 Security Operations Center

    Reviews

    Why businesses of all sizes trust Huntress to defend their assets

    Reviews

    Why businesses of all sizes trust Huntress to defend their assets

    Case Studies

    Learn directly from our partners how Huntress has helped them

    Case Studies

    Learn directly from our partners how Huntress has helped them

    Community

    Get in touch with the Huntress Community team

    Community

    Get in touch with the Huntress Community team

    Compare Huntress
    Bitdefender
    Bitdefender
    Blackpoint
    Blackpoint
    Breach Secure Now!
    Breach Secure Now!
    Crowdstrike
    Crowdstrike
    Datto
    Datto
    SentinelOne
    SentinelOne
    Sophos
    Sophos
    Compare Allright arrowCompare Allright arrow
  • HUNTRESS HUB

    Login to access top-notch marketing resources, tools, and training.

    Huntress Cybersecurity
    HUNTRESS HUB

    Login to access top-notch marketing resources, tools, and training.

    Huntress Cybersecurity
    Partners
    MSPs

    Join our partner community to deliver expert-led managed security.

    MSPs

    Join our partner community to deliver expert-led managed security.

    Resellers

    Partner program designed to grow your cybersecurity business.

    Resellers

    Partner program designed to grow your cybersecurity business.

    Tech Alliances

    Driving innovation through global technology Partnerships

    Tech Alliances

    Driving innovation through global technology Partnerships

    Microsoft Partnership

    A Level-Up for Your Business Security

    Microsoft Partnership

    A Level-Up for Your Business Security

  • Press Release
    Huntress Announces Collaboration with Microsoft to Strengthen Cybersecurity for Businesses of All Sizes
    Huntress Cybersecurity
    Press Release
    Huntress Announces Collaboration with Microsoft to Strengthen Cybersecurity for Businesses of All Sizes
    Huntress Cybersecurity
    Our Story

    We're on a mission to shatter the barriers to enterprise-level security.

    Our Story

    We're on a mission to shatter the barriers to enterprise-level security.

    Newsroom

    Explore press releases, news articles, media interviews and more.

    Newsroom

    Explore press releases, news articles, media interviews and more.

    Meet the Team

    Founded by former NSA Cyber Operators. Backed by security researchers.

    Meet the Team

    Founded by former NSA Cyber Operators. Backed by security researchers.

    Careers

    Ready to shake up the cybersecurity world? Join the hunt.

    Careers

    Ready to shake up the cybersecurity world? Join the hunt.

    Awards
    Awards
    Contact Us
    Contact Us
  • Portal Login
  • Support
  • Contact
  • Search
  • Get a Demo
  • Start for Free
Portal LoginSupportContact
Search
Close search
Get a Demo
Start for Free
HomeThreat LibraryVulnerabilities
CVE-2024-6387

CVE-2024-6387 Vulnerability

Published: 11/07/2025

Written by: Monica Burgess

Glitch effectGlitch effect

CVE-2024-6387, also known as "Regresshion," is a critical remote code execution (RCE) vulnerability affecting specific versions of OpenSSH, the widely used tool for secure remote login. This flaw allows an unauthenticated attacker to execute arbitrary commands on a vulnerable server, potentially leading to a complete system compromise. Time to check those SSH versions.

What is CVE-2024-6387 Vulnerability?

The CVE-2024-6387 vulnerability is a critical remote code execution flaw discovered in OpenSSH server (sshd). The issue stems from a regression introduced in OpenSSH version 9.7, which mishandles shell metacharacters in usernames during the login process. An unauthenticated attacker can exploit this by crafting a special username, tricking the server into executing malicious commands with the privileges of the sshd user, which is typically root. Its high severity score (CVSS 10.0) underscores the urgent need for a CVE-2024-6387 patch.

When was it Discovered?

The CVE-2024-6387 vulnerability was publicly disclosed on July 1, 2024. It was discovered by security researcher Enguerran Gillier, who reported it to the OpenSSH project. The flaw was the result of a code change made to fix a previous, less severe vulnerability (CVE-2023-51385), accidentally creating this far more dangerous one. This highlights how even well-intentioned fixes can sometimes introduce new security risks.

Affected Products & Versions

The CVE-2024-6387 exploit specifically targets a narrow but widely deployed range of OpenSSH server versions. If you're running any of these, patching is not optional—it's critical.

Product

Versions Affected

Fixed Versions / Patch Links

OpenSSH Server

9.7p1, 9.8p1

OpenSSH 9.8p2, OpenSSH 9.9p1, or later

Many Linux distributions and other operating systems that bundle OpenSSH were quick to release updates. Always check with your specific OS vendor for the correct patch.

CVE-2024-6387 Technical Description

Let's get into the nitty-gritty. The CVE-2024-6387 vulnerability details reveal an argument injection flaw. In vulnerable versions, OpenSSH incorrectly passes usernames containing shell metacharacters (like backticks ` or $()) to a shell command when logging is configured to use /usr/sbin/sshd-session.

Here’s the breakdown:

  • An attacker attempts to log in with a maliciously crafted username, for example: \command-to-execute``.

  • The vulnerable sshd server takes this username and, without proper sanitization, includes it in a command string that gets executed by /bin/sh.

  • The shell interprets the backticks as a command substitution, executing whatever command-to-execute is.

Because the sshd process often runs with root privileges before dropping to a lower-privileged user, these commands can be executed as root, giving the attacker full control over the system. This makes the CVE-2024-6387 exploitability incredibly high for exposed, unpatched servers.

Tactics, Techniques & Procedures (TTPs)

Attackers exploiting CVE-2024-6387 primarily use the Initial Access tactic from the MITRE ATT&CK framework. They scan the internet for vulnerable OpenSSH servers (T1190 - Exploit Public-Facing Application) and then use a crafted username to gain remote code execution (T1203 - Exploitation for Client Execution, though in this case it’s server-side). Once inside, they may establish persistence, escalate privileges (if not already root), and move laterally across the network.

Indicators of Compromise

Looking for CVE-2024-6387 vulnerability indicators of compromise (IOCs) is key to finding a breach. The most obvious sign is in your system logs. Check auth.log or equivalent system authentication logs for login attempts with bizarre usernames containing shell metacharacters like backticks, dollar signs, or parentheses. Also, monitor for unexpected outbound network connections or new, suspicious processes spawned by the sshd process. Any of these could be a CVE-2024-6387 vulnerability IOC.

Known Proof-of-Concepts & Exploits

It didn't take long for security researchers to cook up a CVE-2024-6387 proof of concept (PoC). Within hours of disclosure, multiple PoCs were released publicly, demonstrating just how easy it is to exploit. These scripts and one-liners allow even low-skilled attackers to scan for and compromise vulnerable systems. Active exploitation was observed in the wild almost immediately, with threat actors using the vulnerability to deploy cryptocurrency miners, botnet agents, and other malware.

How to Detect CVE-2024-6387 Vulnerability?

Effective CVE-2024-6387 vulnerability detection requires a multi-layered approach. Start with authenticated vulnerability scanners to check your OpenSSH versions. For host-based detection, use an Endpoint Detection and Response (EDR) solution like Huntress to monitor for suspicious process creation from sshd. You can also create custom SIEM rules to alert on login attempts with usernames containing shell metacharacters. Sifting through auth.log, secure, or journalctl -u sshd logs for usernames with characters like `, $, (, ) is a great manual check.

Impact & Risk of CVE-2024-6387 Vulnerability

The impact is about as bad as it gets. A successful exploit grants an attacker full remote control over the affected server. This compromises all three pillars of the CIA triad:

  • Confidentiality: Attackers can steal sensitive data, from customer information to intellectual property.

  • Integrity: They can modify or delete files, tamper with system configurations, and plant backdoors.

  • Availability: The server can be taken offline, used in a DDoS attack, or destroyed completely.

For a business, this could mean data breaches, reputational damage, financial loss, and significant operational downtime. It’s a full-blown disaster waiting to happen on any unpatched system.

Mitigation & Remediation Strategies

If you're running an affected version, stop what you're doing and patch. Now. This isn't a "wait and see" situation.

  • Patch Immediately: This is the most effective CVE-2024-6387 vulnerability mitigation. Upgrade to OpenSSH 9.8p2, 9.9p1, or a later version provided by your OS vendor.

  • Apply Workarounds (If Patching Isn't Possible): If you absolutely cannot patch right away, you can mitigate the risk by ensuring the UsePAM option in your sshd_config is set to yes. This changes the code path and is not vulnerable. However, this is a temporary fix—not a substitute for patching.

  • Restrict Access: Limit SSH access to trusted IP addresses using firewalls. While this doesn't fix the vulnerability, it reduces the attack surface by preventing attackers from reaching your SSH port in the first place.

After patching, it's wise to hunt for any signs of compromise that may have occurred before the CVE-2024-6387 patch was applied.

CVE-2024-6387 Vulnerability FAQs

CVE-2024-6387, or "Regresshion," is a critical remote code execution vulnerability in OpenSSH server versions 9.7p1 and 9.8p1. It allows an unauthenticated attacker to run commands on a server by sending a specially crafted username containing shell metacharacters. The server's code improperly processes this username, leading to command execution, often with root privileges.

The exploit doesn't "infect" a system like malware. Instead, an attacker connects to a vulnerable SSH server and uses a username like \malicious-command``. The server mistakenly executes the command within the backticks, giving the attacker initial access and control over the machine without needing a password.

Yes, absolutely. While patches have been available since July 2024, many systems remain unpatched due to slow update cycles or neglect. Threat actors continuously scan the internet for these vulnerable servers, making any unpatched, internet-facing machine a prime target for a CVE-2024-6387 exploit.

The primary and most effective protection is to apply the CVE-2024-6387 patch immediately by upgrading OpenSSH to a fixed version. Organizations should also restrict SSH access to trusted IPs, use EDR solutions for threat detection, and regularly monitor system logs for suspicious login attempts as part of a robust CVE-2024-6387 vulnerability mitigation strategy.

Glitch effectBlurry glitch effect

Protect What Matters

Secure endpoints, email, and employees with the power of our 24/7 SOC. Try Huntress for free and deploy in minutes to start fighting threats.
Try Huntress for Free
Huntress Managed Security PlatformManaged EDRManaged EDR for macOSManaged EDR for LinuxManaged ITDRManaged SIEMManaged Security Awareness TrainingManaged ISPMManaged ESPMBook a Demo
PhishingComplianceBusiness Email CompromiseEducationFinanceHealthcareManufacturingState & Local Government
Managed Service ProvidersResellersIT & Security Teams24/7 SOCCase Studies
BlogResource CenterCybersecurity 101Upcoming EventsSupport Documentation
Our CompanyLeadershipNews & PressCareersContact Us
Huntress white logo

Protecting 215k+ customers like you with enterprise-grade protection.

Privacy PolicyCookie PolicyTerms of UseCookie Consent
Linkedin iconTwitter X iconYouTube iconInstagram icon
© 2025 Huntress All Rights Reserved.

Join the Hunt

Get insider access to Huntress tradecraft, killer events, and the freshest blog updates.

By submitting this form, you accept our Terms of Service & Privacy Policy