Skip to content
Heist/ feed
Back to feed
High

Command Injection

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-24065
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 15:16 UTC · Revision 1

Source evidence

Command Injection

core-osv · Original source

Published 3 Jun 2022, 20:00 UTC

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.

osv:CVE-2022-24065
Complete source record
{
  "id": "af56e65492a723d04e4c93a32134d917648be3277db4f0fdaa165bbb05ce5678",
  "url": "https://osv.dev/vulnerability/CVE-2022-24065",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "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.",
    "evidence": "osv:CVE-2022-24065",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2022-24065",
      "aliases": [
        "CVE-2022-24065",
        "GHSA-f4q6-9qm4-h8j4",
        "PYSEC-2022-204",
        "SNYK-PYTHON-COOKIECUTTER-2414281"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/cookiecutter/cookiecutter",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "f9376a96097086476ce9eb0b93297a471ae520e0"
                },
                {
                  "fixed": "fdffddb31fd2b46344dfa317531ff155e7999f77"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:cookiecutter_project:cookiecutter:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.1.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "fdffddb31fd2b46344dfa317531ff155e7999f77"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f9376a96097086476ce9eb0b93297a471ae520e0"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "2.1.1"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.1.0",
            "2.0.2",
            "2.0.1",
            "2.0.0a0",
            "1.7.2",
            "1.7.1",
            "1.7.0",
            "1.6.0",
            "1.5.1",
            "1.5.0",
            "1.4.0",
            "1.3.0",
            "1.2.1",
            "1.1.0",
            "1.0.0",
            "0.9.0",
            "0.8.0",
            "0.7.2",
            "0.7.1",
            "0.7.0",
            "0.6.4",
            "0.6.3",
            "0.6.2",
            "0.6.1",
            "0.6.0",
            "0.5",
            "0.4",
            "0.3",
            "0.2.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-24065.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:51.012134209Z",
      "provider": "osv",
      "references": [
        "https://github.com/cookiecutter/cookiecutter/releases/tag/2.1.1",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24065.json",
        "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://nvd.nist.gov/vuln/detail/CVE-2022-24065",
        "https://snyk.io/vuln/SNYK-PYTHON-COOKIECUTTER-2414281",
        "https://github.com/cookiecutter/cookiecutter/commit/fdffddb31fd2b46344dfa317531ff155e7999f77"
      ],
      "provider_metadata": {
        "cna_assigner": "snyk",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24065.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-24065",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 519739,
  "published_at": "2022-06-03T20:00:14.617+00:00"
}