CVE-2022-24065
Python vulnerability analysis and mitigation

Overview

The package cookiecutter before version 2.1.1 was found to be 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 allows setting additional flags that can be used to perform command injection. The vulnerability was discovered in March 2022 and fixed with the release of version 2.1.1 in June 2022 (Snyk Report, GitHub Release).

Technical details

The vulnerability exists in the way the checkout parameter is handled when passed to the hg (Mercurial) checkout command. The code did not properly sanitize the checkout parameter before passing it to the command execution, allowing attackers to inject additional command flags. The vulnerability has a CVSS v3.1 base score of 8.1 (High) with Network attack vector, High attack complexity, and No privileges required. The fix involved adding proper sanitization by inserting '--' before user-controlled arguments to prevent them from being interpreted as command options (Snyk Report).

Impact

Successful exploitation of this vulnerability could lead to total loss of confidentiality and integrity, potentially allowing attackers to execute arbitrary commands on the affected system. This could result in unauthorized access to sensitive information, modification of files, and potential system compromise (Snyk Report).

Mitigation and workarounds

The recommended mitigation is to upgrade cookiecutter to version 2.1.1 or higher, which includes the security fix. The fix was implemented by adding the '--' characters before user-controlled values to prevent them from being interpreted as command options (GitHub Release, Snyk Report).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66471HIGH8.9
  • PythonPython
  • py3-urllib3
NoYesDec 05, 2025
CVE-2025-66418HIGH8.9
  • PythonPython
  • python-urllib3
NoYesDec 05, 2025
CVE-2025-65958HIGH8.5
  • PythonPython
  • cpe:2.3:a:openwebui:open_webui
NoYesDec 04, 2025
CVE-2025-56427HIGH7.5
  • PythonPython
  • composio
NoNoDec 04, 2025
CVE-2025-63681MEDIUM4.3
  • PythonPython
  • open-webui
NoNoDec 04, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management