Threat Brief: CVE-2024-6387 OpenSSH RegreSSHion Vulnerability (2024)

This post is also available in: 日本語 (Japanese)

Executive Summary

On July 1, 2024, a critical signal handler race condition vulnerability was disclosed in OpenSSH servers (sshd) on glibc-based Linux systems. This vulnerability, called RegreSSHion and tracked as CVE-2024-6387, can result in unauthenticated remote code execution (RCE) with root privileges. This vulnerability has been rated High severity (CVSS 8.1).

This vulnerability impacts the following OpenSSH server versions:

  • Open SSH version between 8.5p1-9.8p1
  • Open SSH versions earlier than 4.4p1, if they’ve not backport-patched against CVE-2006-5051 or patched against CVE-2008-4109

The SSH features in PAN-OS are not affected by CVE-2024-6387.

Using Palo Alto Networks Xpanse data, we observed 23 million instances of OpenSSH servers including all versions. We saw over 7 million exposed instances of OpenSSH versions 8.5p1-9.7p1 globally as of July 1, 2024. Including older versions (4.3p1 and earlier), we see 7.3 million total. However, this is likely to be an overcount of vulnerable versions as there is no reliable way to account for backporting, in which instances are running patched versions but displaying impacted version numbers. These numbers also do not account for OS-level specifications or configurations that could be required for the vulnerability.

While there is PoC code for this vulnerability, there is no known activity in the wild as of July 2, 2024. Our testing of this code suggests it is not functional. We have been unable to successfully exploit the CVE-2024-6387 vulnerability with this PoC to achieve remote code execution.

Palo Alto Networks also recommends updating all OpenSSH instances to the latest version of OpenSSH, later than v9.8p1.

Palo Alto Networks customers receive protections from and mitigations for CVE-2024-6387 in the following ways:

The Unit 42 Incident Response team can also be engaged to help with a compromise or to provide a proactive assessment to lower your risk.

Palo Alto Networks customers are better protected from vulnerabilities discussed in this article through Cortex XSOAR, XDRand XSIAM. Customers are also better protected through our Next-Generation Firewall with Cloud-Delivered Security Services, including Advanced WildFire. Customers can access external SSH exposure detection from Cortex Xpanse and XSIAM. Customers are also better protected by Prisma Cloud through tooling such as Prisma Cloud’s agent or agentless vulnerability scanning and Software Composition Analysis (SCA) tools, which assist in identifying vulnerable resources across the cloud development lifecycle.

Vulnerabilities DiscussedCVE-2024-6387

Details of the Vulnerability

Researchers at Qualys discovered that the OpenSSH server process sshd is vulnerable to a signal handler race condition, enabling unauthenticated remote code execution with root privileges on glibc-based Linux systems in its default configuration. OpenSSH is an open-source suite of tools for remote sign-in and data transfer, using the Secure Shell (SSH) protocol.

This vulnerability can be exploited remotely on glibc-based Linux systems due to syslog() calling async-signal-unsafe functions like malloc() and free(), leading to unauthenticated remote code execution as root.

This occurs because sshd's privileged code is not sandboxed and runs with full privileges. OpenBSD is not vulnerable because its signal alarm (SIGALRM) handler uses syslog_r(), an async-signal-safe version of syslog().

Table 1 shows the vulnerable versions associated with CVE-2024-6387.

VersionVulnerability Determination
OpenSSH < 4.4p1YES
If backport-patched against CVE-2006-5051 and CVE-2008-4109: NO
4.4p1 <= OpenSSH < 8.5p1NO
8.5p1 <= OpenSSH < 9.8p1YES

Table 1. Breakdown of vulnerable OpenSSH versions associated with CVE-2024-6387.

According to OpenSSH’s release notes on July 1, 2024, successful exploitation has been shown on 32-bit Linux/glibc systems with address space layout randomization (ASLR). This exploitation typically requires 6-8 hours of continuous connections under lab conditions up to the server's maximum capacity.

