OpenBao, Privilege Escalation via Namespace Path Canonicalization, CVE-2025-54996 (High) -DC-Jun2026-518

Listen to this Post

How the CVE Works

This vulnerability resides in OpenBao’s namespace path canonicalization logic, affecting versions prior to 2.5.5. OpenBao uses a hierarchical namespace structure for multi-tenancy. Management operations on namespaces are performed via endpoints under the `/sys/namespaces/` path. When a request is made to such an endpoint, the system accepts a namespace path segment, canonicalizes it, and then appends it to the path of the sys mount’s containing namespace (determined via a path prefix or the `X-Vault-Namespace` header) to resolve the absolute path of the target namespace.
The core of the issue lies in how the literal path segment `”root”` is handled during this canonicalization process. Due to a special case in the code, the path `”root”` canonicalizes to an empty string (""). Consequently, when a request is made to /sys/namespaces/root, the resulting absolute namespace path becomes equivalent to the sys mount’s containing namespace itself. This means the operation is effectively performed on the parent namespace, not a child namespace named “root”.
The critical flaw is the order of operations: Access Control Lists (ACLs) are evaluated before the namespace path canonicalization takes place. Therefore, a user who has been granted permissions (capabilities) on the `/sys/namespaces/root` path within a non-root namespace (the “victim namespace”) will pass the ACL check. Following this, the path is canonicalized, and the operation is inadvertently applied to the parent namespace—the one that contains the victim namespace. This allows a user with limited privileges in a child namespace to perform high-impact operations on the namespace that encompasses it.
The root namespace is immutable and cannot be deleted or locked, making it immune to this attack. Furthermore, an attacker can only target the direct parent namespace, not arbitrary namespaces elsewhere in the hierarchy. The exact operations possible depend on the specific capabilities granted on the `/sys/namespaces/root` path and its sub-paths, such as /api-lock.

DailyCVE Form

Platform: OpenBao
Version: < 2.5.5
Vulnerability : Privilege Escalation
Severity: High
date: 2026-06-17

Prediction: 2026-06-17

What Undercode Say: Analytics

The exploitation of this vulnerability hinges on a specific sequence of actions that abuse the path canonicalization flaw. The following steps and commands demonstrate how an attacker with limited privileges can escalate their control.

1. Environment Setup:

First, a development server is started. Then, a victim namespace is created. This namespace will be the one the attacker seeks to manage without authorization.

bao namespace create victim

2. Crafting the Malicious Policy:

A policy is created within the `victim` namespace. This policy grants broad management capabilities on all paths under sys/namespaces/. Critically, this includes the `sys/namespaces/root` path.

bao policy write -namespace=victim namespace-management - <<EOF
path "sys/namespaces/" {
capabilities = ["read", "update", "patch", "delete"]
}
EOF

3. Generating the Attack Token:

A token is created and attached to the `namespace-management` policy within the `victim` namespace. This token is the attacker’s key.

export BAO_TOKEN=$(bao token create -namespace=victim -policy=namespace-management -field=token)

4. Executing the Attack:

With the token set, the attacker can now operate on the `victim` namespace. The ACL check passes because the token has permissions on /sys/namespaces/root. The system then canonicalizes “root” to an empty path, causing the operation to target the `victim` namespace itself. The following command demonstrates this by outright deleting the `victim` namespace.

bao namespace delete -namespace=victim root

Exploit:

The exploitation process is as follows:

  1. Prerequisite: The attacker must have been granted capabilities on the `/sys/namespaces/root` path within a non-root namespace.
  2. Bypass: The attacker uses this granted capability to pass the ACL check for an operation on /sys/namespaces/root.
  3. Abuse: Due to the path canonicalization flaw, the “root” path segment is resolved to an empty string.
  4. Escalation: The operation is performed on the parent (containing) namespace instead of the intended one, allowing for unauthorized actions like deletion, locking, or metadata modification.

Protection:

The primary and recommended protection is to upgrade to OpenBao version v2.5.5 or later, which contains the fix for this vulnerability.
If an immediate upgrade is not possible, organizations should rigorously audit and restrict the granting of namespace management capabilities, specifically on paths like /sys/namespaces/root, to only the most trusted users and processes.

Impact

A successful exploit of this vulnerability allows an attacker to perform privileged operations on a namespace they should not have control over. The specific impact includes the ability to:

Look up details of the parent namespace.

Delete the parent namespace entirely.

Lock the parent namespace, potentially causing a denial of service.

Patch custom metadata associated with the parent namespace.

The root namespace is immutable and thus not affected. The attack is also limited to the direct parent namespace and cannot be used to target arbitrary namespaces within the system.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top