Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/tcollins-hashicorp/vault-cve-2026-5006-audit
Vulnerability AnalysisConfiguration AuditingCloud SecurityLearning & EducationCurated Resources
GitHubtcollins-hashicorp/vault-cve-2026-5006-audit

vault-cve-2026-5006-audit

Audit and educational toolkit for CVE-2026-5006, a Vault templated-policy slash-injection vulnerability. Includes a read-only audit script generating Markdown reports and an interactive walkthrough for remediation.

View Repository
6h 53m agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-5006 toolkit (HCSEC-2026-32)

Two tools for working through the Vault templated-policy slash-injection vulnerability: an interactive walkthrough for explaining and scoping the issue, and an audit script that checks a live cluster and writes the findings to Markdown.

  • vault-cve-2026-5006-walkthrough.html - interactive, self-contained walkthrough of the issue
  • vault-cve-2026-5006-audit.sh - read-only cluster audit that generates four reports

The vulnerability in one paragraph

A Vault policy path can pull in a live identity value, such as a user's department, through templating. Vault fills that value into one path segment when it renders the policy. Nothing stops the value from carrying a slash, and a slash is a path separator, so a value like admin/super-secret turns one intended segment into two and grants access the policy author never wrote. Exploiting it needs three things to line up: an authenticated attacker, a templated policy, and control over the identity value that feeds it (entity metadata, an alias name, custom metadata, or group metadata).

The fix has two halves: upgrade to a patched build, then set deny_slash_in_templated_paths = true in the server config and restart. The flag defaults to off, so upgrading alone does not close the gap.

Affected and fixed versions

EditionAffectedFixed in
Community0.11.0 through 2.0.32.0.4
Enterprise0.11.0 through 2.0.32.0.4
Enterprise LTSup to 1.21.8 / 1.20.13 / 1.19.191.21.9 / 1.20.14 / 1.19.20

1. The walkthrough (vault-cve-2026-5006-walkthrough.html)

A single self-contained HTML file. Open it in any browser.

What it covers

  1. The attack. A plain-language explanation plus a live path renderer. Pick or type an identity value and watch Vault build the path as segments. A clean value stays one segment; a value with a slash splits into an extra segment marked as injected. A toggle flips deny_slash_in_templated_paths on and off so you can see the fix blocking the rule in real time.
  2. Check your environment. The same checks the audit script automates, shown as copy-paste commands with a note on namespaces and the HCP root you cannot see.
  3. Remediate. A sub-toggle between HCP Vault Dedicated and self-managed on Kubernetes. The HCP path covers the platform upgrade, the support questions to ask about the flag, and the policy audit you own. The Kubernetes path covers the snapshot, the combined image-and-flag helm upgrade, the ordered pod cycling (standbys first, active last), and verification.

Who it is for

Platform or security teams. Start with the attack tab to gain context of the issue, use the check tab to hand off the commands, and switch the remediate tab to whichever deployment they run.


2. The audit script (vault-cve-2026-5006-audit.sh)

Walks every namespace you can reach and writes four Markdown reports. It never modifies Vault; every call is a list or a read.

Requirements

  • vault CLI and jq on your PATH
  • VAULT_ADDR set to the cluster address
  • An authenticated token: either VAULT_TOKEN in the environment or a prior vault login. On HCP, a token scoped to your admin namespace.

Usage

root@kitploit:~
# HCP Vault Dedicated (default start namespace is "admin")
./vault-cve-2026-5006-audit.sh

# Self-managed with a root token: start at the true root
./vault-cve-2026-5006-audit.sh -n ""

# Start from a specific subtree and choose an output directory
./vault-cve-2026-5006-audit.sh -n admin/team-a -o ./team-a-audit
FlagMeaningDefault
-nNamespace the walk starts fromadmin
-oOutput directory for the Markdown files./vault-audit
-hPrint the usage header and exit

Start at admin on HCP because the true root namespace is not visible to you there. Use -n "" only when you hold a root token on a self-managed cluster.

Output

FileContents
policies.mdTemplated policies grouped by namespace, with the HCL
entity-metadata.mdEntity names and metadata, one table per namespace
alias-and-custom-metadata.mdAlias names and custom metadata, per namespace
group-metadata.mdGroup names and metadata, per namespace

Each file opens with the advisory reference, a UTC timestamp, the cluster address, the start namespace, and the number of namespaces scanned.

What gets flagged

policies.md lists only policies whose path is rendered from identity data (a {{identity...}} reference). Those are the ones that can be widened by a slash.

The three identity reports add a Slash? column. A row is flagged when the name or any metadata value contains a /. Checking the name matters: an alias named admin/injected is an exposure even when its metadata is clean, because the name itself can feed a template.

A flag marks exposure surface, not proof of compromise. For each one, confirm who is allowed to write that value and restructure the policy where a slash would widen scope.

How namespaces are handled

Vault Enterprise and HCP isolate both policies and the identity store per namespace, so the script runs every check in each namespace. vault namespace list returns only direct children as partial paths, so the script recurses and rebuilds each full path as it descends, then sets VAULT_NAMESPACE for every call.

A note on scale

On deep namespace trees this makes a lot of API calls and can run slowly. Point -n at a subtree for a fast first pass before scanning everything.


Remediation summary

  1. Upgrade to a fixed build from the table above. On HCP this arrives through the platform; confirm the schedule in the portal or with support.
  2. Enable deny_slash_in_templated_paths = true and restart each server. On HCP this is a support request, since the server config is not yours to edit. On self-managed you set it yourself.
  3. Review the audit output first. Once the flag is on, a legitimate value that contains a slash will also be blocked, so clean those up before you switch it.

The walkthrough's remediate tab has the step-by-step for both HCP and Kubernetes.

Sources

  • Advisory: HCSEC-2026-32 on the HashiCorp discussion forum
  • deny_slash_in_templated_paths in the Vault configuration reference
  • Templated policies in the Vault policy concepts docs

Disclaimer

These tools are an aid, not an official HashiCorp statement.

Download Tool