{"id":"CVE-2022-24065","aliases":["CVE-2022-24065","GHSA-f4q6-9qm4-h8j4","PYSEC-2022-204","SNYK-PYTHON-COOKIECUTTER-2414281"],"related":[],"kind":"vulnerability","state":"published","title":"Command Injection","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"El paquete cookiecutter versiones anteriores a 2.1.1, es vulnerable a la inyección de comandos por medio de la inyección de argumentos hg. Cuando es llamada a la función cookiecutter desde código Python con el parámetro checkout, es pasado al comando hg checkout de forma que pueden establecerse flags adicionales. Las flags adicionales pueden ser usadas para llevar a cabo una inyección de comandos","source":"nvd"}],"published":"2022-06-03T20:00:14.617Z","modified":"2026-06-17T04:31:14.643Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"2.1.1","status":"affected"}],"product":"cookiecutter","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.1.1"}],"ecosystem":"PyPI","package":"cookiecutter","purl":"pkg:pypi/cookiecutter","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.1.1"}],"vendor":"cookiecutter_project","product":"cookiecutter","cpe":"cpe:2.3:a:cookiecutter_project:cookiecutter:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"35"},{"status":"affected","version":"36"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"fdffddb31fd2b46344dfa317531ff155e7999f77"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.1.1"}],"ecosystem":"PyPI","package":"cookiecutter","purl":"pkg:pypi/cookiecutter","repo":"https://github.com/cookiecutter/cookiecutter","source":"pysec"}],"references":[{"url":"https://snyk.io/vuln/SNYK-PYTHON-COOKIECUTTER-2414281","tags":["advisory","exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/cookiecutter/cookiecutter/releases/tag/2.1.1","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/cookiecutter/cookiecutter/commit/fdffddb31fd2b46344dfa317531ff155e7999f77","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HQKWT7SGFDCUPPLDIELTN7FVTHWDL5YK/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G5TXC4JYTNGOUFMCXPZ6QKWEZN3URTAK/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24065","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-f4q6-9qm4-h8j4","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/cookiecutter/cookiecutter","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/cookiecutter/PYSEC-2022-204.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/G5TXC4JYTNGOUFMCXPZ6QKWEZN3URTAK","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HQKWT7SGFDCUPPLDIELTN7FVTHWDL5YK","tags":["web"],"sources":["ghsa"]}],"credits":["Alessio Della Libera of Snyk Research Team"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-24065","url":"https://www.cve.org/CVERecord?id=CVE-2022-24065","licence":"CVE Terms of Use","modified":"2024-09-17T00:46:55.130Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f4q6-9qm4-h8j4","url":"https://github.com/advisories/GHSA-f4q6-9qm4-h8j4","licence":"CC-BY-4.0","modified":"2024-11-25T05:24:55.529Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-24065","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24065","licence":"Public domain","modified":"2026-06-17T04:31:14.643Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-204","url":"https://osv.dev/vulnerability/PYSEC-2022-204","licence":"CC-BY-4.0","modified":"2023-11-08T04:08:29.124Z"}],"updatedAt":"2026-11-25T22:58:12.156Z","epss":{"score":0.04201,"percentile":0.91186,"date":"2026-12-01T12:00:22.000Z"}}