CVE-2022-40186 HashiCorp Vault vulnerable to incorrect metadata access
Attackers can gain unintended access to key/value paths in HashiCorp Vault when entities have multiple mount accessors with shared alias names.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-40186?
CVE-2022-40186 is a critical missing authorization vulnerability in Hashicorp Vault, published on 22 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An issue was discovered in HashiCorp Vault and Vault Enterprise before 1.11.3. A vulnerability in the Identity Engine was found where, in a deployment where an entity has multiple mount accessors with shared alias names, Vault may overwrite metadata to the wrong alias due to an issue with checking the proper alias assigned to an entity. This may allow for unintended access to key/value paths using that metadata in Vault.
Weakness: CWE-639
Which versions are affected by CVE-2022-40186?
8 open source packages ship an affected version, including github.com/hashicorp/vault and vault. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/hashicorp/vault Go | From 1.10.0 | 1.10.6 |
github.com/hashicorp/vault Go | From 1.10.0 | 1.10.6 |
github.com/hashicorp/vault Go | From 1.11.0 | 1.11.3 |
github.com/hashicorp/vault Go | From 1.11.0 | 1.11.3 |
github.com/hashicorp/vault Go | From 1.8.0 | 1.9.9, 1.10.6, 1.11.3 |
github.com/hashicorp/vault Go | From 1.8.0 | 1.9.9 |
2 more packages
github.com/hashicorp/vault Go | From 1.8.0 | 1.9.9 |
vault Bitnami | From 1.8.0 | 1.9.9, 1.10.6, 1.11.3 |
Products include Hashicorp Vault.
How do I fix CVE-2022-40186?
Upgrade github.com/hashicorp/vault to a fixed version for your release line: 1.10.6, 1.11.3 or 1.9.9.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2022-40186 being exploited?
There is no known exploitation of CVE-2022-40186 in the wild and no public exploit code.
Other vulnerabilities in Hashicorp Vault
Sources
Also known as BIT-vault-2022-40186, GHSA-7cgv-v83v-rr87, GO-2022-1021.