Skip to content

Add HashiCorp Vault AppRole templated policy slash injection module (CVE-2026-5006) - #21850

Open
M4xSec wants to merge 1 commit into
rapid7:masterfrom
M4xSec:vault-approle-slash-injection
Open

Add HashiCorp Vault AppRole templated policy slash injection module (CVE-2026-5006)#21850
M4xSec wants to merge 1 commit into
rapid7:masterfrom
M4xSec:vault-approle-slash-injection

Conversation

@M4xSec

@M4xSec M4xSec commented Aug 30, 2026

Copy link
Copy Markdown

Summary

Auxiliary gather module for CVE-2026-5006 (HCSEC-2026-32). An AppRole granted a
templated read policy such as
secret/data/{{identity.entity.aliases.<accessor>.metadata.scope}}/* together with
the self-service capability to rotate its own secret-id can mint a secret-id whose
metadata.scope contains path separators. Vault <= 2.0.3 does not sanitize the /,
so the templated path traverses across segment boundaries and reads secrets outside
the credential's intended scope, without ever holding a root or admin token.

Fixed in Vault 2.0.4.

Verification

  • Start a Vault 2.0.3 instance provisioned per the module documentation
  • use auxiliary/gather/vault_approle_metadata_slash_injection
  • set RHOSTS, ROLE_ID, SECRET_ID
  • run
  • Confirm the out-of-scope secret is read and stored to loot

Tested against Vault 2.0.3.

Adds auxiliary/gather module for CVE-2026-5006 (HCSEC-2026-32). An AppRole
with a templated read policy such as
secret/data/{{identity.entity.aliases.<accessor>.metadata.scope}}/* plus the
self-service capability to rotate its own secret-id can mint a secret-id whose
metadata.scope contains path separators. Vault <= 2.0.3 does not sanitize the
'/', so the templated path traverses across segment boundaries and reads
secrets outside the credential's intended scope, with no root or admin token.

Tested against Vault 2.0.3.

Signed-off-by: venexy <predator0x300@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant