CVE-2021-41802: Hashicorp Vault Privilege Escalation Vulnerability
Summary
CVE-2021-41802: Hashicorp Vault Privilege Escalation Vulnerability. Affects github.com/hashicorp/vault across 2 version ranges.
< 1.7.5
>= 1.8.0, < 1.8.4
Fixed in 1.7.5 or 1.8.4, depending on the release line you run. How to fix ↓
Also tracked for
- vault · Bitnami
The same CVE-2021-41802 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
HashiCorp Vault is a popular open-source tool used for securely storing and accessing secrets. It provides a centralized solution for managing secrets, encryption keys, and other sensitive data. Vault is written in Go and is widely used in various applications and environments.
Vulnerability Detail
The vulnerability identified as CVE-2021-41802 in HashiCorp Vault and Vault Enterprise versions 1.7.4 and 1.8.3 allows a user with write permission to an entity alias ID sharing a mount accessor with another user to acquire this other user's policies by merging their identities. This privilege escalation vulnerability can be exploited by an attacker with write access to gain unauthorized access to sensitive policies and potentially perform unauthorized actions. The vulnerability has a CVSS score of 2.9, indicating a low severity level.
How To Fix
Latest published version: v1.21.4 as of 23 Oct 2026
go get github.com/hashicorp/vault@v1.21.4
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 1.7.51.7.5go get github.com/hashicorp/vault@v1.7.5 -
>= 1.8.0, < 1.8.41.8.4go get github.com/hashicorp/vault@v1.8.4
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. The recommended approach is to upgrade to the fixed versions of HashiCorp Vault and Vault Enterprise.
Conclusion
In conclusion, the CVE-2021-41802 vulnerability in HashiCorp Vault and Vault Enterprise versions 1.7.4 and 1.8.3 allows a user with write permission to acquire another user's policies by merging their identities. This privilege escalation vulnerability can be mitigated by upgrading to the fixed versions (1.7.5 and 1.8.4 or later). It is important to stay updated with the latest versions of HashiCorp Vault to ensure the security of sensitive data and prevent unauthorized access.
See every vulnerability recorded for github.com/hashicorp/vault →
FAQ
HashiCorp Vault is an open-source tool used for securely storing and accessing secrets, encryption keys, and other sensitive data. It provides a centralized solution for managing secrets in various applications and environments.
The vulnerability allows a user with write permission to gain unauthorized access to another user's policies, potentially leading to privilege escalation and unauthorized actions.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your version of HashiCorp Vault is affected by this vulnerability. It provides real-time monitoring and alerts for open-source vulnerabilities.
There are no known exploits for this vulnerability at the time of this report. However, it is important to apply the recommended fixes to mitigate the risk.
You can find more information about this vulnerability in the CVE-2021-41802 advisory on the GitHub Advisory Database (https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/10/GHSA-qv95-g3gm-x542/GHSA-qv95-g3gm-x542.json).
Related vulnerabilities
Recent vulnerabilities recorded for github.com/hashicorp/vault.