Palo Alto - Putting The Protecc In GlobalProtect (CVE-2024-3400)
A path traversal in the GlobalProtect session handling allowed unauthenticated attackers to create zero-byte files as root, and when telemetry was enabled, a crafted filename was injected into a shell command, enabling remote command execution as root.
labs.watchtowr.com
Published on labs.watchtowr.com
This research is a glimpse into the capability powering the watchTowr Platform, a Preemptive Exposure Management solution. We enable organizations to autonomously validate and mitigate their exposure to emerging threats, ahead of in-the-wild exploitation.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the session ID from a cookie was concatenated into a file path without sanitisation, and later a filename derived from that path was passed to a shell command with shell=True.
Impact
An unauthenticated attacker could execute arbitrary commands with root privileges on affected devices, but only when telemetry was enabled (though Palo Alto later confirmed telemetry is not required).
What the attacker needed
GlobalProtect gateway or portal configured; device telemetry enabled (initially thought required)
The fix
The vulnerability was fixed by Palo Alto; the text does not detail the fix.
How it was found
- Send an HTTP request to the GlobalProtect endpoint with a SESSID cookie containing a path traversal to create a zero-byte file in a telemetry directory.
- Observe in the logs that the filename appears in a curl command executed by the telemetry process.
- Craft a filename that includes a shell command using ${IFS} to represent spaces, and send it in the SESSID cookie.
- The telemetry process executes the injected command, demonstrated by a curl callout to an external host.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a bug in Palo Alto's VPN product, GlobalProtect. An attacker could send a special cookie that made the device create files in unintended places, and if telemetry was on, that file name was later run as a system command, letting the attacker run their own commands as the highest-privileged user.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.