Add HashiCorp Vault AppRole templated policy slash injection module (CVE-2026-5006) - #21849
Closed
M4xSec wants to merge 1 commit into
Closed
Add HashiCorp Vault AppRole templated policy slash injection module (CVE-2026-5006)#21849M4xSec wants to merge 1 commit into
M4xSec wants to merge 1 commit into
Conversation
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>
M4xSec
force-pushed
the
vault-approle-slash-injection
branch
from
August 30, 2026 22:42
24fa85e to
755c993
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withthe self-service capability to rotate its own secret-id can mint a secret-id whose
metadata.scopecontains 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
use auxiliary/gather/vault_approle_metadata_slash_injectionset RHOSTS,ROLE_ID,SECRET_IDrunTested against Vault 2.0.3.