CVE-2021-43837
Last modified
CVE-2021-43837 is a critical-severity vulnerability rated 9.1/10 on the CVSS scale. 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. EPSS estimates a 5.00% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Vault-Cli Project | Vault-Cli | >= 0.7.0, < 3.0.0 |
References
- https://github.com/peopledoc/vault-cli/commit/3ba3955887fd6b7d4d646c8b260f21cebf5db852Patch, Third Party Advisory
- https://github.com/peopledoc/vault-cli/security/advisories/GHSA-q34h-97wf-8r8jExploit, Mitigation, Third Party Advisory
- https://podalirius.net/en/publications/grehack-2021-optimizing-ssti-payloads-for-jinja2/Exploit, Third Party Advisory
- https://github.com/peopledoc/vault-cli/commit/3ba3955887fd6b7d4d646c8b260f21cebf5db852Patch, Third Party Advisory
- https://github.com/peopledoc/vault-cli/security/advisories/GHSA-q34h-97wf-8r8jExploit, Mitigation, Third Party Advisory
- https://podalirius.net/en/publications/grehack-2021-optimizing-ssti-payloads-for-jinja2/Exploit, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2021-43837?
How severe is CVE-2021-43837?
How do I fix CVE-2021-43837?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2021
- CVE-2021-43831Gradio is an open source framework for building interactive …7.7
- CVE-2021-43832Spinnaker is an open source, multi-cloud continuous delivery…9.8
- CVE-2021-43833eLabFTW is an electronic lab notebook manager for research t…8.8
- CVE-2021-43834eLabFTW is an electronic lab notebook manager for research t…9.8
- CVE-2021-43835Sulu is an open-source PHP content management system based o…7.2
- CVE-2021-43836Sulu is an open-source PHP content management system based o…8.8
- CVE-2021-43838jsx-slack is a library for building JSON objects for Slack B…7.5
- CVE-2021-43839Cronos is a commercial implementation of a blockchain. In Cr…7.5
- CVE-2021-4384The WordPress Photo Gallery – Image Gallery plugin for WordP…4.3
- CVE-2021-43840message_bus is a messaging bus for Ruby processes and web cl…6.5
- CVE-2021-43841XWiki is a generic wiki platform offering runtime services f…5.4
- CVE-2021-43842Wiki.js is a wiki app built on Node.js. Wiki.js versions 2.5…5.4
Are you affected by CVE-2021-43837?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
