Skip to content
RCE Write-up Intermediate

Pots and Pans, a.k.a. an Sslvpn Palo Alto Pan-OS CVE-2024-0012 and CVE-2024-9474

Two vulnerabilities in Palo Alto PAN-OS management interface: an authentication bypass (CVE-2024-0012) allowing unauthenticated access, and a command injection (CVE-2024-9474) enabling remote code execution as root. An attacker could chain them to execute arbitrary commands on the device.

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 author, on labs.watchtowr.com

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 authentication bypass stems from Nginx not setting the X-pan-AuthCheck header for certain proxied paths, allowing clients to supply it; the command injection arises from insufficient escaping of the username parameter before passing it to a shell command.

Impact

An unauthenticated attacker could bypass authentication and then execute arbitrary commands as root on the firewall, leading to full compromise.

What the attacker needed

Network access to the management interface; no authentication required

The fix

The vulnerabilities were fixed in version 10.2.12-h2 by properly setting the X-pan-AuthCheck header and escaping the username parameter.

How it was found

  1. Send a request to a protected PHP endpoint with a .js.map suffix and set the X-PAN-AUTHCHECK header to off to bypass authentication.
  2. Use the authentication bypass to access createRemoteAppwebSession.php and send a POST request with a malicious user parameter containing a shell command.
  3. Receive a PHP session ID from the response.
  4. Use the session ID in a request to index.php to trigger the command injection.
  5. The injected command executes as root, allowing arbitrary code execution.

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 report describes two security holes in a firewall's management interface. The first lets anyone skip the login screen by sending a special header, and the second lets an attacker run commands on the device by injecting them into a username field. Together, they allow full control of the firewall without any password.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.