{"id":"UBUNTU-CVE-2022-24065","details":"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.","modified":"2025-10-24T04:53:29Z","published":"2022-06-08T08:15:00Z","upstream":["CVE-2022-24065"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-24065"},{"type":"REPORT","url":"https://security.snyk.io/vuln/SNYK-PYTHON-COOKIECUTTER-2414281"},{"type":"REPORT","url":"https://github.com/cookiecutter/cookiecutter/releases/tag/2.1.1"},{"type":"REPORT","url":"https://github.com/cookiecutter/cookiecutter/commit/fdffddb31fd2b46344dfa317531ff155e7999f77"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-24065"}],"affected":[{"package":{"name":"cookiecutter","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/cookiecutter@1.3.0-2?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.0-2ubuntu1","1.0.0-3ubuntu1","1.0.0-3ubuntu2","1.3.0-2"],"ecosystem_specific":{"binaries":[{"binary_name":"cookiecutter","binary_version":"1.3.0-2"},{"binary_name":"python-cookiecutter","binary_version":"1.3.0-2"},{"binary_name":"python3-cookiecutter","binary_version":"1.3.0-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-24065.json"}},{"package":{"name":"cookiecutter","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/cookiecutter@1.6.0-2?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.0-2","1.5.1-1","1.6.0-1","1.6.0-1ubuntu2","1.6.0-2"],"ecosystem_specific":{"binaries":[{"binary_name":"cookiecutter","binary_version":"1.6.0-2"},{"binary_name":"python-cookiecutter","binary_version":"1.6.0-2"},{"binary_name":"python3-cookiecutter","binary_version":"1.6.0-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-24065.json"}},{"package":{"name":"cookiecutter","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/cookiecutter@1.7.3-1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7.3-1"],"ecosystem_specific":{"binaries":[{"binary_name":"cookiecutter","binary_version":"1.7.3-1"},{"binary_name":"python3-cookiecutter","binary_version":"1.7.3-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-24065.json"}},{"package":{"name":"cookiecutter","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/cookiecutter@2.6.0-1?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7.3-3","2.6.0-1"],"ecosystem_specific":{"binaries":[{"binary_name":"cookiecutter","binary_version":"2.6.0-1"},{"binary_name":"python3-cookiecutter","binary_version":"2.6.0-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-24065.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}