CVE-2021-41802: Hashicorp Vault Privilege Escalation Vulnerability

github.com/hashicorp/vault Updated 02 Oct 2025

Summary

12/10/2021
Yes i
Low
2.9

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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.5 1.7.5
    go get github.com/hashicorp/vault@v1.7.5
  • >= 1.8.0, < 1.8.4 1.8.4
    go 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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/hashicorp/vault.

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.5 1.7.5
    go get github.com/hashicorp/vault@v1.7.5
  • >= 1.8.0, < 1.8.4 1.8.4
    go 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback