CVE-2021-21372 Nimble arbitrary code execution for specially crafted package metadata
Attackers can execute arbitrary commands by crafting malicious package metadata in Nimble, requiring users to upgrade the Nim toolchain.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-21372?
CVE-2021-21372 is a high-severity command injection vulnerability in nim-lang security, published on 26 Mar 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Nimble is a package manager for the Nim programming language. In Nim release version before versions 1.2.10 and 1.4.4, Nimble doCmd is used in different places and can be leveraged to execute arbitrary commands. An attacker can craft a malicious entry in the packages.json package list to trigger code execution.
Which versions are affected by CVE-2021-21372?
It affects 1 product.
Products include Nim-Lang Nim.
How do I fix CVE-2021-21372?
Upgrade to a fixed version.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2021-21372 being exploited?
There is no known exploitation of CVE-2021-21372 in the wild and no public exploit code.
Other vulnerabilities in nim-lang security
Sources
Also known as DEBIAN-CVE-2021-21372, GHSA-rg9f-w24h-962p, UBUNTU-CVE-2021-21372.