CVE-2021-21373 Nimble falls back to insecure http url when fetching packages

High 7.5 Published Updated

Nimble package manager falls back to insecure HTTP on error, allowing Man-in-the-Middle attackers to inject malicious packages leading to code execution.

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-21373?

CVE-2021-21373 is a high-severity 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 versions before versions 1.2.10 and 1.4.4, "nimble refresh" fetches a list of Nimble packages over HTTPS by default. In case of error it falls back to a non-TLS URL http://irclogs.nim-lang.org/packages.json. An attacker able to perform MitM can deliver a modified package list containing malicious software packages. If the packages are installed and used the attack escalates to untrusted code execution.

Weakness: CWE-295, CWE-348

Which versions are affected by CVE-2021-21373?

It affects 1 product.

Products include Nim-Lang Nim.

How do I fix CVE-2021-21373?

Upgrade to a fixed version.

Is CVE-2021-21373 being exploited?

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

Sources

Also known as DEBIAN-CVE-2021-21373, GHSA-8w52-r35x-rgp8, UBUNTU-CVE-2021-21373.

Is CVE-2021-21373 in your software?

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

Check your SBOMs for free