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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.16%, higher than 67% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-03-26T21:25:19.000Z
- Modified: 2026-06-17T03:35:24.930Z
- Weaknesses: CWE-295, CWE-348
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- nim-lang security: < 1.2.10; >= 1.4.0, < 1.4.4
- nim-lang nim: before 1.2.10; from 1.4.0 before 1.4.4

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L`
- NVD: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://consensys.net/diligence/vulnerabilities/nim-insecure-ssl-tls-defaults-remote-code-execution/> (exploit, third-party-advisory)
- <https://github.com/nim-lang/nimble/blob/master/changelog.markdown#0130> (release-notes, third-party-advisory)
- <https://github.com/nim-lang/security/security/advisories/GHSA-8w52-r35x-rgp8> (third-party-advisory)

## Sources

- CVE List: [CVE-2021-21373](https://www.cve.org/CVERecord?id=CVE-2021-21373), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-21373](https://nvd.nist.gov/vuln/detail/CVE-2021-21373), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-21373 · Whole record: https://cve.day/CVE-2021-21373.json · Rebuilt by cve.day 2026-11-25T22:58:00.473Z