A public PoC for CVE 2024-6387 was committed to the repository of GitHub user zgzhang by user 7etsuo on July 1, 2024. We have been unable to successfully exploit the CVE-2024-6387 vulnerability with this PoC to achieve remote code execution in our testing environment.

Using Palo Alto Networks Xpanse data, we observed 23 million instances of OpenSSH servers including all versions. We saw over 7 million exposed instances of OpenSSH versions 8.5p1-9.7p1 globally as of July 1, 2024. Including older versions (4.3p1 and earlier), we see 7.3 million total. However, this is likely to be an overcount of vulnerable versions as there is no reliable way to account for backporting, in which instances are running patched versions but displaying impacted version numbers. These numbers also do not account for OS-level specifications or configurations that could be required for the vulnerability.

Table 2 shows the geographic distribution of our observations of vulnerable versions 8.5p1-9.7p1.

CountryUnique IP Addresses
United States2,173,896
Germany905,859
China435,490
Singapore296,226
Russia275,197
The Netherlands261,212
France248,153
United Kingdom237,329
India230,320
Japan227,663
Korea136,852
Canada119,924
Finland110,516
Hong Kong103,685
Australia100,780

Table 2. Top 15 Countries Exposed to CVE-2024-6387 as of July 1, 2024.

Current Scope of the Attack

While there is PoC code for this vulnerability, there is no known activity in the wild as of July 2, 2024. Our testing of this code suggests it is not functional in our testing environment. We have been unable to successfully exploit the CVE-2024-6387 vulnerability with this PoC to achieve remote code execution.

Interim Guidance

Palo Alto Networks recommends updating all OpenSSH instances to the latest version of OpenSSH, later than v9.8p1.

Prisma Cloud detects the presence of any cloud resource that is vulnerable to CVE-2024-6387 as shown in Figure 1, including VM, serverless, container resources and cloud image repositories.

Threat Brief: CVE-2024-6387 OpenSSH RegreSSHion Vulnerability (1)

Prisma Cloud customers can query their cloud environments for cloud resources that contain the CVE-2024-6387 vulnerability that are also internet accessible, as shown in Figure 2.

Threat Brief: CVE-2024-6387 OpenSSH RegreSSHion Vulnerability (2)

If instances of the RegreSSHion vulnerability are found within cloud resources, they should be updated to the latest version of OpenSSH and an investigation should be started to ensure no malicious connections were established with the vulnerable cloud resources.

Unit 42 Managed Threat Hunting Queries

The Unit 42 Managed Threat Hunting team continues to monitor any developments related to the exploitation of this CVE. Cortex XDR customers can use the XQL query below to identify hosts running an affected version of OpenSSH.

1

2

3

4

5

6

7

8

9

10

11

12

// Query to identify hosts vulnerable to CVE-2024-6387

preset = host_inventory_applications

| filter endpoint_type = ENUM.AGENT_TYPE_SERVER

| filter lowercase(application_name) ~= "openssh(-server)?"

| alter product_major_version = to_number(arrayindex(split(raw_version, "."), 0)),

product_minor_version_stage_1 = arrayindex(split(raw_version, "."), 1),

product_rev = to_number(arrayindex(split(raw_version, "p"), 1))

| alter product_minor_version = to_number(arrayindex(split(product_minor_version_stage_1, "p"), 0))

// (name:"openssh" and version<4.4) or (name:"openssh" and version<9.8 and version>=8.5)

| filter product_major_version < 4 or (product_major_version = 4 and product_minor_version < 4) or (product_major_version = 8 and product_minor_version >= 5) or (product_major_version = 9 and product_minor_version < 8)

| fields endpoint_name, application_name, raw_version, product_major_version, product_minor_version, product_rev

| dedup endpoint_name

Conclusion

CVE-2024-6387 (aka RegreSSHion) is a signal handler race condition vulnerability in OpenSSH servers (sshd) on glibc-based Linux systems. This vulnerability is rated High severity (CVSS 8.1), and can result in unauthenticated remote code execution (RCE) with root privileges.

