CVE-2025-54996
Executive Summary
CVE-2025-54996 is a privilege escalation vulnerability in OpenBao, a secrets management solution. The flaw allows accounts with access to highly-privileged identity entity systems in root namespaces to increase their scope directly to the root policy. This bypasses the intended restriction that the root policy should only be manually generated using unseal or recovery key shares. The vulnerability affects versions 2.3.1 and below and is fixed in version 2.3.2. The CVSS score is 7.2 (High), with a vector indicating a high-privilege attacker can achieve complete compromise of confidentiality, integrity, and availability across all namespaces.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
OpenBao is a Go-based project. The vulnerability is in the core identity system, not in a package dependency. However, organizations using OpenBao should verify their deployment version and apply the patch immediately. No malicious packages have been reported in relation to this CVE.
CVSS Breakdown & Threat Level
- CVSS Score: 7.2 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: High (PR:H) – requires access to identity entity systems in root namespaces
- User Interaction: None (UI:N)
- Scope: Changed (S:C) – the vulnerability allows escalation from a child namespace to the root namespace
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: High. While the attack requires high privileges, the impact is severe, granting full root policy access across all namespaces.
Deep Dive & Mechanics
The vulnerability lies in the identity entity system within OpenBao's root namespace. In versions 2.3.1 and below, accounts with access to identity entity endpoints (e.g., /identity/entity) could add arbitrary policies to an entity. The root policy, which grants unrestricted access, was intended to be only manually generated using unseal or recovery key shares. However, due to insufficient validation, an attacker could craft a request to assign the root policy to an entity, effectively escalating privileges.
The root policy is a special policy that bypasses all ACL checks. By assigning it to an entity, the attacker gains full control over the OpenBao instance, including the ability to read, write, and delete any secret, manage policies, and access all namespaces.
The workaround involves using denied_parameters in policies that have access to the affected identity endpoints to block the addition of the root policy.
Vulnerable vs. Patched Code
Vulnerable Code (simplified):
// In identity/entity.go (v2.3.1)
func (s *SystemBackend) handleEntityUpdate(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
// ... existing code ...
policies := d.Get("policies").([]string)
// No validation to prevent adding "root" policy
entity.Policies = policies
// ... save entity ...
}
Patched Code (v2.3.2):
// In identity/entity.go (v2.3.2)
func (s *SystemBackend) handleEntityUpdate(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
// ... existing code ...
policies := d.Get("policies").([]string)
// Validate that "root" policy is not added via this endpoint
for _, p := range policies {
if p == "root" {
return logical.ErrorResponse("cannot assign root policy via identity entity"), nil
}
}
entity.Policies = policies
// ... save entity ...
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to an OpenBao instance (v2.3.1 or below) with credentials that have permission to manage identity entities in the root namespace.
- The attacker must have a token with a policy that allows
createorupdateonidentity/entity/*.
Exploitation Steps:
- Authenticate to OpenBao with the privileged token.
- Create or update an identity entity to include the
rootpolicy.vault write identity/entity name="malicious_entity" policies="root" - Generate a token for that entity.
vault token create -entity-id=<entity_id> - Use the new token to perform any action with root privileges.
vault login <token> vault secrets list # Should show all secrets
Expected Outcome: The attacker gains full root access to the OpenBao instance.
Blue Team
Detection:
- Monitor audit logs for
identity/entitywrite operations that includepolicies=root. - Alert on any token creation that results in a token with the
rootpolicy.
Mitigation:
- Apply the patch to upgrade to v2.3.2.
- As a workaround, add
denied_parametersto policies that have access to identity endpoints:path "identity/entity/*" { capabilities = ["create", "update"] denied_parameters = { "policies" = ["root"] } }
Indicators of Compromise (IOCs)
- Audit Log Entries:
identity/entitywrite operations withpoliciescontainingroot. - Token Creation: Tokens created with the
rootpolicy via identity entity. - Unusual Access: Sudden access to secrets or paths that were previously restricted.
Detection Engineering
YARA Rule
rule CVE_2025_54996_OpenBao_PrivEsc {
meta:
description = "Detects attempts to assign root policy via identity entity in OpenBao"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-54996"
strings:
$root_policy = "root" ascii wide nocase
$identity_entity = "identity/entity" ascii wide nocase
condition:
$identity_entity and $root_policy
}
Sigma Rule
title: OpenBao Privilege Escalation via Identity Entity
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to assign root policy to an identity entity in OpenBao
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-54996
author: Valters IT
date: 2025-04-10
logsource:
product: openbao
service: audit
detection:
selection:
path: "identity/entity/*"
data.policies|contains: "root"
condition: selection
falsepositives:
- Legitimate administrative actions (should be rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-54996 OpenBao Privilege Escalation Attempt"; flow:to_server; content:"POST"; http_method; content:"/v1/identity/entity"; http_uri; content:"\"policies\":[\"root\"]"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade to OpenBao version 2.3.2 or later.
- Workaround: If upgrade is not possible, add
denied_parametersto policies that have access to identity endpoints to block therootpolicy. - Monitoring: Enable audit logging and monitor for suspicious identity entity modifications.
- Access Control: Review and restrict access to identity entity endpoints to only trusted administrators.
Valters IT
Securing your digital infrastructure with precision.