CVE-2025-62705
Executive Summary
CVE-2025-62705 is a medium-severity information disclosure vulnerability in OpenBao, an open-source identity-based secrets management system. The flaw resides in the audit logging subsystem, where certain response parameters of type []byte (byte slices) are not properly redacted before being written to the audit log. This affects two primary subsystems: sys/raw when using encoding=base64, which can leak all data in the raw storage backend, and the Transit secrets engine when performing signing operations with a derived Ed25519 key, which leaks the public key. An attacker with access to the audit logs can extract sensitive information, including secrets and cryptographic material. The vulnerability is patched in OpenBao version 2.4.2.
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 exists in the core audit logging code, not in a specific dependency. However, organizations using OpenBao should verify the integrity of their deployment binaries and ensure they are sourced from official releases. The patch is available in the official OpenBao GitHub repository.
CVSS Breakdown & Threat Level
CVSS Score: 5.3 (Medium) Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N Attack Vector: Network Attack Complexity: Low Privileges Required: Low (requires access to audit logs) User Interaction: None Scope: Unchanged Confidentiality Impact: High Integrity Impact: None Availability Impact: None
Threat Level: Medium. The vulnerability requires an attacker to have access to the audit logs, which are typically restricted to administrators. However, if audit logs are stored in a centralized logging system with broader access, the impact increases.
Deep Dive & Mechanics
The vulnerability stems from how OpenBao's audit logging subsystem handles response parameters of type []byte. When a subsystem returns a response containing byte slices, the audit logger fails to apply the same redaction logic that it applies to string parameters. This is because the redaction logic is designed to work with string types, and []byte parameters bypass the redaction filters.
Affected Subsystems:
sys/rawwithencoding=base64: Thesys/rawendpoint allows reading raw data from the storage backend. When theencoding=base64parameter is used, the response contains base64-encoded data as a[]byte. This data is not redacted in the audit log, potentially exposing all secrets stored in the backend.Transit Engine with Derived Ed25519 Keys: The Transit secrets engine performs cryptographic operations. When signing with a derived Ed25519 key, the public key is returned as a
[]bytein the response. This public key is not redacted in the audit log, leaking cryptographic material.
Root Cause: The audit logging code uses a type assertion or reflection to check if a value is a string before applying redaction. []byte values are not strings, so they pass through unredacted.
Vulnerable vs. Patched Code
Vulnerable Code (OpenBao < 2.4.2): The audit logger likely has a function that processes response data. In the vulnerable version, it might look like this (pseudocode):
func redactResponse(data interface{}) interface{} {
switch v := data.(type) {
case string:
return redactString(v)
default:
return v // No redaction for []byte or other types
}
}
Patched Code (OpenBao >= 2.4.2):
The patched version adds handling for []byte:
func redactResponse(data interface{}) interface{} {
switch v := data.(type) {
case string:
return redactString(v)
case []byte:
return redactBytes(v) // New function to redact byte slices
default:
return v
}
}
The redactBytes function would convert the byte slice to a string and apply the same redaction logic, or use a dedicated redaction method for binary data.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to OpenBao audit logs (e.g., via a compromised logging system or insider access).
- Knowledge of the OpenBao API.
Exploitation Steps:
- Identify Audit Log Location: Determine where OpenBao writes audit logs (e.g., file, syslog, socket).
- Extract Audit Logs: Obtain the audit log files or stream.
- Search for Sensitive Data: Use
grepor a log analysis tool to find entries containingsys/rawwithencoding=base64or Transit signing operations.grep -E 'sys/raw|transit/sign' audit.log - Decode Base64 Data: For
sys/rawentries, extract the base64-encoded data and decode it.echo "base64data" | base64 -d - Extract Public Keys: For Transit entries, extract the public key from the response.
Example Attack Scenario:
An attacker compromises a log aggregation server that collects OpenBao audit logs. They search for sys/raw entries and find a base64-encoded secret. They decode it and gain access to a database password.
Blue Team
Detection:
- Monitor for unusual access to audit log files or streams.
- Alert on audit log entries containing
sys/rawwithencoding=base64or Transit signing operations. - Use the detection rules provided in the Detection Engineering section.
Mitigation:
- Immediately upgrade to OpenBao 2.4.2 or later.
- Restrict access to audit logs to only authorized personnel.
- Implement audit log rotation and retention policies.
- Consider encrypting audit logs at rest and in transit.
Honeypot:
- Deploy a decoy OpenBao instance with verbose audit logging to attract attackers and monitor their activities.
Indicators of Compromise (IOCs)
- Audit Log Entries: Log entries containing
sys/rawwithencoding=base64and a large base64-encoded string. - Audit Log Entries: Log entries for Transit signing operations with derived Ed25519 keys that include a public key in the response.
- Network Traffic: Unusual access to the OpenBao API from IP addresses not associated with legitimate clients.
- File Hashes: Audit log files with unexpected modifications or access patterns.
Detection Engineering
YARA Rule
rule CVE_2025_62705_OpenBao_Audit_Log_Leak {
meta:
description = "Detects OpenBao audit log entries that may contain unredacted byte data"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-62705"
strings:
$sys_raw = "sys/raw" nocase
$encoding_base64 = "encoding=base64" nocase
$transit_sign = "transit/sign" nocase
$ed25519 = "ed25519" nocase
$public_key = "public_key" nocase
condition:
($sys_raw and $encoding_base64) or ($transit_sign and $ed25519 and $public_key)
}
Sigma Rule
title: OpenBao Audit Log Data Leak (CVE-2025-62705)
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects OpenBao audit log entries that may contain unredacted byte data, indicating exploitation of CVE-2025-62705.
author: Valters IT
date: 2025/04/10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-62705
logsource:
product: openbao
service: audit
detection:
selection_sys_raw:
- EventID: 'audit'
- Data|contains: 'sys/raw'
- Data|contains: 'encoding=base64'
selection_transit:
- EventID: 'audit'
- Data|contains: 'transit/sign'
- Data|contains: 'ed25519'
- Data|contains: 'public_key'
condition: selection_sys_raw or selection_transit
falsepositives:
- Legitimate use of sys/raw with base64 encoding (should be rare)
- Legitimate Transit signing operations (public key is not sensitive)
level: medium
tags:
- attack.t1213
- cve.2025.62705
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-62705 OpenBao Audit Log Data Leak"; flow:to_server,established; content:"sys/raw"; http_uri; nocase; content:"encoding=base64"; http_uri; nocase; classtype:attempted-recon; sid:1000001; rev:1;)
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-62705 OpenBao Transit Sign Leak"; flow:to_server,established; content:"transit/sign"; http_uri; nocase; content:"ed25519"; http_uri; nocase; content:"public_key"; http_uri; nocase; classtype:attempted-recon; sid:1000002; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade OpenBao: Upgrade to version 2.4.2 or later immediately.
- Rotate Secrets: If
sys/rawwas used withencoding=base64and audit logs were exposed, rotate all secrets stored in the backend. - Rotate Keys: If Transit derived Ed25519 keys were used and audit logs were exposed, rotate the affected keys.
Long-Term Mitigations:
- Audit Log Access Control: Implement strict access controls on audit logs. Use the principle of least privilege.
- Audit Log Encryption: Encrypt audit logs at rest and in transit.
- Audit Log Monitoring: Continuously monitor audit logs for suspicious entries.
- Regular Security Audits: Conduct regular security audits of OpenBao configurations and deployments.
- Vulnerability Scanning: Use vulnerability scanners to identify unpatched OpenBao instances.
Workarounds (if upgrade is not immediately possible):
- Disable audit logging for
sys/rawand Transit operations (not recommended, as it reduces visibility). - Implement a custom audit log redaction plugin if OpenBao supports it.
Valters IT
DevSecOps & Cyber Threat Intelligence Expert