Vulnerability · Published Mar 26, 2021 · Assigned by GitHub_M
CVE-2021-21374Nimble fails to validate certificates due to insecure httpClient defaults
High 8.1
In plain English
A high-severity security flaw in security from nim-lang. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 64% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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 without full verification of the SSL/TLS certificate due to the default setting of httpClient. 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | nim | 1.4.6+really1.4.2-1 | DEBIAN-CVE-2021-21374 |
| Debian:14 | nim | 1.4.6+really1.4.2-1 | DEBIAN-CVE-2021-21374 |
| Ubuntu:24.04:LTS | nim | no fix listed | UBUNTU-CVE-2021-21374 |
| Ubuntu:25.10 | nim | no fix listed | UBUNTU-CVE-2021-21374 |
| Ubuntu:26.04:LTS | nim | no fix listed | UBUNTU-CVE-2021-21374 |
| Ubuntu:26.10 | nim | no fix listed | UBUNTU-CVE-2021-21374 |
Affected products (as reported)
Weakness: CWE-348, CWE-599, CWE-349 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:L
References
- https://consensys.net/diligence/vulnerabilities/nim-insecure-ssl-tls-defaults-remote-code-execution/ x_refsource_MISC
- https://github.com/nim-lang/nimble/blob/master/changelog.markdown#0130 x_refsource_MISC
- https://github.com/nim-lang/security/security/advisories/GHSA-c2wm-v66h-xhxx x_refsource_CONFIRM
- https://github.com/nim-lang/Nim/pull/16940 x_refsource_MISC