CWE-94, code injection, in a daemon that runs as root because it has to. The
authentication check is real. The authorisation boundary behind it is not.

What the advisory says

A remote code execution (RCE) vulnerability in the management interface of
Palo Alto Networks PAN-OS software enables an authenticated attacker with
network access to execute arbitrary code with root privileges on the
firewall.

Four clauses, and each one narrows the bug:

  • remote code execution — not information disclosure, not a crash;
  • management interface — the configuration surface, not the data plane;
  • authenticated attacker — credentials are required, and CVSS prices them
    at PR:H, administrative;
  • root privileges — the code does not run as the web user, or as the
    logged-in admin. It runs as root.

The weakness is CWE-94: Improper Control of Generation of Code. In the
vendor's classification, input was used to generate code the system then
executed.

The chain of reasoning

The advisory does not name the endpoint. The classification and the
architecture are enough:

  1. A management-interface function performs a privileged operation — a
    diagnostic, a configuration action, an import, a shell-backed helper.
  2. It is reachable by an authenticated administrative user.
  3. Authentication is the only check. The function does not verify that this
    particular administrator is authorised for this operation, in this
    context, with these arguments.
  4. The arguments reach an evaluator — a shell, an expression parser, a command
    builder — inside a process running as root.
  5. The injected string executes with the daemon's privileges.

This is the classic confused deputy. The management daemon has root because
it must program the kernel, the interfaces and policy tables. It performs work
on behalf of a caller whose privilege level it does not re-check.

Why authorisation is the hard part

Authentication is a gate at the front door: one check, small, central, well
tested.

Authorisation is a decision at every endpoint. Each function must ask: may this
account perform this action, on this object, with these parameters? That
decision is per route, per verb, per parameter — and it is the one missed when
a new endpoint is added.

The corpus puts it well: authentication is easy to check once, hard to check
everywhere. This CVE is what "everywhere" costs.

Why root makes it total

On a general-purpose server, code execution as the web user is serious but
bounded: another boundary remains.

On PAN-OS there is no such boundary inside the management plane. The daemons
that serve the UI, the API and the CLI are the same daemons that reprogram the
device. They cannot run as nobody, because nobody cannot write a route or
install a filter rule.

So the bug does not escalate from a web user; it starts at root. What the
attacker gains is not a foothold but the device's authority: read the running
configuration, extract certificates and pre-shared keys, add an administrator,
disable logging, rewrite policy, and push to HA peers or Panorama.

What the fix must have been

PAN-OS is closed source: no diff, no commit, no statement about which function
changed. Without inventing detail:

  • The fix belongs where the input is turned into code — a validation or
    parameterisation step that stops the argument from being interpreted.
  • A complete fix would also separate "administrator" from "root": run the
    management function with only the privileges it needs, so that a future
    injection is not automatically a root shell.
  • The advisory's own mitigation is architectural, not syntactic: restrict who
    can reach the interface at all.

That is the admission worth keeping: when the guidance is "restrict access",
the network boundary is doing the real work.

Why this is the fundamental flaw

Every other issue in this series is downstream of it. The UI, the API and the
CLI are front ends to a root context with no intermediate privilege layer — so
any injection on that path is total, and the only reliable control is to make
the path unreachable.

Next: Part 8 — version sprawl: twenty fixed builds, five trains, and a
trailing hotfix number that decides whether you are patched.