critical8.1
CVE-2022-24065
OS Command Injection in cookiecutter
Impact
The package cookiecutter before 2.1.1 is 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 packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | cookiecutter | < 2.1.1 | 2.1.1 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Cookiecutter Project | Cookiecutter | before 2.1.1 |
| Fedoraproject | Fedora | Versions 35, 36 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- 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/advisories/GHSA-f4q6-9qm4-h8j4
- https://nvd.nist.gov/vuln/detail/CVE-2022-24065
- https://github.com/pypa/advisory-database/tree/main/vulns/cookiecutter/PYSEC-2022-204.yaml
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/G5TXC4JYTNGOUFMCXPZ6QKWEZN3URTAK
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HQKWT7SGFDCUPPLDIELTN7FVTHWDL5YK