Bug 2095733 (CVE-2022-24065)

Summary: CVE-2022-24065 python-cookiecutter: Command Injection via hg argument injection
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: brett.lentz, chedi.toueiti, fcanogab, jwong, kaycoth, kshier
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-cookiecutter 2.1.1 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Python cookiecutter package. By sending a specially-crafted checkout parameter, a remote attacker could execute arbitrary commands on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-10 15:49:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2095734    
Bug Blocks: 2099964    

Description Marian Rehak 2022-06-10 11:54:43 UTC
A 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.

Reference:

https://snyk.io/vuln/SNYK-PYTHON-COOKIECUTTER-2414281
https://github.com/cookiecutter/cookiecutter/commit/fdffddb31fd2b46344dfa317531ff155e7999f77
https://github.com/cookiecutter/cookiecutter/releases/tag/2.1.1

Comment 1 Marian Rehak 2022-06-10 11:55:00 UTC
Created python-cookiecutter tracking bugs for this issue:

Affects: fedora-all [bug 2095734]

Comment 2 Product Security DevOps Team 2022-06-10 15:49:45 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.