This vulnerability impacts all OpenSSH server versions between 8.5p1-9.8p1, as well as versions earlier than 4.4p1, if they’ve not backport-patched against CVE-2006-5051 or patched against CVE-2008-4109. The SSH features in PAN-OS are not affected by CVE-2024-6387.

While there is PoC code for this vulnerability, there is no known activity in the wild as of July 2, 2024. Our testing of this code suggests it is not functional in our testing environment. We have been unable to successfully exploit the CVE-2024-6387 vulnerability with this PoC to achieve remote code execution.

Palo Alto Networks Product Protections for CVE-2024-6387

Palo Alto Networks customers can leverage a variety of product protections and updates to identify and defend against this threat.

If you think you may have been compromised or have an urgent matter, get in touch with the Unit 42 Incident Response team or call:

  • North America Toll-Free: 866.486.4842 (866.4.UNIT42)
  • EMEA: +31.20.299.3130
  • APAC: +65.6983.8730
  • Japan: +81.50.1790.0200

Cortex XSOAR

Cortex XSOAR has released a response pack and playbook for CVE-2024-6387 to help automate and expedite the mitigation process. This playbook automates the following tasks: It begins by collecting, extracting, and enriching indicators. It then searches for vulnerable endpoints using Prisma Cloud and Cortex XDR XQL queries. If vulnerable endpoints are found, there is an option to send a notification email.

Finally, during the mitigation phase, the user is promptly notified with the official OpenSSH CVE-2024-6387 patch and Unit 42 mitigation recommendations.

Threat Brief: CVE-2024-6387 OpenSSH RegreSSHion Vulnerability (3)

Cortex XDR and XSIAM

The Cortex XDR and XSIAM agent has multiple layers of defense protecting our customers from activities that might be performed by exploiting this vulnerability. These include the Exploit Prevention, Local AI analysis, Wildfire, Behavioral Threat Protection (BTP), and Reverse Shell Protection modules that stop malicious activity such as this at first sight.

Thanks to our multi-layer security approach, we have different capabilities in place to prevent those activities, such as Behavioral Threat Protection (BTP), Advanced WildFire (AWF), Local Analysis (LA) and Reverse Shell Protection.

Cortex Xpanse

Cortex Xpanse has the ability to identify exposed vulnerable OpenSSH devices on the public internet and escalate these findings to defenders. Customers can enable alerting on this risk by ensuring that the Insecure OpenSSHAttack Surface Rule is enabled. Identified findings can either be viewed in the Threat Response Center or in the incident view of Expander. These findings are also available for Cortex XSIAM customers who have purchased the ASM module. Cortex Xpanse and XSIAM also have the ability to automatically mitigate vulnerable exposed OpenSSH servers.

Prisma Cloud

Prisma Cloud has detection capabilities in place for CVE-2024-6387. Prevention capabilities also exist with Prisma Cloud Agent and Agentless vulnerability scanning. Additionally, Prisma Cloud Software Composition Analysis (SCA) can detect vulnerable cloud resources throughout the cloud development lifecycle, including within cloud image repositories.

Additional Resources

Updated July 3, 2024, at 7:04 a.m. PT to make a small update to the protections information for Cortex XDR and XSIAM.

Updated July 2, 2024, at 4:20 p.m. PT to adjust for consistency and update protections information for Cortex XDR and XSIAM.

Updated July 2, 2024, at 1:52 p.m. PT to add product protections information for Cortex XSOAR.

Updated July 8, 2024, at 2:43 p.m. PT to add Figure 3.

Updated July 10, 2024, at 3:11 p.m. PT to update the Cortex XSOAR information.

Threat Brief: CVE-2024-6387 OpenSSH RegreSSHion Vulnerability (2024)

FAQs

What is CVE-2024-6387 vulnerable OpenSSH version? ›

CVE-2024-6387 is a vulnerability in OpenSSH servers (sshd) in 32-bit Linux/glibc systems. If exploited, the vulnerability facilitates Remote Code Execution with full root privileges, classifying it as a high-severity exposure (CVSS 8.1). CVE-2024-6387 (discovered on 1 July 2024) isn't an entirely new exposure.

What is the vulnerability in OpenSSH regression? ›

