CVE-2024-7594: Github.com/hashicorp/vault Vault SSH Secrets Engine Configuration Vulnerability

HIGH
Advisory Identifier: GHSA-jg74-mwgw-v6x3
CVSS 7.5
CWE-732
Published
Advisory Summary

CVE-2024-7594 is a HIGH (CVSS 7.5) vault ssh secrets engine configuration vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting Github.com/hashicorp/vault libraries in the Go ecosystem. The issue involves vault ssh secrets engine configuration did not restrict valid principals by default. Remediation is available by upgrading affected packages to version 1.17.6, 0.0.0-20241003222810-d5b4e9224698.

CVE-2024-7594 at a Glance

CVE Identifier CVE-2024-7594
GHSA Identifier GHSA-jg74-mwgw-v6x3
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-732: Incorrect Permission Assignment for Critical Resource
Affected Product Github.com/hashicorp/vault
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-7594

To remediate this vulnerability, upgrade all affected Github.com/hashicorp/vault dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/hashicorp/vault fixed: 1.17.6
Upgrade github.com/hashicorp/vault to 1.17.6
github.com/openbao/openbao fixed: Latest secure release
Upgrade github.com/openbao/openbao to Latest secure release
github.com/openbao/openbao fixed: 0.0.0-20241003222810-d5b4e9224698
Upgrade github.com/openbao/openbao to 0.0.0-20241003222810-d5b4e9224698
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/hashicorp/vault

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-7594, inspect your project dependencies for Github.com/hashicorp/vault:

inspect dependencies for github.com/hashicorp/vault

Analyze the terminal output to locate any version of Github.com/hashicorp/vault in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.17.6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-732: Incorrect Permission Assignment for Critical Resource, where the product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. In Github.com/hashicorp/vault, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Vault’s SSH secrets engine did not require the valid_principals list to contain a value by default. If the valid_principals and default_user fields of the SSH secrets engine configuration are not set, an SSH certificate requested by an authorized user to Vault’s SSH secrets engine could be used to authenticate as any user on the host. Fixed in Vault Community Edition 1.17.6, and in Vault Enterprise 1.17.6, 1.16.10, and 1.15.15.

CVE-2024-7594 Affected Github.com/hashicorp/vault Versions

3 component(s)
Fixed Versions:
1.17.60.0.0-20241003222810-d5b4e9224698
Product / Package Ecosystem Affected Versions Fixed Version
github.com/hashicorp/vault
Go
≥ 1.7.7
< 1.17.6
1.17.6
github.com/openbao/openbao
Go
≥ 0.1.0
github.com/openbao/openbao
Go
< 0.0.0-20241003222810-d5b4e9224698
0.0.0-20241003222810-d5b4e9224698

References

Frequently Asked Questions

What is CVE-2024-7594?
CVE-2024-7594 is a security vulnerability in Github.com/hashicorp/vault involving Vault SSH Secrets Engine Configuration Did Not Restrict Valid Principals By Default under CWE-732: Incorrect Permission Assignment for Critical Resource.
Which Github.com/hashicorp/vault versions are affected?
Affected versions include releases prior to 1.17.6, 0.0.0-20241003222810-d5b4e9224698 across affected packages: github.com/hashicorp/vault, github.com/openbao/openbao.
What version fixes CVE-2024-7594?
Upgrading to 1.17.6, 0.0.0-20241003222810-d5b4e9224698 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/hashicorp/vault affected?
Yes, github.com/hashicorp/vault is affected in releases prior to 1.17.6. Upgrade your dependency to 1.17.6 or later.
Is github.com/openbao/openbao affected?
Yes, github.com/openbao/openbao is affected in releases prior to Latest secure release, 0.0.0-20241003222810-d5b4e9224698. Upgrade your dependency to Latest secure release, 0.0.0-20241003222810-d5b4e9224698 or later.
What is the CVSS score of CVE-2024-7594?
CVE-2024-7594 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-7594?
CVE-2024-7594 is classified under CWE-732: Incorrect Permission Assignment for Critical Resource (The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.).
How can I check Go dependencies for CVE-2024-7594?
Run the dependency tree command: 'inspect dependencies for github.com/hashicorp/vault'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jg74-mwgw-v6x3",
  "modified" : "2025-08-12T20:30:49Z",
  "published" : "2024-09-26T21:31:11Z",
  "aliases" : [ "CVE-2024-7594" ],
  "summary" : "Vault SSH Secrets Engine Configuration Did Not Restrict Valid Principals By Default",
  "details" : "Vault’s SSH secrets engine did not require the valid_principals list to contain a value by default. If the valid_principals and default_user fields of the SSH secrets engine configuration are not set, an SSH certificate requested by an authorized user to Vault’s SSH secrets engine could be used to authenticate as any user on the host. Fixed in Vault Community Edition 1.17.6, and in Vault Enterprise 1.17.6, 1.16.10, and 1.15.15.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/hashicorp/vault"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.7.7"
      }, {
        "fixed" : "1.17.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/openbao/openbao"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.1.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 2.0.2"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/openbao/openbao"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20241003222810-d5b4e9224698"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-7594"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openbao/openbao/pull/561"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openbao/openbao/commit/d5b4e922469830ac335b21dc0e8f9878c501a884"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.hashicorp.com/t/hcsec-2024-20-vault-ssh-secrets-engine-configuration-did-not-restrict-valid-principals-by-default/70251"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hashicorp/vault"
  }, {
    "type" : "WEB",
    "url" : "https://openbao.org/docs/release-notes/2-0-0/#202"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3162"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20250110-0007"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-732" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-26T21:53:43Z",
    "nvd_published_at" : "2024-09-26T20:15:07Z"
  }
}