CVE-2021-40720: Ops CLI Deserialization of Untrusted Data vulnerability
Summary
CVE-2021-40720: Ops CLI Deserialization of Untrusted Data vulnerability. Affects ops-cli versions < 2.0.5. Fixed in 2.0.5. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Ops CLI is a Python package available on PyPI that provides a command-line interface for managing operations. It is used to automate various tasks related to software development and deployment. Ops CLI version 2.0.4 and earlier are affected by a Deserialization of Untrusted Data vulnerability. This vulnerability allows an attacker to execute arbitrary code on the victim machine by exploiting the checkout_repo function with a maliciously crafted file. The vulnerability has a CVSS score of 9.8, indicating its critical severity.
Vulnerability Detail
The Deserialization of Untrusted Data vulnerability in Ops CLI version 2.0.4 and earlier arises from the improper handling of user-supplied input. When the checkout_repo function is called on a specially crafted file, an attacker can execute arbitrary code on the victim machine. This can lead to various malicious activities, such as remote code execution, data theft, or system compromise. The vulnerability has been assigned the identifier CVE-2021-40720 and is considered critical.
How To Fix
Latest published version: 2.4.1 as of 23 Oct 2026
pip install --upgrade "ops-cli==2.4.1"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.0.5
This is the first release that contains the fix.
pip install --upgrade "ops-cli==2.0.5"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is crucial to upgrade to the fixed version as soon as possible to mitigate the risk of exploitation.
Conclusion
Ops CLI version 2.0.4 and earlier are affected by a critical Deserialization of Untrusted Data vulnerability. This vulnerability allows an attacker to execute arbitrary code on the victim machine. To mitigate the risk, it is recommended to upgrade to Ops CLI version 2.0.5 or later. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for ops-cli →
FAQ
Ops CLI is a Python package that provides a command-line interface for managing operations in software development and deployment.
The vulnerability allows an attacker to execute arbitrary code on the victim machine, potentially leading to remote code execution, data theft, or system compromise.
The CVSS score of this vulnerability is 9.8, indicating its critical severity.
To fix the vulnerability, upgrade to Ops CLI version 2.0.5 or later by running 'pip install --upgrade ops-cli'.
There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version.