About the Vulnerability

On July 1, 2024, a significant security vulnerability was discovered in OpenSSH, specifically impacting glibc-based Linux systems. This flaw, identified as CVE-2024-6387, poses a critical risk as it allows for unauthenticated remote code execution (RCE) with root privileges.

How bad is CVE 2024-6387? ›

The vulnerabilities CVE-2024-6387 and CVE-2024-6409 in OpenSSH servers (sshd) on glibc-based Linux systems pose a significant risk, allowing potential attackers to execute remote code with root privileges.

What is the latest OpenSSH vulnerability? ›

The vulnerability, tracked as CVE-2024-6409 (CVSS score: 7.0), is distinct from CVE-2024-6387 (aka RegreSSHion) and relates to a case of code execution in the privsep child process due to a race condition in signal handling. It only impacts versions 8.7p1 and 8.8p1 shipped with Red Hat Enterprise Linux 9.

What is OpenSSH used for? ›

OpenSSH is a free SSH protocol suite providing encryption for network services like remote login or remote file transfers. The OpenSSH source code is available free to everyone via the Internet. This encourages code reuse and code auditing.

What is the regression SSH issue? ›

The regreSSHion (CVE-2024-6387) vulnerability is an unauthenticated remote code execution flaw found in OpenSSH servers (sshd) on glibc-based Linux systems. If exploited, it allows full root access to the targeted machine without user interaction. This vulnerability is classified as High severity (CVSS 8.1).

What is the CVE score for regreSSHion? ›

Overview. On Monday, July 1st, researchers from OpenSSH released a security update for a newly identified vulnerability which is being tracked as CVE-2024-6387, and has a CVSS score of 8.1. It has been dubbed regreSSHion and allows unauthenticated Remote Code Execution.

What is the regreSSHion RCE vulnerability? ›

What is regreSShion? regreSSHion, CVE-2024-6387, is an unauthenticated remote code execution in OpenSSH's server (sshd) that grants full root access. It affects the default configuration and does not require user interaction. It poses a significant exploit risk.

Which version of OpenSSH is secure? ›

In a nutshell, it says that OpenSSH versions on OSes other than OpenBSD are vulnerable, up to version 9.7p1; version 9.8 is safe. The vulnerability is very slow: on a 32-bit Linux system with address space randomization (ASLR), the attack has actually be demonstrated, and takes 6-8 hours.

How to check OpenSSH version? ›

Local OpenSSH version

The easiest way to find the installed OpenSSH version is using the ssh -V command. This works when being logged in to the system itself. So this system is running the 8.9p1 version of OpenSSH.

How to upgrade OpenSSH version in Linux? ›

Upgrade OpenSSH in Centos.
  1. root@localhost:~ yum groupinstall "Development Tools" root@localhost:~ yum install zlib-devel openssl-devel.
  2. root@localhost:~ wget -c https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.0p1.tar.gz. ...
  3. root@localhost:~ yum install pam-devel libselinux-devel.
  4. root@localhost:~ make.
Jul 24, 2024

What is the race condition vulnerability in SSH? ›

CVE-2024-6387, also known as "regreSSHion," is a vulnerability in OpenSSH's server component (sshd) affecting versions 8.5 to 9.8. This issue arises from a race condition in the signal handler, specifically when a client does not authenticate within the LoginGraceTime (120 seconds by default).

What is better than OpenSSH? ›

OpenSSH alternatives
  • Cowrie (SSH/telnet honeypot)
  • Dockpot (SSH honeypot based on Docker)
  • Fail2ban (log parser and blocking utility)

What is the difference between OpenSSH and PuTTY? ›

The advantages of the PuTTY key format are: Public half of key is stored in plaintext. OpenSSH's private key format encrypts the entire key file, so that the client has to ask you for your passphrase before it can do anything with the key at all.

What is the flaw in OpenSSH? ›

An unauthenticated remote code execution (RCE) flaw in OpenSSH's server in glibc-based Linux systems was discovered, a flaw that if exploited, could lead to a full system compromise with no user interaction whatsoever.

