Skip to content
RCE Write-up Advanced

Realistic RCE Exploit Chain in OpenBao and Vault

A chain of four vulnerabilities in OpenBao allowed an unauthenticated attacker to gain remote code execution. The attacker could bypass ACME validation to obtain a certificate, escalate privileges via non-canonical URL handling and cross-namespace policy access, and finally restore a malicious snapshot to execute code.

control-plane.io

Published on control-plane.io

In collaboration with the upstream OpenBao community, ControlPlane recently fixed a full exploit chain from unauthenticated access to full remote code execution. This is the second-ever remote code execution vulnerability in Vault and OpenBao.

The author, on control-plane.io

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

Impact

An attacker could achieve full remote code execution against any pre-existing binary on the system, with high likelihood of success despite a one-shot approach, and this works independently of how OpenBao is unsealed.

What the attacker needed

Attacker can interact with ACME; attacker knows service provisioner SVID; attacker has access to snapshot restore endpoint

The fix

The vulnerabilities were fixed in OpenBao v2.6.3 and v2.7.0; workarounds include disabling plugins and requiring External Account Bindings for ACME.

How it was found

  1. Abuse the PKI ACME validation bypass to obtain a certificate and key identifying the service provisioner.
  2. Use the certificate to authenticate as the service provisioner to the sandboxed Certificate Auth engine.
  3. Abuse the non-canonical URL bypass to overwrite the admin role's required URI SANs.
  4. Re-authenticate to gain access to the admin role and its policies within the sandbox.
  5. Update the admin's policy to add a token policy, crossing the namespace boundary into the root namespace.
  6. Re-authenticate to gain access to the snapshot restore endpoint, restore a malicious snapshot, unseal the node, and achieve RCE.

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.

OpenBao is a secrets management tool. The report describes how several separate security mistakes could be combined: first, tricking the certificate system into issuing a certificate for a fake identity; then using that to get more permissions than intended; and finally uploading a crafted backup file that makes the server run the attacker's code. This is called a chain because each step relies on the previous one.

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.