# CVE-2022-24065: Command Injection

- Severity: High 8.1 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.20%, higher than 91% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-06-03T20:00:14.617Z
- Modified: 2026-06-17T04:31:14.643Z
- Also known as: GHSA-f4q6-9qm4-h8j4, PYSEC-2022-204, SNYK-PYTHON-COOKIECUTTER-2414281
- Weaknesses: CWE-78
- Assigned by: snyk

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

(As written by CVE List.)

## Affected

- cookiecutter: from unspecified before 2.1.1
- cookiecutter (PyPI): before 2.1.1; before fdffddb31fd2b46344dfa317531ff155e7999f77
- cookiecutter_project cookiecutter: before 2.1.1
- fedoraproject fedora: 35; 36

## Every score

- snyk: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P`
- GitHub: CVSS:3.1 8.1 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://snyk.io/vuln/SNYK-PYTHON-COOKIECUTTER-2414281> (exploit, advisory, patch, third-party-advisory, web)
- <https://github.com/cookiecutter/cookiecutter/releases/tag/2.1.1> (third-party-advisory, web)
- <https://github.com/cookiecutter/cookiecutter/commit/fdffddb31fd2b46344dfa317531ff155e7999f77> (fix, patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HQKWT7SGFDCUPPLDIELTN7FVTHWDL5YK/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G5TXC4JYTNGOUFMCXPZ6QKWEZN3URTAK/> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-24065> (advisory)
- <https://github.com/advisories/GHSA-f4q6-9qm4-h8j4> (advisory)
- <https://github.com/cookiecutter/cookiecutter> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/cookiecutter/PYSEC-2022-204.yaml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/G5TXC4JYTNGOUFMCXPZ6QKWEZN3URTAK> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HQKWT7SGFDCUPPLDIELTN7FVTHWDL5YK> (web)

## Sources

- CVE List: [CVE-2022-24065](https://www.cve.org/CVERecord?id=CVE-2022-24065), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-f4q6-9qm4-h8j4](https://github.com/advisories/GHSA-f4q6-9qm4-h8j4), CC-BY-4.0, modified 2024-11-25
- NVD: [CVE-2022-24065](https://nvd.nist.gov/vuln/detail/CVE-2022-24065), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-204](https://osv.dev/vulnerability/PYSEC-2022-204), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2022-24065 · Whole record: https://cve.day/CVE-2022-24065.json · Rebuilt by cve.day 2026-11-25T22:58:12.156Z
