What’s Vulnerable › Vulnerabilities
CVE-2022-24065: Command Injection
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 4.2% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-06-08 · updated 2026-06-17
- Weakness: CWE-78
Description
The package cookiecutter before 2.1.1 are vulnerable to Command Injection via hg argument injection. When calling the cookiecutter function from Python code with the checkout parameter, it is passed to the hg checkout command in a way that additional flags can be set. The additional flags can be used to perform a command injection.
Affected products
- Cookiecutter Project Cookiecutter: before 2.1.1 — fixed in 2.1.1
- Fedoraproject Fedora: 35, 36
How to fix
Upgrade to a fixed version: Cookiecutter Project Cookiecutter 2.1.1. Check the vendor advisory for mitigations.
References
- https://github.com/cookiecutter/cookiecutter/commit/fdffddb31fd2b46344dfa317531ff155e7999f77
- https://github.com/cookiecutter/cookiecutter/releases/tag/2.1.1
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G5TXC4JYTNGOUFMCXPZ6QKWEZN3URTAK/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HQKWT7SGFDCUPPLDIELTN7FVTHWDL5YK/
- https://snyk.io/vuln/SNYK-PYTHON-COOKIECUTTER-2414281
- https://github.com/cookiecutter/cookiecutter/commit/fdffddb31fd2b46344dfa317531ff155e7999f77
- https://github.com/cookiecutter/cookiecutter/releases/tag/2.1.1
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G5TXC4JYTNGOUFMCXPZ6QKWEZN3URTAK/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HQKWT7SGFDCUPPLDIELTN7FVTHWDL5YK/
- https://snyk.io/vuln/SNYK-PYTHON-COOKIECUTTER-2414281
Get alerted when CVE-2022-24065 or the next vulnerability affects your stack