Table of Contents
  • Home
  • /
  • Blog
  • /
  • How to Fix CVE-2024-3400 - A Critical Security Command Injection Vulnerability in PAN-OS?
April 22, 2024

How to Fix CVE-2024-3400 - A Critical Security Command Injection Vulnerability in PAN-OS?

How to Fix CVE-2024-3400 - A Critical Security Command Injection Vulnerability in PAN-OS

Palo Alto Networks, a leading network security company, recently released an advisory about a critical severity command injection vulnerability in its operating system, PAN-OS. The flaw, assigned the CVE ID CVE-2024-3400, has a maximum severity score of 10.0 on the CVSS scale.

The vulnerability stems from the GlobalProtect feature of Palo Alto Networks firewalls. It affects specific PAN-OS versions that have GlobalProtect gateway, GlobalProtect portal, or both configured. According to a report shared by Shadowserver, there were more than 22,000 vulnerable instances of Palo Alto firewalls with GlobalProtect exposed on the internet. This shows the amount of work required to fix the vulnerability. Successful exploitation of this vulnerability would allow an attacker to execute arbitrary commands with root privileges on the affected firewall. Considering its severity, it is highly recommended to fix the command injection vulnerability in PAN-OS at the earliest. In this blog post, we will explore how to fix CVE-2024-3400.

A Short Introduction about PAN-OS

PAN-OS is the proprietary operating system developed by Palo Alto Networks, specifically designed to power its range of security appliances. As a core component of the company's next-generation firewalls, PAN-OS is integral in providing advanced security features such as threat prevention, URL filtering, and application visibility and control. It uses a single-pass architecture and application-specific integrated circuits to deliver high performance.

What is CVE-2024-3400?

CVE-2024-3400 is a critical command injection vulnerability in the GlobalProtect feature of PAN-OS. The vulnerability details are as follows:

  • CVE ID: CVE-2024-3400

  • Description: A command injection as a result of arbitrary file creation vulnerability in the GlobalProtect feature of Palo Alto Networks PAN-OS software may enable an unauthenticated attacker to execute arbitrary code with root privileges on the firewall.

  • CVSS Score: 10.0 (Critical)


The vulnerability stems from a combination of two bugs in PAN-OS. The first bug allows an attacker to store an empty file with an attacker-chosen filename by not properly validating the session ID format. The second bug uses the attacker-provided filename as part of a command, leading to command injection. While neither bug is critical on its own, the combination of the two allows for unauthenticated remote shell command execution.

Technical Details of CVE-2024-3400

The exploitation of CVE-2024-3400 involves a sophisticated two-stage attack that combines two vulnerabilities to achieve command execution on the targeted device, as detailed in the Palo Alto Networks blog post.

In the first stage, the attacker sends a malicious request containing a specially crafted shell command to the GlobalProtect service instead of a valid session ID. Due to insufficient validation of the session ID format, the GlobalProtect service stores this request as an empty file on the system, using the attacker-supplied command as the filename.

The second stage exploits a vulnerability in a regularly scheduled system job, which uses the attacker-provided filename from stage one as part of a command. As a result, the attacker's command is executed with elevated privileges, potentially granting control over the device.

Successful execution of stage one does not guarantee the attacker's command has been executed; it merely creates a malicious filename on the system. For a complete compromise, the attacker's command must be designed to cause significant damage, such as exfiltrating sensitive data or downloading malware.

Products Affected by CVE-2024-20321

There are certain versions of Palo Alto firewalls configured with GlobalProtect gateway, GlobalProtect portal, or both is affected by he CVE-2024-3400 command injection vulnerability:

  • PAN-OS 11.1: < 11.1.0-h3, < 11.1.1-h1, < 11.1.2-h3

  • PAN-OS 11.0: < 11.0.0-h3, < 11.0.1-h4, < 11.0.2-h4, < 11.0.3-h10, < 11.0.4-h1

  • PAN-OS 10.2: < 10.2.0-h3, < 10.2.1-h2, < 10.2.2-h5, < 10.2.3-h13, < 10.2.4-h16, < 10.2.5-h6, < 10.2.6-h3, < 10.2.7-h8, < 10.2.8-h3, < 10.2.9-h1

It is crucial to apply the necessary patches and updates to affected PAN-OS versions and follow the recommended best practices for securing Palo Alto Networks firewalls.

It's also worth nothing that the these products and versions are not impacted by CVE-2024-3400:

  • Cloud NGFW: All versions

  • PAN-OS 10.1: All versions

  • PAN-OS 10.0: All versions

  • PAN-OS 9.1: All versions

  • PAN-OS 9.0: All versions

  • Prisma Access: All versions

To check if your Palo Alto Networks firewall is affected by this vulnerability, verify the PAN-OS version and confirm if GlobalProtect gateway or portal (or both) are configured. You can check for the presence of GlobalProtect configurations by navigating to Network > GlobalProtect > Gateways or Network > GlobalProtect > Portals in the firewall's web interface.

How to Check if an Exploitation Attempt was Made on Your Palo Alto Firewall?

If your Firewall in connected to the internet, we suggest to check if your firewall has be attempted to exploit. You can do that by running the following command from the PAN-OS CLI:

grep pattern "failed to unmarshal session(.\+.\/" mp-log gpsvc.log*
  • If the value between "session(" and ")" looks like a GUID (e.g., "01234567-89ab-cdef-1234-567890abcdef"), it indicates normal behavior. No exploitation attempts were made.

  • However, if the value contains a file system path or embedded shell commands instead of a GUID, it could be an indicator of an attempted exploitation of CVE-2024-3400.

For example, the following output suggests an attempted exploit:

failed to unmarshal session(../../some/path)

In contrast, the following output indicates normal behavior:

failed to unmarshal session(01234567-89ab-cdef-1234-567890abcdef)

How to Fix CVE-2024-3400?

To fix CVE-2024-3400 and protect your Palo Alto firewall from the command injection vulnerability, the most effective solution is to upgrade to a patched version of PAN-OS, such as 10.2.9-h1, 11.0.4-h1, 11.1.2-h3, or any later version, as mentioned in the Palo Alto Networks security advisory.

If an immediate upgrade is not feasible, consider applying the following mitigations.

  1. Enable Threat Detection for signature IDs 95187, 95189, and 95191 to detect and block known exploit attempts.

  2. Temporarily take the GlobalProtect interface offline until the patch is applied.

  3. Apply additional IPS rules to block requests to the GlobalProtect interface containing a directory traversal sequence ("../") anywhere in the HTTP Cookie header.

Ensure to test the effectiveness of the applied fixes and mitigations to verify that your firewall is no longer vulnerable to CVE-2024-3400. Please visit the advisory for constant updates on this flaw.

We hope this post helps you know how to fix CVE-2024-3400 - a critical security command injection vulnerability in PAN-OS. Thanks for reading this post. Please share this post and help secure the digital world.Visit our website, and our social media page on FacebookLinkedInTwitterTelegramTumblrMedium, and Instagram and subscribe to receive updates like this.

Arun KL

Arun KL is a cybersecurity professional with 15+ years of experience in IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.

Recently added

Cloud & OS Platforms

View All

Learn More About Cyber Security Security & Technology

“Knowledge Arsenal: Empowering Your Security Journey through Continuous Learning”

Cybersecurity All-in-One For Dummies - 1st Edition

"Cybersecurity All-in-One For Dummies" offers a comprehensive guide to securing personal and business digital assets from cyber threats, with actionable insights from industry experts.



View All

Learn Something New with Free Email subscription