CVE-2021-3040 Bridgecrew Checkov: Unsafe deserialization of Terraform files allows code execution

Medium 6.7 Published Updated

Attackers can execute arbitrary code by providing a malicious Terraform file to the Checkov security scanner.

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

What is CVE-2021-3040?

CVE-2021-3040 is a medium-severity unsafe deserialization vulnerability in Palo Alto Networks Bridgecrew Checkov, published on 10 Jun 2021. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

An unsafe deserialization vulnerability in Bridgecrew Checkov by Prisma Cloud allows arbitrary code execution when processing a malicious terraform file. This issue impacts Checkov 2.0 versions earlier than Checkov 2.0.139. Checkov 1.0 versions are not impacted.

Weakness: CWE-502

Which versions are affected by CVE-2021-3040?

1 open source package ship an affected version, including checkov. It affects 1 product.

PackageAffectedFixed in
checkov BitnamiFrom 2.0.02.0.139

Products include Paloaltonetworks Bridgecrew Checkov.

How do I fix CVE-2021-3040?

Upgrade checkov to 2.0.139 or later.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2021-3040 being exploited?

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

Sources

Also known as BIT-checkov-2021-3040, GHSA-3q2v-fjjf-4p2w.

Is CVE-2021-3040 in your software?

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

Check your SBOMs for free