What versions of SSH are vulnerable? ›

OpenSSH versions earlier than 4.4p1 are vulnerable to this signal handler race condition unless they are patched for CVE-2006-5051 and CVE-2008-4109. Versions from 4.4p1 up to, but not including, 8.5p1 are not vulnerable due to a transformative patch for CVE-2006-5051, which secured a previously unsafe function.

Is OpenSSH 7.2 p2 vulnerable? ›

A vulnerability classified as problematic has been found in OpenSSH 7.2p2 (Connectivity Software). Affected is an unknown functionality of the component Authentication. The manipulation of the argument Password with an unknown input leads to a information disclosure vulnerability (Username).

What version of OpenSSH do I have? ›

Local OpenSSH version

The easiest way to find the installed OpenSSH version is using the ssh -V command. This works when being logged in to the system itself.

Top Articles
Eur-Aryan Roots with their English Derivatives, Volume 1
Ships 2022 Officially Announced for Xbox One and Xbox Series X|S - XboxAddict News
Spasa Parish
Rentals for rent in Maastricht
159R Bus Schedule Pdf
Sallisaw Bin Store
Black Adam Showtimes Near Maya Cinemas Delano
Espn Transfer Portal Basketball
Pollen Levels Richmond
11 Best Sites Like The Chive For Funny Pictures and Memes
Things to do in Wichita Falls on weekends 12-15 September
Craigslist Pets Huntsville Alabama
Paulette Goddard | American Actress, Modern Times, Charlie Chaplin
Red Dead Redemption 2 Legendary Fish Locations Guide (“A Fisher of Fish”)
What's the Difference Between Halal and Haram Meat & Food?
R/Skinwalker
Rugged Gentleman Barber Shop Martinsburg Wv
Jennifer Lenzini Leaving Ktiv
Justified - Streams, Episodenguide und News zur Serie
Epay. Medstarhealth.org
Olde Kegg Bar & Grill Portage Menu
Cubilabras
Half Inning In Which The Home Team Bats Crossword
Amazing Lash Bay Colony
Juego Friv Poki
Dirt Devil Ud70181 Parts Diagram
Truist Bank Open Saturday
Water Leaks in Your Car When It Rains? Common Causes & Fixes
What’s Closing at Disney World? A Complete Guide
New from Simply So Good - Cherry Apricot Slab Pie
Drys Pharmacy
Ohio State Football Wiki
Find Words Containing Specific Letters | WordFinder®
Abby's Caribbean Cafe
Joanna Gaines Reveals Who Bought the 'Fixer Upper' Lake House and Her Favorite Features of the Milestone Project
Tri-State Dog Racing Results
Navy Qrs Supervisor Answers
Trade Chart Dave Richard
Lincoln Financial Field Section 110
Free Stuff Craigslist Roanoke Va
Wi Dept Of Regulation & Licensing
Pick N Pull Near Me [Locator Map + Guide + FAQ]
Crystal Westbrooks Nipple
Ice Hockey Dboard
Über 60 Prozent Rabatt auf E-Bikes: Aldi reduziert sämtliche Pedelecs stark im Preis - nur noch für kurze Zeit
Wie blocke ich einen Bot aus Boardman/USA - sellerforum.de
Infinity Pool Showtimes Near Maya Cinemas Bakersfield
Dermpathdiagnostics Com Pay Invoice
How To Use Price Chopper Points At Quiktrip
Maria Butina Bikini
Busted Newspaper Zapata Tx
Latest Posts
Article information

Author: Msgr. Refugio Daniel

Last Updated:

Views: 6344

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Msgr. Refugio Daniel

Birthday: 1999-09-15

Address: 8416 Beatty Center, Derekfort, VA 72092-0500

Phone: +6838967160603

Job: Mining Executive

Hobby: Woodworking, Knitting, Fishing, Coffee roasting, Kayaking, Horseback riding, Kite flying

Introduction: My name is Msgr. Refugio Daniel, I am a fine, precious, encouraging, calm, glamorous, vivacious, friendly person who loves writing and wants to share my knowledge and understanding with you.