CVE-2026-41698
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring Vault provides familiar Spring abstractions and client-side support for accessing, storing and revoking secrets in HashiCorp Vault, including Key/Value templates and Spring Data repositories backed by Vault.
A path traversal vulnerability (CVE-2026-41698) has been identified in Spring Vault's Key/Value accessors and Vault repository support, which allows attackers who control an entity identifier to read or overwrite secrets outside the intended keyspace or mount, as far as the application's Vault token permits.
Per OWASP: A path traversal attack (also known as directory traversal) aims to access files and directories that are stored outside the web root folder. By manipulating variables that reference files with "dot-dot-slash (../)" sequences and its variations or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system including application source code or configuration and critical system files.
This issue affects multiple versions of Spring Vault.
Details
Module Info
- Product: Spring Vault
- Affected packages:
org.springframework.vault:spring-vault-core - Affected versions: >=2.3.0 <=2.3.4, >=3.0.0 <=3.1.3, >=3.2.0 <=3.2.1, >=4.0.0 <=4.0.4, >=4.1.0 <=4.1.1
- GitHub repository: https://github.com/spring-projects/spring-vault
- Published packages: https://central.sonatype.com/artifact/org.springframework.vault/spring-vault-core
- Package manager: Maven
- Fixed in:
- NES for Spring Vault
- OSS Spring Vault 4.0.5, 4.1.2
Vulnerability Info
This Low-severity vulnerability is found in the spring-vault-core package in multiple versions of Spring Vault. Spring Vault builds Vault HTTP API paths by joining a configured mount or keyspace prefix with a caller-supplied identifier, and it does not validate or normalize that identifier first. The Vault repository adapter, for example, maps an entity id to a secret path like this:
String createPath(String id) {
return this.pathPrefix + "/" + id;
}The Key/Value templates build their request paths the same way:
String createDataPath(String path) {
return "%s/%s".formatted(this.path, path);
}
String createEnginePath(String segment, String path) {
return "%s/%s/%s".formatted(this.path, segment, path);
}Similar unvalidated concatenation is used by the transit and transform templates and by username/password login. When an application derives the id or secret path from user input, a value containing .. segments or the encoded sequences %2e, %2f or %5c is passed through unchanged into the Vault API URL. Vault 1.x resolves the relative path, so the request reaches a secret outside the keyspace or mount the application intended, and a repository save or delete can modify it. Access is still bounded by the application's Vault token, so the impact depends on how broadly that token is scoped. Vault 2.0 and later reject non-canonical or relative paths, and applications whose path values are fixed at build time are not exposed.
Mitigation
Only recent versions of Spring Vault receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a currently supported version of Spring Vault.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.