In early August 2025, security researchers identified a series of critical zero-day vulnerabilities in HashiCorp Vault, a widely utilized secrets management solution. These vulnerabilities encompass authentication bypasses, inconsistencies in policy enforcement, and exploitation of audit logs, collectively creating attack vectors that can lead to remote code execution (RCE) on Vault servers.
Discovery and Nature of Vulnerabilities
The vulnerabilities were uncovered through meticulous manual code reviews focusing on Vault’s request routing and plugin interfaces. Unlike traditional memory corruption exploits, these flaws are rooted in logic-level discrepancies, making them more challenging to detect. The issues have been present in Vault’s core authentication flows for nearly a decade, only recently coming to light due to comprehensive auditing efforts.
Potential Impact on Organizations
As organizations increasingly depend on Vault to secure API keys, certificates, and encryption keys across multi-cloud environments, the emergence of these vulnerabilities has raised significant concerns within the cybersecurity community. Exploiting these flaws could allow attackers to:
– Bypass lockout protections in userpass and LDAP backends.
– Evade Time-Based One-Time Password (TOTP) Multi-Factor Authentication (MFA) constraints.
– Impersonate machine identities through certificate authentication.
– Escalate privileges from admin tokens to root access.
Novel Remote Code Execution Technique
A particularly alarming aspect of these vulnerabilities is a novel RCE technique that does not rely on buffer overflows. Instead, attackers can manipulate Vault’s audit logging subsystem to inject malicious code. By configuring an audit backend with a custom prefix containing a shebang (`#!`) and Bash commands, attackers can coerce Vault into writing executable scripts. This method involves:
1. Probing the Plugin Catalog Endpoint: Attackers send a request to the plugin catalog endpoint (`POST /v1/sys/plugins/catalog/:type/:name`) with a non-existent plugin name. This elicits an error revealing the absolute path of the `plugin_directory`.
2. Enabling a File-Based Audit Backend: The attacker configures an audit backend with the following parameters:
“`
audit file {
log_path = /opt/vault/plugins/evil.sh
prefix = #!/bin/bash\n$(cat /tmp/secret_payload)\n
mode = 0755
}
“`
This setup causes Vault to create the file `/opt/vault/plugins/evil.sh` with executable permissions.
3. Retrieving the Payload via TCP Audit Backend: A TCP audit backend streams the identical payload to an attacker-controlled socket, ensuring the exact bytes can be hashed.
4. Registering the Malicious Plugin: The attacker issues the following command:
“`
vault write sys/plugins/catalog/secret/evil \
sha256= command=evil.sh
“`
Vault then loads `evil.sh` as a plugin, executing it within the Vault process and granting arbitrary code execution privileges.
Comprehensive List of Identified Vulnerabilities
The following table summarizes the key Common Vulnerabilities and Exposures (CVEs), their root causes, and potential impacts:
| CVE | Root Cause | Attacker Impact |
|—————-|———————————————————-|—————————————————————————————————|
| CVE-2025-6004 | Username lockout bypass via case and whitespace | Unlimited brute-force attempts; username enumeration |
| CVE-2025-6011 | Timing difference on bcrypt skip for non-existent users | Username validation oracle; targeted credential attacks |
| CVE-2025-6003 | MFA bypass when `username_as_alias=true` and EntityID mismatch | Silently skips TOTP requirement under certain LDAP configurations |
| CVE-2025-6016 | Combined TOTP logic flaws (replay, rate limit evasion) | Brute-force valid TOTP codes; bypass one-time use and rate-limiting |
| CVE-2025-6037 | CN unchecked in non-CA cert auth | Impersonation of arbitrary machine identities with valid public key |
| CVE-2025-5999 | Policy normalization mismatch | Admin can assign ` root` or uppercase `ROOT` policy names to escalate to `root` privileges |
| CVE-2025-6000 | Audit-log prefix abuse for plugin creation | Remote code execution with no memory corruption via malicious audit-log-backed plugin registration |
Recommendations and Mitigation
Organizations are strongly urged to upgrade immediately to the patched versions released by HashiCorp. The company has issued advisory updates addressing all nine CVEs, reinforcing normalization routines, and tightening policy checks. This coordinated response underscores the importance of deep logic validation alongside standard fuzzing and penetration testing.
Conclusion
These logic-level vulnerabilities highlight that even memory-safe architectures can harbor critical flaws when input normalization and policy enforcement diverge. Cybersecurity teams must augment black-box testing with thorough source analysis to uncover subtle trust-model inconsistencies before adversaries exploit them.