CVE-2022-24065 Command Injection

High 8.1 Published Updated

Attackers can execute arbitrary commands via argument injection in the cookiecutter library when using the checkout parameter.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-24065?

CVE-2022-24065 is a high-severity command injection vulnerability in Fedoraproject Fedora, published on 3 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-78

Which versions are affected by CVE-2022-24065?

3 open source packages ship an affected version, including cookiecutter. It affects 2 products.

PackageAffectedFixed in
cookiecutter PyPIAll versions2.1.1
cookiecutter PyPIAll versions2.1.1
cookiecutter PyPIAll versions2.1.1

Products include Cookiecutter Project Cookiecutter, Fedoraproject Fedora.

How do I fix CVE-2022-24065?

Upgrade cookiecutter to 2.1.1 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2022-24065 being exploited?

There is no known exploitation of CVE-2022-24065 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2022-24065, GHSA-f4q6-9qm4-h8j4, MGASA-2022-0258, PYSEC-2022-204, SNYK-PYTHON-COOKIECUTTER-2414281, UBUNTU-CVE-2022-24065.

Is CVE-2022-24065 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free