CVE-2021-43837
Template injection in vault-cli
Also known as GHSA-q34h-97wf-8r8j, PYSEC-2021-853
Mitigation
- Upgrade vault-cli to 3.0.0 or later.
Who should check
- Projects that depend on PyPI package vault-cli (>= 0.7.0, < 3.0.0)
- Anyone running peopledoc vault-cli >= 0.7.0,< 3.0.0
Vulnerability facts
- Affected
- vault-cli >= 0.7.0, < 3.0.0
- Fixed in
- 3.0.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 8.4 (v3.1, CNA)CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Adjacent network
- Attack complexity: Low
- Privileges required: High
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 5.17% chance of exploitation in 30 days (percentile 93, 2026-11-26)
- CWE
- CWE-74
- Modified
Description
vault-cli is a configurable command-line interface tool (and python library) to interact with Hashicorp Vault. In versions before 3.0.0 vault-cli features the ability for rendering templated values. When a secret starts with the prefix `!template!`, vault-cli interprets the rest of the contents of the secret as a Jinja2 template. Jinja2 is a powerful templating engine and is not designed to safely render arbitrary templates. An attacker controlling a jinja2 template rendered on a machine can trigger arbitrary code, making this a Remote Code Execution (RCE) risk. If the content of the vault can be completely trusted, then this is not a problem. Otherwise, if your threat model includes cases where an attacker can manipulate a secret value read from the vault using vault-cli, then this vulnerability may impact you. In 3.0.0, the code related to interpreting vault templated secrets has been removed entirely. Users are advised to upgrade as soon as possible. For users unable to upgrade a workaround does exist. Using the environment variable `VAULT_CLI_RENDER=false` or the flag `--no-render` (placed between `vault-cli` and the subcommand, e.g. `vault-cli --no-render get-all`) or adding `render: false` to the vault-cli configuration yaml file disables rendering and removes the vulnerability. Using the python library, you can use: `vault_cli.get_client(render=False)` when creating your client to get a client that will not render templated secrets and thus operates securely.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-43837. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-43837.md Affected: vault-cli >= 0.7.0, < 3.0.0 Fixed in: 3.0.0 Steps: 1. Search this machine and project for vault-cli (PyPI), peopledoc vault-cli: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
Exploits and PoCs
FAQ
Is CVE-2021-43837 being exploited?
There is no confirmed exploitation: CVE-2021-43837 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 5.17% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-43837?
High: CVSS 8.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2021-43837?
vault-cli >= 0.7.0, < 3.0.0.
Is there a fix for CVE-2021-43837?
Yes. Fixed in 3.0.0. Upgrade vault-cli to 3.0.0 or later.
How do I check if I'm affected by CVE-2021-43837?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.